public void GetDic(Action<List<SysDictionary>> callback, string groupName) { if (_localDb.ContainsKey(groupName)) { if (callback!=null) { callback(_localDb[groupName]); } } else { QualityReportClient client = new QualityReportClient(); client.QueryDictAsync(groupName); client.QueryDictCompleted += (s, e) => { if (e.Error==null) { if (callback!=null) { callback(e.Result.ToList()); } _localDb[groupName] = e.Result.ToList(); } }; } }
public void GetDic(Action <List <SysDictionary> > callback, string groupName) { if (_localDb.ContainsKey(groupName)) { if (callback != null) { callback(_localDb[groupName]); } } else { QualityReportClient client = new QualityReportClient(); client.QueryDictAsync(groupName); client.QueryDictCompleted += (s, e) => { if (e.Error == null) { if (callback != null) { callback(e.Result.ToList()); } _localDb[groupName] = e.Result.ToList(); } }; } }
private void Search() { Loading = true; QualityReportClient client = new QualityReportClient(); client.GetAllWorkOrderAsync(new OrderClause() { WorkId = SearchText, PageSize = PageSize, PageIndex = _currentPageIndex }); client.GetAllWorkOrderCompleted += (s, e) => { Loading = false; if (e.Error == null) { WorkOrders = e.Result.ToList(); if (WorkOrders.Any()) { ReCordCount = WorkOrders.First().WorkSubItemGroup.RecordCount; } else { ReCordCount = 0; } } else { ReCordCount = 0; } }; }
public void Initial(WorkDetailInfoEntity order) { QualityReportClient client = new QualityReportClient(); client.GetWorkReportAsync((int)order.WorkId.Value, (int)order.WorkSubItemGroup.Id); client.GetWorkReportCompleted += (s, e) => { if (e.Error == null) { Initial(e.Result.ToList()); } }; }
private void Search() { Loading = true; QualityReportClient client = new QualityReportClient(); client.GetAllWorkOrderAsync(new OrderClause() { WorkId = SearchText, PageSize = PageSize, PageIndex = _currentPageIndex }); client.GetAllWorkOrderCompleted += (s, e) => { Loading = false; if (e.Error==null) { WorkOrders = e.Result.ToList(); if (WorkOrders.Any()) { ReCordCount = WorkOrders.First().WorkSubItemGroup.RecordCount; } else { ReCordCount = 0; } } else { ReCordCount = 0; } }; }
public void Initial(WorkDetailInfoEntity order) { QualityReportClient client = new QualityReportClient(); client.GetWorkReportAsync((int)order.WorkId.Value,(int)order.WorkSubItemGroup.Id); client.GetWorkReportCompleted += (s, e) => { if (e.Error==null) { Initial(e.Result.ToList()); } }; }