protected void BindRep() { Sys_BankInfoBLL BLL = new Sys_BankInfoBLL(); rep_List.DataSource = BLL.GetList(" 1=1 and IsDeleted=0 order by ID desc"); rep_List.DataBind(); }
protected override void SetValue(string id) { Sys_BankInfoBLL sbiBLL = new Sys_BankInfoBLL(); txtBank.DataSource = sbiBLL.GetList(" 1 = 1 and IsDeleted = 0 order by Code"); txtBank.DataTextField = "Name"; txtBank.DataValueField = "Name"; txtBank.DataBind(); BindDdlPwdQuestion(ddlQuestion); foreach (Model.Roles item in BLL.Roles.RolsList.Values.ToList().Where(emp => emp.VState).ToList()) { ddlMemberType.Items.Add(new ListItem(item.RName, item.RType));//角色 } ////会员级别 //ddlSHMoney.DataSource = BLL.Configuration.Model.SHMoneyTable; //ddlSHMoney.DataTextField = "MAgencyName"; //ddlSHMoney.DataValueField = "MAgencyType"; //ddlSHMoney.DataBind(); string mid = HttpUtility.UrlDecode(Request["id"].Trim()); model = BllModel.GetModel(mid); MemberModel = model; }
protected override string btnAdd_Click() { Sys_BankInfo obj = null; IList <Sys_BankInfo> list = GetDetailModelList(); IList <Sys_BankInfo> listNew = new List <Sys_BankInfo>(); foreach (Sys_BankInfo objNew in list) { Sys_BankInfo sq = objNew; if (objNew.Id == 0) { sq.CreatedBy = TModel.MID; sq.CreatedTime = DateTime.Now; sq.IsDeleted = false; sq.Status = true; } else { sq = new Sys_BankInfoBLL().GetModel(objNew.Id); sq.Code = objNew.Code; sq.LinkUrl = objNew.LinkUrl; sq.Name = objNew.Name; sq.PicUrl = objNew.PicUrl; sq.Remark = objNew.Remark; sq.UpdatedBy = TModel.MID; sq.UpdatedTime = DateTime.Now; } listNew.Add(sq); } //删除需要删除的 string deleteId = Request.Form["hidDelIds"]; if (!string.IsNullOrEmpty(deleteId)) { string[] arr = deleteId.Split(','); foreach (string str in arr) { if (!string.IsNullOrEmpty(str)) { Sys_BankInfo sq = new Sys_BankInfoBLL().GetModel(str); sq.IsDeleted = true; sq.UpdatedBy = TModel.MID; sq.UpdatedTime = DateTime.Now; // new BLL.Sys_SecurityQuestion().Delete(str); listNew.Add(sq); //new Sys_BankInfoBLL().Delete(str); } } } //更新或新增 if (new Sys_BankInfoBLL().SaveOrUpdate(listNew)) { return("操作成功"); } else { return("操作失败"); } }
protected Sys_BankInfo GetBank(string id) { Sys_BankInfoBLL BLL = new Sys_BankInfoBLL(); Sys_BankInfo model = BLL.GetModel(id); if (model != null) { return(model); } return(new Sys_BankInfo()); }
protected override void SetValue(string id) { Sys_BankInfoBLL bll = new Sys_BankInfoBLL(); txtBank.DataSource = bll.GetList(" 1=1 and IsDeleted=0 order by ID desc"); txtBank.DataTextField = "Name"; txtBank.DataValueField = "Id"; txtBank.DataBind(); hdBankCode.Value = id; BankInfo = BLL.BankModel.GetModel(id); }
protected override void SetPowerZone() { txtMTJ.Value = TModel.MID; if (!TModel.Role.IsAdmin) { txtMTJ.Attributes.Add("readonly", "readonly"); } //if (!string.IsNullOrEmpty(Request.QueryString["mid"])) //{ // if (string.IsNullOrEmpty(txtMBD.Value)) // txtMBD.Value = Request.QueryString["mid"].Trim(); //} //else //{ // txtMBD.Value = txtMTJ.Value; //} //Random r = new Random(); //var rid = r.Next(1, 999).ToString(); //txtMID.Value = "huiyuan" + rid; //if (!string.IsNullOrEmpty(Request.QueryString["bdindex"])) //{ // int bdindex = int.Parse(Request.QueryString["bdindex"]); // if (bdindex == 1) // { // ddlMBDIndex.SelectedIndex = 0; // } // else // { // ddlMBDIndex.SelectedIndex = 1; // } //} BindDdlPwdQuestion(); Sys_BankInfoBLL sbiBLL = new Sys_BankInfoBLL(); txtBank.DataSource = sbiBLL.GetList(" 1 = 1 and IsDeleted = 0 order by Code"); txtBank.DataTextField = "Name"; txtBank.DataValueField = "Name"; txtBank.DataBind(); }
protected override void SetPowerZone() { if (!TModel.Role.IsAdmin) { txtMID.Attributes.Add("readonly", "readonly"); } else { lb_Tip.Visible = false; } chkIsPrimary.Checked = true; txtBankCardName.Value = TModel.MName; txtMID.Value = TModel.MID; Sys_BankInfoBLL bll = new Sys_BankInfoBLL(); txtBank.DataSource = bll.GetList(" 1=1 and IsDeleted=0 and Status=1 order by ID desc"); txtBank.DataTextField = "Name"; txtBank.DataValueField = "Id"; txtBank.DataBind(); txtBankCardName.Value = TModel.MName; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["mid"])) { Model.Member tjmodel = BLL.Member.ManageMember.GetModel(Request.QueryString["mid"]); if (tjmodel != null) { txtMTJ.Value = Request.QueryString["mid"]; txtMTJ.Attributes["readonly"] = "readonly"; } } } Sys_BankInfoBLL sbiBLL = new Sys_BankInfoBLL(); txtBank.DataSource = sbiBLL.GetList(" 1=1 and IsDeleted=0 order by Code"); txtBank.DataTextField = "Name"; txtBank.DataValueField = "Name"; txtBank.DataBind(); BindDdlPwdQuestion(); }
protected override void SetPowerZone() { if (!TModel.Role.IsAdmin) { txtMName.Attributes.Add("readonly", "readonly"); if (!string.IsNullOrEmpty(TModel.BankCardName)) { txtBankCardName.Attributes.Add("readonly", "readonly"); } } //if (TModel.Role.IsAdmin) { Sys_BankInfoBLL sbiBLL = new Sys_BankInfoBLL(); txtBank.DataSource = sbiBLL.GetList(" 1 = 1 and IsDeleted = 0 order by Code"); txtBank.DataTextField = "Name"; txtBank.DataValueField = "Name"; txtBank.DataBind(); } MemberModel = TModel; }
protected static Sys_BankInfo GetBankByCode(object code) { Sys_BankInfo obj = new Sys_BankInfoBLL().GetModel(code); return(obj); }