示例#1
0
        /// <summary>
        /// 编辑付款账号
        /// </summary>
        public void Bank_Edit()
        {
            if (!Power("supplier_bank_list", "收款账号"))
            {
                AjaxNoPower();
                return;
            }
            int  id                  = RequestTool.RequestInt("id", 0);
            bool addflag             = false;
            Lebi_Supplier_Bank model = B_Lebi_Supplier_Bank.GetModel("id = " + id + " and Supplier_id = " + CurrentSupplier.id + "");

            if (model == null)
            {
                addflag = true;
                model   = new Lebi_Supplier_Bank();
            }
            model = B_Lebi_Supplier_Bank.SafeBindForm(model);
            if (addflag)
            {
                model.Supplier_id = CurrentSupplier.id;
                B_Lebi_Supplier_Bank.Add(model);
                id = B_Lebi_Supplier_Bank.GetMaxId();
                Log.Add("添加收款账号", "Bank", id.ToString(), CurrentSupplier, model.Name);
            }
            else
            {
                B_Lebi_Supplier_Bank.Update(model);
                Log.Add("编辑收款账号", "Bank", id.ToString(), CurrentSupplier, model.Name);
            }
            string result = "{\"msg\":\"OK\", \"id\":\"" + id + "\"}";

            Response.Write(result);
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_bank_list", "付款账号"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Supplier_Bank.GetModel("id = " + id + " and Supplier_id = " + CurrentSupplier.id + "");
            if (model == null)
            {
                model = new Lebi_Supplier_Bank();
            }
        }