Exemplo n.º 1
0
        public ActionResult DeptOperManage_EditData(DXInfo.Models.tbOper tbOper)
        {
            var gridModel = new DeptOperManageGridModel();

            SetupDeptOperManageGridModel(gridModel);
            return(ajaxCallBack <DXInfo.Models.tbOper>(gridModel.DeptOperManageGrid, tbOper, addDeptOperManage, editDeptOperManage, delDeptOperManage));
        }
Exemplo n.º 2
0
        private void delDeptOperManage(DXInfo.Models.tbOper tbOper)
        {
            var oldtbOper = Uow.tbOper.GetById(g => g.vcOperID == tbOper.vcOperID);

            if (oldtbOper != null)
            {
                Uow.tbOper.Delete(oldtbOper);
                Uow.Commit();
            }
        }
Exemplo n.º 3
0
        private void editDeptOperManage(DXInfo.Models.tbOper tbOper)
        {
            var oldtbOper = Uow.tbOper.GetById(g => g.vcOperID == tbOper.vcOperID);

            oldtbOper.vcOperName     = tbOper.vcOperName;
            oldtbOper.vcDeptID       = tbOper.vcDeptID;
            oldtbOper.vcLimit        = tbOper.vcLimit;
            oldtbOper.vcActiveFlag   = tbOper.vcActiveFlag;
            oldtbOper.vcPwdBeginFlag = tbOper.vcPwdBeginFlag;
            oldtbOper.IsDiscount     = tbOper.IsDiscount;
            if (tbOper.vcPwdBeginFlag == "1")
            {
                oldtbOper.vcPwd = "000000";
            }
            Uow.tbOper.Update(oldtbOper);
            Uow.Commit();
        }
Exemplo n.º 4
0
 private void addDeptOperManage(DXInfo.Models.tbOper tbOper)
 {
     tbOper.vcPwd = "000000";
     Uow.tbOper.Add(tbOper);
     Uow.Commit();
 }