广告直通车功能 2修复活动勾选问题 3加入发货台功能完成20%
This commit is contained in:
1 parent
a6b36c64b0
commit
e2b37df00b
35 files changed
+6832
-236
No files matched your search
@@ -104,7 +104,9 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
|
||||
public void SearchShop(int page)
|
||||
{
|
||||
List<string> shopIdSelectList = GetCheckedShopIdList();
|
||||
List<string> userShopIdList = dgvShop.Rows.Cast<DataGridViewRow>()
|
||||
.Where(r => r.Cells["colSelect"].Value.ParseToBool())
|
||||
.Select(r => r.Cells["colShopId"].Value.ParseToString() + r.Cells["colUser"].Value.ParseToString()).ToList();
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
@@ -133,7 +135,7 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
int rowIndex = this.dgvShop.Rows.Add(
|
||||
shopIdSelectList.Contains(shop.ShopId + shop.UserName),
|
||||
userShopIdList.Contains(shop.ShopId + shop.UserName),
|
||||
shop.UserName,
|
||||
shop.LoginName,
|
||||
shop.ShopId,
|
||||
@@ -144,11 +146,6 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
string.Empty
|
||||
);
|
||||
displayShopStatus(shop);
|
||||
//var row = dgvShop.Rows[rowIndex];
|
||||
//(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red;
|
||||
//(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red;
|
||||
//(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed;
|
||||
//(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed;
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -159,21 +156,6 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
});
|
||||
}
|
||||
|
||||
private List<string> GetCheckedShopIdList()
|
||||
{
|
||||
List<string> shopNameList = new List<string>();
|
||||
for (int i = 0; i < dgvShop.Rows.Count; i++)
|
||||
{
|
||||
if (dgvShop.Rows[i].Cells["colSelect"].Value.ParseToBool())
|
||||
{
|
||||
string shopName = dgvShop.Rows[i].Cells["colShopId"].Value.ParseToString();
|
||||
shopName += dgvShop.Rows[i].Cells["colUser"].Value.ParseToString();
|
||||
shopNameList.Add(shopName);
|
||||
}
|
||||
}
|
||||
return shopNameList;
|
||||
}
|
||||
|
||||
public List<ShopLoginInfo> AdminGetServerShopLst(out int pageCount, int page = 1, int pageSize = 50)
|
||||
{
|
||||
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
|
||||
@@ -213,6 +195,21 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
txtNotes.Text = txtShopId.Text = txtShopName.Text = "";
|
||||
}
|
||||
|
||||
void displayShopStatus(ShopLoginInfo shop)
|
||||
{
|
||||
bool canUse = shop.LoginStatus2 == "国际版在线";
|
||||
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colLoginName"].Value.ParseToString() == shop?.LoginName);
|
||||
foreach (var row in rows)
|
||||
{
|
||||
row.Cells["colCanUse"].Value = canUse;
|
||||
row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
|
||||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red;
|
||||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red;
|
||||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed;
|
||||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed;
|
||||
}
|
||||
}
|
||||
|
||||
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex < 0 || e.RowIndex < 0)
|
||||
@@ -248,21 +245,6 @@ namespace TemuKJD.KJDForms.AdminForms
|
||||
displayShopStatus(shop);
|
||||
}
|
||||
|
||||
void displayShopStatus(ShopLoginInfo shop)
|
||||
{
|
||||
bool canUse = shop.LoginStatus2 == "国际版在线";
|
||||
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colLoginName"].Value.ParseToString() == shop?.LoginName);
|
||||
foreach (var row in rows)
|
||||
{
|
||||
row.Cells["colCanUse"].Value = canUse;
|
||||
row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线";
|
||||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red;
|
||||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red;
|
||||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed;
|
||||
(row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed;
|
||||
}
|
||||
}
|
||||
|
||||
private void dgvCheckPrice_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.ColumnIndex < 0 || e.RowIndex < 0)
|
||||
|
||||
Reference in new issue
Block a user