/// <summary> /// 更新用户信息 /// </summary> /// <param name="oAModel"></param> /// <returns></returns> public string SetAdmin(AdminModel oAModel) { string ret = Config.Fail; try { ret = ad.SetAdmin(oAModel); int Id = 0; bool flag = Int32.TryParse(ret, out Id); if (flag && Id > 0) { if (oAModel.Dealer != null) { DealerBLL db = new DealerBLL(); db.SetDealerInfo(oAModel.Dealer); } if (oAModel.Store != null) { StoreBLL sb = new StoreBLL(); sb.SetStoreInfo(oAModel.Store); } return(Config.Success); } } catch (Exception ex) { WriteLog.WriteExceptionLog("ZB.BLL.Authorization.AdminBLL.SetAdmin()", ex); return(Config.ExceptionMsg); } return(ret); }
public AdminBLL() { rd = new RoleDAL(); pd = new PermissionsDAL(); ad = new AdminDAL(); dd = new DealerBLL(); sd = new StoreBLL(); }
public static List <DealerModel> GetDealerList(out int total) { List <DealerModel> list = new List <DealerModel>(); total = 0; try { DealerBLL db = new DealerBLL(); db.GetDealerModelList(1, 1000000, null, null, out total, out list); } catch (Exception ex) { throw ex; } return(list); }
private void LoadDealer() { ListItem emptyitem = new ListItem(); emptyitem.Text = ""; emptyitem.Value = ""; dealer_ddl.Items.Add(emptyitem); DealerBLL db = new DealerBLL(); int count = 0; List <DealerModel> list = new List <DealerModel>(); db.GetDealerModelList(1, 10000000, null, null, out count, out list); foreach (DealerModel model in list) { ListItem item = new ListItem(); item.Text = model.DealerCompanyName; item.Value = model.AdminId.ToString(); dealer_ddl.Items.Add(item); } }