private async void GetImproveResult(string itemNae, string startDate, string endDate, int userId, string statueType, string statue, int serviceId, int departmentId, int planid, string sourceType) { try { _commonFun.ShowLoading("查询中..."); //TO-DO var result = await improveService.GetResult(itemNae, startDate, endDate, userId, statueType, statue, serviceId, departmentId, planid, sourceType); if (result.ResultCode == Module.ResultType.Success) { List <ImprovementMngDto> improveResultInfo = CommonHelper.DecodeString <List <ImprovementMngDto> >(result.Body); if (improveResultInfo != null && improveResultInfo.Count > 0) { _commonFun.HideLoading(); ImprovePlansOrResults = improveResultInfo; } else { _commonFun.HideLoading(); ImprovePlansOrResults = new List <ImprovementMngDto>(); _commonFun.ShowToast("没有数据"); } } else { _commonFun.HideLoading(); ImprovePlansOrResults = new List <ImprovementMngDto>(); _commonFun.AlertLongText("查询失败,请重试。 " + result.Msg); } } catch (OperationCanceledException) { _commonFun.HideLoading(); ImprovePlansOrResults = new List <ImprovementMngDto>(); _commonFun.AlertLongText("请求超时。"); } catch (Exception) { _commonFun.HideLoading(); ImprovePlansOrResults = new List <ImprovementMngDto>(); _commonFun.AlertLongText("查询异常,请重试。"); } finally { _commonFun.HideLoading(); } }
private async Task GetImproveDitstriLst(string arg) { if (_commonHelper.IsNetWorkConnected() == true) { try { if (arg != "R") { _commonFun.ShowLoading("查询中..."); } int userId = Int32.Parse(CommonContext.Account.UserId); // TO-DO var result = await _improveService.GetResult("", "19000101", "99991231", userId, "A", "A", 0, 0, 0, ""); if (result.ResultCode == Module.ResultType.Success) { List <ImprovementMngDto> improvePlanInfo = CommonHelper.DecodeString <List <ImprovementMngDto> >(result.Body); if (improvePlanInfo != null && improvePlanInfo.Count > 0) { ImproveDistriLst = improvePlanInfo; _commonFun.HideLoading(); } else { _commonFun.HideLoading(); ImproveDistriLst = new List <ImprovementMngDto>(); _commonFun.ShowToast("没有数据"); } } else { _commonFun.HideLoading(); ImproveDistriLst = new List <ImprovementMngDto>(); _commonFun.AlertLongText("查询失败,请重试。 " + result.Msg); } } catch (OperationCanceledException) { _commonFun.HideLoading(); ImproveDistriLst = new List <ImprovementMngDto>(); _commonFun.AlertLongText("请求超时。"); } catch (Exception) { _commonFun.HideLoading(); ImproveDistriLst = new List <ImprovementMngDto>(); _commonFun.AlertLongText("查询异常,请重试。"); } finally { _commonFun.HideLoading(); } } else { _commonFun.AlertLongText("网络连接异常。"); } }
public async void GetImproveResultOrResultApproval() { try { if (CommonContext.Account.UserType == "A" || CommonContext.Account.UserType == "R") { return; } _commonFun.ShowLoading("查询中..."); //TO-DO APIResult result = new APIResult(); if (CommonContext.Account.UserType == "D") { result = await improveService.GetResult("", "19000101", "99991231", Convert.ToInt32(CommonContext.Account.UserId), "R", "A,D", 0, 0, 0); } else if (CommonContext.Account.UserType == "S") { result = await improveService.GetResult("", "19000101", "99991231", Convert.ToInt32(CommonContext.Account.UserId), "R", "C,F", 0, 0, 0); } else if (CommonContext.Account.UserType == "Z") { result = await improveService.GetResult("", "19000101", "99991231", Convert.ToInt32(CommonContext.Account.UserId), "R", "E", 0, 0, 0); } if (result.ResultCode == Module.ResultType.Success) { List <ImprovementMngDto> improveResultInfo = CommonHelper.DecodeString <List <ImprovementMngDto> >(result.Body); if (improveResultInfo != null && improveResultInfo.Count > 0) { _commonFun.HideLoading(); //ImproveResults = improveResultInfo; ImprovePlansOrResults = improveResultInfo; } else { _commonFun.HideLoading(); ImprovePlansOrResults = new List <ImprovementMngDto>(); _commonFun.ShowToast("没有数据"); } } else { _commonFun.HideLoading(); ImprovePlansOrResults = new List <ImprovementMngDto>(); _commonFun.AlertLongText("查询失败,请重试。 " + result.Msg); } } catch (OperationCanceledException) { _commonFun.HideLoading(); ImprovePlansOrResults = new List <ImprovementMngDto>(); _commonFun.AlertLongText("请求超时。"); } catch (Exception) { _commonFun.HideLoading(); ImprovePlansOrResults = new List <ImprovementMngDto>(); _commonFun.AlertLongText("查询异常,请重试。"); } finally { _commonFun.HideLoading(); } }