Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
        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("操作失败");
            }
        }
Esempio n. 4
0
        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());
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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();
        }
Esempio n. 7
0
        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;
        }
Esempio n. 8
0
        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();
        }
Esempio n. 9
0
        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;
        }
Esempio n. 10
0
        protected static Sys_BankInfo GetBankByCode(object code)
        {
            Sys_BankInfo obj = new Sys_BankInfoBLL().GetModel(code);

            return(obj);
        }