/// <summary> /// 修改组织 /// </summary> /// <param name="model"></param> /// <returns></returns> public JsonResult UpdateRolesO(Role model) { string json = Newtonsoft.Json.JsonConvert.SerializeObject(model); var result = HelperHttpClient.GetAll("post", "Organization/UpdateRolesO", json); return(Json(result)); }
/// <summary> /// 反填权限 /// </summary> /// <param name="userId"></param> /// <returns></returns> public List <Userrole> GetUserroleById(int userId) { var result = HelperHttpClient.GetAll("get", "Authorization/GetUserroleById?userId=" + userId, null); List <Userrole> userrole = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Userrole> >(result); return(userrole); }
/// <summary> /// 添加人员 角色 /// </summary> /// <param name="rp"></param> /// <returns></returns> public JsonResult AddUserrole(UserRoleDto rp) { string json = Newtonsoft.Json.JsonConvert.SerializeObject(rp); var result = HelperHttpClient.GetAll("post", "Authorization/AddUserrole", json); return(Json(result)); }
/// <summary> /// 审批流程 /// </summary> /// <param name="goalId"></param> /// <returns></returns> public JsonResult GetApprFlowList(int goalId) { var result = HelperHttpClient.GetAll("get", "Audit/GetApprFlowList?goalId=" + goalId, null); var apprOpinionList = Newtonsoft.Json.JsonConvert.DeserializeObject <List <ApprOpinion> >(result); return(Json(apprOpinionList)); }
/// <summary> /// 绑定左侧下拉 /// </summary> /// <param name="Power_PId"></param> /// <returns></returns> public List <PowerDto> GetPowersByPid(int UserId, int Power_PId) { var result = HelperHttpClient.GetAll("get", "Audit/GetPowersByPid?Power_PId=" + Power_PId + "&UserId=" + UserId, null); List <PowerDto> list = Newtonsoft.Json.JsonConvert.DeserializeObject <List <PowerDto> >(result); return(list); }
/// <summary> /// 运行情况表格 /// </summary> /// <returns></returns> public JsonResult GetRunCondition() { var list = HelperHttpClient.GetAll("get", "WaitRead/GetRunConditionList"); var condition = JsonConvert.DeserializeObject <List <GoalStateGoal> >(list); return(Json(condition)); }
public JsonResult AddR(SchedulingRules schedulingRules) { string jsonm = Newtonsoft.Json.JsonConvert.SerializeObject(schedulingRules); var result = HelperHttpClient.GetAll("post", "/api/SchedulingRules", jsonm); return(Json(result)); }
/// <summary> /// 添加到配置表 /// </summary> /// <param name="json"></param> /// <returns></returns> public JsonResult AddrConfiguration(ApprconfigurationDto apprconfigurationDto) { string json = Newtonsoft.Json.JsonConvert.SerializeObject(apprconfigurationDto); var target = HelperHttpClient.GetAll("post", "Audit/AddrConfiguration", json); return(Json(target)); }
/// <summary> /// 添加进展表 /// </summary> /// <param name="feedback"></param> /// <returns></returns> public JsonResult AddFeedBack(Feedback feedback) { string json = Newtonsoft.Json.JsonConvert.SerializeObject(feedback); var target = HelperHttpClient.GetAll("post", "Audit/AddFeedBack", json); return(Json(target)); }
/// <summary> /// 用户积分 /// </summary> /// <param name="id"></param> /// <returns></returns> public JsonResult GetIntergalUser(int id) { try { List <int> datacount = new List <int>(); List <string> dataname = new List <string>(); var model = HelperHttpClient.GetAll("get", "WaitRead/GetUserIntergal?id=" + id, null); var list = JsonConvert.DeserializeObject <List <UserIntegral> >(model).OrderByDescending(m => m.Integral_Num); EchartModel echartModel = new EchartModel(); foreach (var item in list) { echartModel.name = item.User_Name; echartModel.value = item.Integral_Num; datacount.Add(echartModel.value); dataname.Add(echartModel.name); } echartModel.dataname = dataname; echartModel.datacount = datacount; return(Json(echartModel)); } catch (Exception) { return(null); } }
public JsonResult Adds(ShiftsSetting shiftsSetting) { string jsonm = Newtonsoft.Json.JsonConvert.SerializeObject(shiftsSetting); var result = HelperHttpClient.GetAll("post", "/api/annount", jsonm); return(Json(result)); }
/// <summary> /// 待办 已办 待阅 /// </summary> /// <param name="id"></param> /// <param name="state"></param> /// <returns></returns> public JsonResult GetWaitDoList(int id, int state) { var data = HelperHttpClient.GetAll("get", "WaitRead/GetWaitReadList?id=" + id + "&state=" + state, null); var list = JsonConvert.DeserializeObject <List <WaitRead> >(data); return(Json(list)); }
/// <summary> /// 红绿灯状态表格 /// </summary> /// <returns></returns> public JsonResult GetBusinessStateTableList() { var list = HelperHttpClient.GetAll("get", "WaitRead/GetBusinessStateTable"); var statelist = JsonConvert.DeserializeObject <List <BusinessStateTable> >(list); return(Json(statelist)); }
public JsonResult Adds(Role role) { string json = Newtonsoft.Json.JsonConvert.SerializeObject(role); var result = HelperHttpClient.GetAll("post", "/api/Role", json); return(Json(result)); }
/// <summary> /// 根据目标id获取目标审核人 /// </summary> /// <param name="id"></param> /// <returns></returns> public JsonResult GetUserNameByGoalId(int id) { var userlist = HelperHttpClient.GetAll("get", "GoalManage/GetUserNameByGoalId?id=" + id, null); var list = JsonConvert.DeserializeObject <List <AuditUser> >(userlist); return(Json(list)); }
/// <summary> /// 获取公司列表 责任单位 部门 /// </summary> /// <returns></returns> public JsonResult GetDutyCommanyList() { var commany = HelperHttpClient.GetAll("get", "GoalManage/GetDutyCommanyList", null); var list = JsonConvert.DeserializeObject <List <Role> >(commany); return(Json(list)); }
/// <summary> /// 目标管理 根据目标id查询目标详情页面 /// </summary> /// <param name="id"></param> /// <returns></returns> public JsonResult GetGoalDetailsById(int id) { var target = HelperHttpClient.GetAll("get", "WaitRead/GetTargetDetailById?id=" + id, null); var list = JsonConvert.DeserializeObject <List <TargetDetails> >(target); return(Json(list)); }
/// <summary> /// 获取目标类型 子集 /// </summary> /// <returns></returns> public JsonResult GetGoalChildTypeList() { var goaltype = HelperHttpClient.GetAll("get", "GoalManage/GetChildType", null); var list = JsonConvert.DeserializeObject <List <Goaltype> >(goaltype); return(Json(list)); }
public JsonResult Adds(Crewscheduling crewscheduling) { string jsonm = Newtonsoft.Json.JsonConvert.SerializeObject(crewscheduling); var result = HelperHttpClient.GetAll("post", "/api/Crewscheduling", jsonm); return(Json(result)); }
/// <summary> /// 获取协办人 /// </summary> /// <returns></returns> public JsonResult GetDothingUserList() { var dothinguser = HelperHttpClient.GetAll("get", "GoalManage/GetDothingUserList", null); var list = JsonConvert.DeserializeObject <List <User> >(dothinguser); return(Json(list)); }
/// <summary> /// 登录方法 /// </summary> /// <returns></returns> public int LoginIn() { var name = Request.Form["name"]; var pass = Request.Form["pwd"]; string action = string.Format("Login/Login?UserName={0}&UserPass={1}", name, pass); var result = HelperHttpClient.GetAll("get", action, null); if (result != null && result != "") { LoginModel user = (LoginModel)JsonConvert.DeserializeObject(result, typeof(LoginModel)); var power = string.Format("Login/GetPower?UserId={0}", user.userId); var jurdata = HelperHttpClient.GetAll("get", power, null); // 实例化DataContractJsonSerializer对象,需要待序列化的对象类型 DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(List <PowerList>)); //把Json传入内存流中保存 MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(jurdata)); // 使用ReadObject方法反序列化成对象 object ob = serializer.ReadObject(stream); List <PowerList> ls = (List <PowerList>)ob; var loginModel = new LoginModel { userId = user.userId, userName = user.userName, PowerList = ls, userRealName = user.userRealName }; WriteCookie(loginModel); return(1); } return(0); }
/// <summary> /// 查询指标等级 /// </summary> /// <returns></returns> public JsonResult GetIndexlevelList() { var indexleave = HelperHttpClient.GetAll("get", "GoalManage/GetIndexlevelList", null); var list = JsonConvert.DeserializeObject <List <Indexlevel> >(indexleave); return(Json(list)); }
/// <summary> /// 审批 /// </summary> /// <param name="appractivity"></param> /// <returns></returns> public JsonResult Audit(AuditauditDto appractivity) { string json = Newtonsoft.Json.JsonConvert.SerializeObject(appractivity); var result = HelperHttpClient.GetAll("post", "Audit/Audit", json); return(Json(result)); }
/// <summary> /// 目标管理 ztree树 /// </summary> /// <returns></returns> public JsonResult GetJsonGoalTree() { var list = HelperHttpClient.GetAll("get", "GoalManage/GetGoalList", null); var goallist = JsonConvert.DeserializeObject <List <Goal> >(list).OrderBy(m => m.GoalCreateTime); return(Json(goallist)); }
/// <summary> /// 反填角色 /// </summary> /// <param name="userId"></param> /// <returns></returns> public User GetUserById(int userId) { var result = HelperHttpClient.GetAll("get", "Authorization/GetUserById?userId=" + userId, null); User user = Newtonsoft.Json.JsonConvert.DeserializeObject <User>(result); return(user); }
/// <summary> /// 查询反馈频次 /// </summary> /// <returns></returns> public JsonResult GetFrequencieList() { var frequency = HelperHttpClient.GetAll("get", "GoalManage/GetFrequencieList", null); var list = JsonConvert.DeserializeObject <List <Frequency> >(frequency); return(Json(list)); }
/// <summary> /// 显示所有人员 /// </summary> /// <returns></returns> public List <Role> GetRolesRList() { var result = HelperHttpClient.GetAll("get", "Organization/GetRolesRList", null); var list = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Role> >(result); return(list); }
/// <summary> /// 根据目标id获取指标分解表数据 /// </summary> /// <param name="id"></param> /// <returns></returns> public JsonResult GetIndexsByGoalId(int id) { var indexlist = HelperHttpClient.GetAll("get", "GoalManage/GetIndexsByGoalId?id=" + id, null); var list = JsonConvert.DeserializeObject <List <Indexs> >(indexlist); return(Json(list)); }
public IActionResult Adds(SolitaireSet solitaireSet) { string jsonm = Newtonsoft.Json.JsonConvert.SerializeObject(solitaireSet); var result = HelperHttpClient.GetAll("post", "/api/solitaireSet", jsonm); return(Json(result)); }
/// <summary> /// 反填权限 /// </summary> /// <param name="roleId"></param> /// <returns></returns> public List <Rolepower> GetRolepowerById(int roleId) { var result = HelperHttpClient.GetAll("get", "Organization/GetRolepowerById?roleId=" + roleId, null); List <Rolepower> rolepower = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Rolepower> >(result); return(rolepower); }