Commit 64c6431e authored by 黄奎's avatar 黄奎

页面修改

parent 242a9a88
......@@ -75,12 +75,14 @@ namespace Mall.Module.User
return list;
}
/// <summary>
/// 添加修改供应商
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public bool AddOrUpdateSupplier(RB_Supplier_Extend model)
{
bool flag = false;
// var trans = supplierRepository.DbTransaction;
try
{
......@@ -91,30 +93,21 @@ namespace Mall.Module.User
model.Status = (int)Common.Enum.DateStateEnum.Normal;
var id = clientBankAccountRepository.Insert(model.ClientBankAccount);
model.BankAccountId = id;
//IDictionary<string, object> fileds = new Dictionary<string, object>()
//{
// { nameof(RB_ClientBankAccount.SupplierId),model.ID}
//};
//IList<WhereHelper> whereHelpers = new List<WhereHelper>()
//{
// new WhereHelper (){ FiledName=nameof(RB_ClientBankAccount.ID),FiledValue=id,OperatorEnum=OperatorEnum.Equal}
//};
//flag = clientBankAccountRepository.Update(fileds, whereHelpers);
flag = id > 0;
}
else
{
IDictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_ClientBankAccount.Type),(int)model.ClientBankAccount.Type},
{ nameof(RB_ClientBankAccount.ObjID),model.ClientBankAccount.ObjID},
{ nameof(RB_ClientBankAccount.BankId),model.ClientBankAccount.BankId},
{ nameof(RB_ClientBankAccount.OpenBankName),model.ClientBankAccount.OpenBankName},
{ nameof(RB_ClientBankAccount.AccountHolder),model.ClientBankAccount.AccountHolder},
{ nameof(RB_ClientBankAccount.CardNum),model.ClientBankAccount.CardNum},
{ nameof(RB_ClientBankAccount.AccountAlias),model.ClientBankAccount.AccountAlias},
{ nameof(RB_ClientBankAccount.Status),model.ClientBankAccount.Status},
{ nameof(RB_ClientBankAccount.AccountClassify),model.ClientBankAccount.AccountClassify}
{ nameof(RB_ClientBankAccount.Type),(int)model.ClientBankAccount.Type},
{ nameof(RB_ClientBankAccount.ObjID),model.ClientBankAccount.ObjID},
{ nameof(RB_ClientBankAccount.BankId),model.ClientBankAccount.BankId},
{ nameof(RB_ClientBankAccount.OpenBankName),model.ClientBankAccount.OpenBankName},
{ nameof(RB_ClientBankAccount.AccountHolder),model.ClientBankAccount.AccountHolder},
{ nameof(RB_ClientBankAccount.CardNum),model.ClientBankAccount.CardNum},
{ nameof(RB_ClientBankAccount.AccountAlias),model.ClientBankAccount.AccountAlias},
{ nameof(RB_ClientBankAccount.Status),model.ClientBankAccount.Status},
{ nameof(RB_ClientBankAccount.AccountClassify),model.ClientBankAccount.AccountClassify}
};
IList<WhereHelper> whereHelpers = new List<WhereHelper>()
{
......@@ -188,7 +181,6 @@ namespace Mall.Module.User
{
model.Status = (int)Common.Enum.DateStateEnum.Normal;
var id = clientBankAccountRepository.Insert(model.ClientBankAccount);
if (id > 0)
{
model.BankAccountId = id;
......@@ -203,26 +195,13 @@ namespace Mall.Module.User
model.SupplierCommissionList.ForEach(x => x.Status = 0);
supplierCommissionRepository.InsertBatch(model.SupplierCommissionList);
}
flag = supplierId > 0;
//IDictionary<string, object> fileds = new Dictionary<string, object>()
//{
// { nameof(RB_ClientBankAccount.SupplierId),supplierId}
//};
//IList<WhereHelper> whereHelpers = new List<WhereHelper>()
//{
// new WhereHelper (){ FiledName=nameof(RB_ClientBankAccount.ID),FiledValue=id,OperatorEnum=OperatorEnum.Equal}
//};
//flag = clientBankAccountRepository.Update(fileds, whereHelpers);
}
}
// supplierRepository.DBSession.Commit();
}
catch (Exception ex)
{
LogHelper.Write(ex, "AddOrUpdateSupplier");
// supplierRepository.DBSession.Rollback("AddOrUpdateSupplier");
return false;
}
return flag;
......
......@@ -74,7 +74,7 @@ namespace Mall.WebApi.Controllers.User
/// <summary>
/// 添加修改
/// 添加修改供应商
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment