private void InitData(ComboBoxSearchModel org, ObservableCollection <CustomerSchedulingOrgLabelModel> orgLabelList)
        {
            Organization           = org;
            CustomerSchedulingDate = new CustomerSchedulingDateModel {
                Date1 = DateTime.Now.AddDays(1).Date, Date2 = DateTime.Now.AddDays(2).Date, Date3 = DateTime.Now.AddDays(3).Date, Date4 = DateTime.Now.AddDays(4).Date, Date5 = DateTime.Now.AddDays(5).Date
            };
            Service.GetCustomerSchedulingDetailLists(Organization.Id, DateTime.Now.Date, Label).ForEach(x => CustomerSchedulingDetailLists.Add(x));

            Task.Factory.StartNew(() =>
            {
                UIExecute.RunAsync(() =>
                {
                    if (orgLabelList.Count == 0)
                    {
                        Service.GetCustomerSchedulingSummaryLists(org.Id, DateTime.Now.Date).ForEach(x => OrgLabelLists.Add(new CustomerSchedulingOrgLabelModel {
                            FItemId = x.FItemId, Label = x.Label, OrgCode = x.OrgCode, OrgId = x.OrgId, ProductionName = x.ProductionName
                        }));
                    }
                    else
                    {
                        OrgLabelLists = orgLabelList;
                    }
                });
            });
        }
 public CustomerSchedulingManagementViewModel(ComboBoxSearchModel org, ObservableCollection <CustomerSchedulingOrgLabelModel> orgLabelList)
 {
     InitCommand();
     //InitData(org,orgLabelList);
     Organization           = org;
     CustomerSchedulingDate = new CustomerSchedulingDateModel {
         Date1 = DateTime.Now.AddDays(1).Date, Date2 = DateTime.Now.AddDays(2).Date, Date3 = DateTime.Now.AddDays(3).Date, Date4 = DateTime.Now.AddDays(4).Date, Date5 = DateTime.Now.AddDays(5).Date
     };
     Service.GetCustomerSchedulingDetailLists(Organization.Id, DateTime.Now.Date, Label).ForEach(x => CustomerSchedulingDetailLists.Add(x));
     if (orgLabelList.Count == 0)
     {
         Service.GetCustomerSchedulingSummaryLists(org.Id, DateTime.Now.Date).ForEach(x => OrgLabelLists.Add(new CustomerSchedulingOrgLabelModel {
             FItemId = x.FItemId, Label = x.Label, OrgCode = x.OrgCode, OrgId = x.OrgId, ProductionName = x.ProductionName
         }));
     }
     else
     {
         OrgLabelLists = orgLabelList;
     }
 }