Exemple #1
0
        public ActionResult LoginOper_EditData(DXInfo.Models.tbLogin tbLogin)
        {
            var gridModel = new LoginOperGridModel();

            SetupLoginOperGridModel(gridModel.LoginOperGrid);
            return(ajaxCallBack <DXInfo.Models.tbLogin>(gridModel.LoginOperGrid, tbLogin, addLoginOper, editLoginOper, delLoginOper));
        }
Exemple #2
0
        private void editLoginOper(DXInfo.Models.tbLogin tbLogin)
        {
            var oldtbLogin = Uow.tbLogin.GetById(g => g.vcLoginID == tbLogin.vcLoginID);

            oldtbLogin.vcOperName = tbLogin.vcOperName;
            oldtbLogin.vcDeptID   = tbLogin.vcDeptID;
            oldtbLogin.vcLimit    = tbLogin.vcLimit;
            Uow.tbLogin.Update(oldtbLogin);
            Uow.Commit();

            centerCommon.UpdateOper(tbLogin.vcLoginID, tbLogin.vcOperName, tbLogin.vcDeptID);
        }
Exemple #3
0
        private void delLoginOper(DXInfo.Models.tbLogin tbLogin)
        {
            var oldtbLogin = Uow.tbLogin.GetById(g => g.vcLoginID == tbLogin.vcLoginID);

            if (oldtbLogin != null)
            {
                Uow.tbLogin.Delete(oldtbLogin);
                Uow.Commit();

                centerCommon.DeleteOper(tbLogin.vcLoginID);
            }
        }
Exemple #4
0
        private void addLoginOper(DXInfo.Models.tbLogin tbLogin)
        {
            int count = Uow.tbLogin.GetAll().Where(w => w.vcLoginID == tbLogin.vcLoginID || w.vcOperName == tbLogin.vcOperName).Count();

            if (count > 0)
            {
                throw new BusinessException("登录ID或者操作员名称重复");
            }
            tbLogin.vcPwd = "123456";
            Uow.tbLogin.Add(tbLogin);
            Uow.Commit();

            centerCommon.SyncOper();
        }