1挪动一些老旧文件的位置以备后续删除 2图片显示 3店铺登录信息优化显示
This commit is contained in:
1 parent
011b909bfc
commit
157f7e9f3e
59 files changed
+1160
-432
No files matched your search
@@ -19,6 +19,7 @@ using TemuKJD.Extension;
|
||||
using TemuKJD.KJDForms.BaseForms;
|
||||
using TemuKJD.KJDForms.ProductSelectForms;
|
||||
using TemuKJD.KJDForms.ShopForms;
|
||||
using TemuKJD.KJDForms.ToolForms;
|
||||
using Work;
|
||||
|
||||
namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
@@ -127,8 +128,9 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
shopEntity.LoginName,
|
||||
shopEntity.ShopId,
|
||||
shopEntity.ShopAccount,
|
||||
shopEntity.LoginStatus,
|
||||
shopEntity.Notes,
|
||||
"选择商品",
|
||||
canUse ? "在线" : "掉线",
|
||||
canUse,
|
||||
shopEntity.AddProductRemaining,
|
||||
string.Empty
|
||||
@@ -139,7 +141,9 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
row.Cells["colSelect"].Value = !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse);
|
||||
row.Cells["colShopLoginName"].Value = shopEntity.LoginName;
|
||||
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
|
||||
row.Cells["colLoginStatus"].Value = shopEntity.LoginStatus;
|
||||
row.Cells["colShopNotes"].Value = shopEntity.Notes;
|
||||
row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
|
||||
row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red;
|
||||
row.Cells["colCanUse"].Value = canUse;
|
||||
row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining;
|
||||
}
|
||||
@@ -226,13 +230,13 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
|
||||
foreach (var prodSelect in lstTemuDBProductSelect)
|
||||
{
|
||||
Image image = null;
|
||||
string imgUrl = prodSelect?.main_img?.Replace("https", "http");
|
||||
string rst = "";
|
||||
if (!string.IsNullOrWhiteSpace(imgUrl))
|
||||
image = GetHtml.GetUrlImg(imgUrl, out rst);
|
||||
if (!string.IsNullOrEmpty(rst))
|
||||
BaseMsgForm.ShowError(rst);
|
||||
//Image image = null;
|
||||
//string imgUrl = prodSelect?.main_img?.Replace("https", "http");
|
||||
//string rst = "";
|
||||
//if (!string.IsNullOrWhiteSpace(imgUrl))
|
||||
// image = GetHtml.GetUrlImg(imgUrl, out rst);
|
||||
//if (!string.IsNullOrEmpty(rst))
|
||||
// BaseMsgForm.ShowError(rst);
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -245,7 +249,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
"登录",
|
||||
prodSelect.spu_id,
|
||||
prodSelect.skc_id,
|
||||
image,//prod.main_img,
|
||||
prodSelect.main_img,
|
||||
defaultBitmap,
|
||||
prodSelect.product_name,
|
||||
prodSelect.cat_name,
|
||||
prodSelect.ext_code,
|
||||
@@ -261,6 +266,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
ShowDgvImg();
|
||||
this.pbLoading.Visible = false;
|
||||
}));
|
||||
});
|
||||
@@ -384,6 +390,10 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
dgvSelectProduct.Rows[e.RowIndex].Cells["colUserNotes"].Value = (dbProduct.user_notes + " 编辑").Trim();
|
||||
}
|
||||
break;
|
||||
case "图片":
|
||||
ShowImgForm imgFrom = new ShowImgForm(dgvSelectProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString());
|
||||
imgFrom.ShowDialog();
|
||||
break;
|
||||
case "":
|
||||
dgvSelectProduct.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvSelectProduct.Rows[e.RowIndex].Cells["colCheck"].Value;
|
||||
break;
|
||||
@@ -471,5 +481,56 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
|
||||
this.cmbNotes.Text = "全部";
|
||||
this.cmbUserNotes.Text = "全部";
|
||||
}
|
||||
Bitmap defaultBitmap = new Bitmap(80, 80);
|
||||
void ShowDgvImg()
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
foreach (DataGridViewRow row in this.dgvSelectProduct.Rows)
|
||||
{
|
||||
if (row.Index > 0 && row.Cells["colProductSkcPic"].Displayed == false)
|
||||
{
|
||||
try
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colProductSkcPic"].Value = defaultBitmap;
|
||||
}));
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (row.Cells["colProductSkcPic"].Value != null && row.Cells["colProductSkcPic"].Value != defaultBitmap)
|
||||
continue;
|
||||
|
||||
Image image = null;
|
||||
string imgUrl = row.Cells["colImgUrl"]?.Value.ParseToString();
|
||||
string getImgError = "";
|
||||
if (!string.IsNullOrWhiteSpace(imgUrl))
|
||||
image = GetHtml.GetUrlImg(imgUrl, out getImgError);
|
||||
if (!string.IsNullOrEmpty(getImgError))
|
||||
BaseMsgForm.ShowError(getImgError);
|
||||
|
||||
try
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
row.Cells["colProductSkcPic"].Value = image;
|
||||
}));
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void dgvSelectProduct_Scroll(object sender, ScrollEventArgs e)
|
||||
{
|
||||
ShowDgvImg();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user