超管批量删除店铺功能
This commit is contained in:
1 parent
2373b94444
commit
e0eec7a463
2 files changed
+1023
-965
No files matched your search
+992
-964
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,8 @@
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.Param.TemuProductManage;
|
||||
using AllBase.Model.Result;
|
||||
using CefSharp.DevTools.FedCm;
|
||||
using NaiBa.Util;
|
||||
using NaiBa.Util.Extension;
|
||||
using Newtonsoft.Json;
|
||||
@@ -17,6 +19,7 @@ using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.BaseForms;
|
||||
using TemuKJD.BLL;
|
||||
@@ -201,7 +204,7 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
break;
|
||||
|
||||
var shopInfo = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName);
|
||||
if (shopInfo != null && !string.IsNullOrEmpty(shopInfo.LoginName) && !string.IsNullOrEmpty(shopInfo.Password))
|
||||
if (shopInfo != null && !string.IsNullOrEmpty(shopInfo.LoginName) /*&& !string.IsNullOrEmpty(shopInfo.Password)*/)
|
||||
{
|
||||
WXAdminShopLoginForm shopLoginForm = new WXAdminShopLoginForm(shopInfo);
|
||||
shopLoginForm.openType = EnumOpenType.login;
|
||||
@@ -578,11 +581,13 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
{
|
||||
this.dgvShop.Columns["colEdit"].Visible = true;
|
||||
this.dgvShop.Columns["colDelete"].Visible = true;
|
||||
this.btnDelSelect.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.dgvShop.Columns["colEdit"].Visible = false;
|
||||
this.dgvShop.Columns["colDelete"].Visible = false;
|
||||
this.btnDelSelect.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -802,6 +807,31 @@ namespace TemuKJD.WXForms.AdminForms
|
||||
this.pbLoading.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnDelSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BaseMsgForm.ShowConfirm("确定删除店铺吗?删除后不可恢复!").DialogResult == DialogResult.Cancel)
|
||||
return;
|
||||
|
||||
var shopLoginNameList = dgvShop.Rows.Cast<DataGridViewRow>().Where(c => c.Cells["colSelect"].Value.ParseToBool() == true).ToList();
|
||||
if (!shopLoginNameList.Any())
|
||||
{
|
||||
BaseMsgForm.ShowError("请选择需要检测的店铺");
|
||||
return;
|
||||
}
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
foreach (var dgvRow in shopLoginNameList)
|
||||
{
|
||||
Thread.Sleep(50);
|
||||
var shop = lstAdminShopInfo.FirstOrDefault(v => v.UserName == dgvRow.Cells["colUser"].Value.ParseToString() && v.ShopId == dgvRow.Cells["colShopId"].Value.ParseToString());
|
||||
ShopBLL.AdminDelServerShop(shop);
|
||||
}
|
||||
|
||||
SearchShop(this.ucSplitPage1.CurrentPage);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user