示例#1
0
        public JsonResult Update(OrgUserViewModel model)
        {
            try
            {
                OrgUserModel orgUserModel = orgUserBll.GetModel(model.UserID, model.OrgID);
                orgUserModel.UserID = model.UserID;
                orgUserModel.OrgID  = model.OrgID;

                orgUserBll.Update(orgUserModel);
                return(Json(new { code = 200 }));
            }
            catch (Exception ex)
            {
                return(Json(new { code = 500, msg = ex.Message }));
            }
        }
示例#2
0
        public JsonResult Insert(OrgUserViewModel model)
        {
            try
            {
                OrgUserModel orgUserModel = new OrgUserModel();
                orgUserModel.UserID = model.UserID;
                orgUserModel.OrgID  = model.OrgID;

                orgUserBll.Insert(orgUserModel);
                return(Json(new { code = 200 }));
            }
            catch (Exception ex)
            {
                return(Json(new { code = 500, msg = ex.Message }));
            }
        }