public object Options([FromBody] ManagerInfo model) { if (string.IsNullOrWhiteSpace(model.AdminPasswd)) { return(new { result = Result.ValueCanNotBeNull }); } ManagerInfo mi = ManagerInfoBLL.GetModelByID(model); if (mi.AdminPasswd == Utils.MD5(model.AdminPasswd)) { return(new { result = Result.Normal }); } model.AdminMasterRight = mi.AdminMasterRight; model.AdminAccount = mi.AdminAccount; model.AdminPasswd = Utils.MD5(model.AdminPasswd); int result = ManagerInfoBLL.Update(model); if (result > 0) { return(new { result = Result.Normal }); } return(new { result = 4 }); }