超级店铺管理功能
This commit is contained in:
1 parent
d3e404ac2a
commit
fe2d2883db
91 files changed
+4295
-587
No files matched your search
@@ -15,10 +15,10 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
{
|
||||
public partial class ShopAddEditForm : LRBaseForm
|
||||
{
|
||||
DouShopLoginInfo shopLoginInfo = null;
|
||||
ShopLoginInfo shopLoginInfo = null;
|
||||
bool isAdd = true;
|
||||
|
||||
public ShopAddEditForm(DouShopLoginInfo shop = null)
|
||||
public ShopAddEditForm(ShopLoginInfo shop = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
shopLoginInfo = shop;
|
||||
@@ -40,12 +40,23 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
}
|
||||
|
||||
if (shopLoginInfo == null)
|
||||
shopLoginInfo = new DouShopLoginInfo();
|
||||
shopLoginInfo = new ShopLoginInfo();
|
||||
|
||||
shopLoginInfo.LoginName = this.txtLoginName.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.txtShopPassword.Text.Trim()))
|
||||
shopLoginInfo.Password = DataOpenSSL.EncryptString(this.txtShopPassword.Text.Trim());
|
||||
shopLoginInfo.Group = this.cmbGroup.Text;
|
||||
shopLoginInfo.GroupName = this.cmbGroup.Text;
|
||||
shopLoginInfo.Notes = this.txtNotes.Text;
|
||||
shopLoginInfo.CompanyName = AllBase.BaseClass.CompanyName;
|
||||
|
||||
// 同一个登录账号下的店铺使用同样的groupName和Notes
|
||||
var shopLst = GlobalConfig.ShopLoginList.Where(s => s.LoginName == shopLoginInfo.LoginName && s.ShopId != shopLoginInfo.ShopId).ToList();
|
||||
foreach (var shop in shopLst)
|
||||
{
|
||||
shop.GroupName = shopLoginInfo.GroupName;
|
||||
shop.Notes = shopLoginInfo.Notes;
|
||||
}
|
||||
|
||||
this.OnSaveComplete(shopLoginInfo, isAdd);
|
||||
this.Close();
|
||||
}
|
||||
@@ -61,13 +72,14 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
this.cmbGroup.Items.Add(string.Empty);
|
||||
foreach (var shop in GlobalConfig.ShopLoginList)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(shop.Group) && !this.cmbGroup.Items.Contains(shop.Group))
|
||||
this.cmbGroup.Items.Add(shop.Group);
|
||||
if (!string.IsNullOrEmpty(shop.GroupName) && !this.cmbGroup.Items.Contains(shop.GroupName))
|
||||
this.cmbGroup.Items.Add(shop.GroupName);
|
||||
}
|
||||
if (shopLoginInfo != null)
|
||||
{
|
||||
this.txtLoginName.Text = shopLoginInfo.LoginName;
|
||||
this.cmbGroup.Text = shopLoginInfo.Group;
|
||||
this.cmbGroup.Text = shopLoginInfo.GroupName;
|
||||
this.txtNotes.Text = shopLoginInfo.Notes;
|
||||
this.btnOk.Text = "更新";
|
||||
this.TitleText = "编辑店铺 - " + shopLoginInfo.ShopAccount;
|
||||
this.txtBuyAccount.Text = shopLoginInfo.BuyAccount;
|
||||
@@ -109,7 +121,7 @@ namespace TemuKJD.KJDForms.ShopForms
|
||||
|
||||
private void F_SaveComplete(object obj)
|
||||
{
|
||||
var shop = obj as DouShopLoginInfo;
|
||||
var shop = obj as ShopLoginInfo;
|
||||
if (shop != null)
|
||||
{
|
||||
this.txtBuyAccount.Text = shop.BuyAccount;
|
||||
|
||||
Reference in new issue
Block a user