Esempio n. 1
0
 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();
             }
         };
     }
 }
Esempio n. 2
0
 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();
             }
         };
     }
 }
Esempio n. 3
0
        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;
                }
            };
        }
Esempio n. 4
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());
                }
            };
        }
Esempio n. 5
0
        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());
                }

            };
        }