コード例 #1
0
        public ActionResult UserCar(VIEW_FW_USER user)
        {
            var currUser = VIEW_FW_USER.ToEntity(user);

            bool status = false;

            try
            {
                //UserInfoManager.Add(currUser);
                status = true;
            }
            catch (Exception e)
            {
                return(this.JsonFormat(status, status, SysOperate.Add));
            }
            return(this.JsonFormat(status, status, SysOperate.Add));
        }
コード例 #2
0
ファイル: UserController.cs プロジェクト: shengshihai/SSHBM
        public ActionResult Add(VIEW_FW_USER user)
        {
            var currUser = VIEW_FW_USER.ToEntity(user);

            bool status = false;

            try
            {
                currUser.CREATE_BY = OperateContext.Current.UsrId;
                currUser.CREATE_DT = DateTime.Now;
                currUser.PASSWD    = Common.MD5Provider.Hash(user.PASSWD);
                currUser.ACTIVE    = "Y";
                UserInfoManager.Add(currUser);
                status = true;
            }
            catch (Exception e)
            {
                return(this.JsonFormat(status, status, SysOperate.Add));
            }
            return(this.JsonFormat("/Admin/User/UserInfo", status, SysOperate.Add.ToMessage(status), status));
        }
コード例 #3
0
ファイル: UserController.cs プロジェクト: shengshihai/SSHBM
        public ActionResult Update(VIEW_FW_USER user)
        {
            var  model  = VIEW_FW_USER.ToEntity(user);
            bool status = false;

            if (!ModelState.IsValid)
            {
                return(this.JsonFormat(ModelState, status, "ERROR"));
            }
            try
            {
                model.PASSWD          = Common.MD5Provider.Hash(user.PASSWD);
                model.LAST_UPDATED_DT = DateTime.Now;
                model.MODIFY_DT       = DateTime.Now;
                model.MODIFY_BY       = OperateContext.Current.UsrId;
                UserInfoManager.Modify(model, "USER_NAME", "EMAIL", "ENG_NAME", "PHONE", "LAST_UPDATED_DT", "MODIFY_BY", "MODIFY_DT", "PASSWD");
                status = true;
            }
            catch (Exception e)
            {
                return(this.JsonFormat(status, status, SysOperate.Update));
            }
            return(this.JsonFormat("/Admin/User/UserInfo", status, SysOperate.Update.ToMessage(status), status));
        }