Exemplo n.º 1
0
        /// <summary>
        /// 更新支付方式整行
        /// </summary>
        private void Uptr()
        {
            int    id     = Convert.ToInt32(context.Request.QueryString["id"]);
            string txt    = context.Request.QueryString["txt"];
            int    sort   = Convert.ToInt32(context.Request.QueryString["sort"]);
            string remark = context.Request.QueryString["remark"];

            Model.meth_pay modelmp = new Model.meth_pay();
            if (id != 0)
            {
                modelmp.meth_pay_id = id;
            }
            modelmp.meth_sort     = sort;
            modelmp.remark        = remark;
            modelmp.meth_pay_name = txt;
            if (id == 0)
            {
                int rel = bllmp.Add(modelmp);
                if (rel > 0)
                {
                    context.Response.Write(rel);
                    context.Response.End();
                }
            }
            else if (!bllmp.Update(modelmp))
            {
                context.Response.Write("err");
            }
        }
Exemplo n.º 2
0
        private void UpYaj()
        {
            BLL.meth_pay bllmp = new BLL.meth_pay();
            int          id    = Convert.ToInt32(context.Request.QueryString["id"]);

            Model.meth_pay modelmp = bllmp.GetModel(id);
            if (modelmp.meth_is_ya)
            {
                modelmp.meth_is_ya = false;
            }
            else
            {
                modelmp.meth_is_ya = true;
            }
            if (!bllmp.Update(modelmp))
            {
                context.Response.Write("err");
            }
        }