public SearchChequeViewModel() { if (!IsDesignTime) { Glclient = new GlServiceClient(); MainRowList = new SortableCollectionView <TblBankCheque>(); SelectedMainRow = new TblBankCheque(); Glclient.CreateChequeCompleted += (s, sv) => GetMaindata(); Glclient.GetTblBankChequeCompleted += (s, sv) => { foreach (var row in sv.Result) { MainRowList.Add(row); } if (Bank != 0 && ValuesObjects != null && (!MainRowList.Any() && ValuesObjects.ContainsKey("Cheque0"))) { var res = MessageBox.Show("This Cheque is Not Found Do You Want To Create It ?", "Create Cheque", MessageBoxButton.OKCancel); if (res == MessageBoxResult.OK) { Glclient.CreateChequeAsync(Bank, (long)ValuesObjects.FirstOrDefault(w => w.Key == "Cheque0").Value, 1, LoggedUserInfo.DatabasEname); } } Loading = false; FullCount = sv.fullCount; }; } }
public RouteHeaderSearchViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <RouteCardService.RouteCardHeader>(); SelectedMainRow = new RouteCardHeader(); RouteCardService.GetRouteCardHeadersCompleted += (s, sv) => { foreach (var row in sv.Result) { VendorList = sv.Vendors; MainRowList.Add(row); } Loading = false; }; RouteCardService.GetRouteCardHeadersBeforeInspectionCompleted += (s, sv) => { foreach (var row in sv.Result) { MainRowList.Add(row); } Sizes = sv.sizes; Loading = false; }; } }
public SearchFabricViewModel() { if (!DesignerProperties.IsInDesignTool) { Client = new CRUD_ManagerServiceClient(); MainRowList = new SortableCollectionView <tbl_FabricAttriputes>(); SelectedMainRow = new tbl_FabricAttriputes(); Client.GetTblFabricAttriputesCompleted += (s, sv) => { foreach (var row in sv.Result) { MainRowList.Add(row); } Loading = false; FullCount = sv.fullCount; }; GetMaindata(); } }
// ReSharper disable once InconsistentNaming public LedgerAttachmentViewModel(TblLedgerHeaderViewModel Row) { HeaderRow = Row; MainRowList = new SortableCollectionView <GlLedgerAttachmentViewModel>(); SelectedMainRow = new GlLedgerAttachmentViewModel(); Glclient.GetTblLedgerHeaderAttachmentCompleted += (s, sv) => { MainRowList.Clear(); foreach (var row in sv.Result) { var newrow = new GlLedgerAttachmentViewModel(); newrow.InjectFrom(row); MainRowList.Add(newrow); } Loading = false; }; Glclient.GetTblLedgerHeaderAttachmentAsync(HeaderRow.Iserial); Glclient.UpdateOrInsertTblLedgerHeaderAttachmentCompleted += (s, x) => Glclient.GetTblLedgerHeaderAttachmentAsync(HeaderRow.Iserial); Glclient.DeleteTblLedgerHeaderAttachmentCompleted += (s, ev) => { if (ev.Error != null) { throw ev.Error; } var oldrow = MainRowList.FirstOrDefault(x => x.Iserial == ev.Result); if (oldrow != null) { MainRowList.Remove(oldrow); } }; }
public TblGlobalRetailBusinessBudgetViewModel() { var names = new[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; MonthTotallist = new ObservableCollection <GlobalRetailBusinessBudgetViewModel.MonthTotal>(); for (int i = 1; i < names.Count() + 1; i++) { MonthTotallist.Add(new GlobalRetailBusinessBudgetViewModel.MonthTotal { Month = i, Amount = 0 }); } DetailsList = new SortableCollectionView <TblGlobalRetailBusinessBudgetMainDetailViewModel>(); DetailsList.CollectionChanged += DetailsList_CollectionChanged; DetailsList.Add(new TblGlobalRetailBusinessBudgetMainDetailViewModel()); AddTotalRow(); TransDate = DateTime.Now; Year = DateTime.Now.Year; }
public void GetEmpByStore() { if (LoggedUserInfo.Store != null) { StorePerRow = new TblStore().InjectFrom(LoggedUserInfo.Store) as TblStore; } StoreList = new SortableCollectionView <TblStore>(); if (LoggedUserInfo.AllowedStores != null && LoggedUserInfo.Company.Code != "HQ") { Client.SearchBysStoreNameAsync(new ObservableCollection <int>(LoggedUserInfo.AllowedStores), LoggedUserInfo.Iserial, null, null, LoggedUserInfo.DatabasEname); } Client.SearchBysStoreNameCompleted += (s, sv) => { StoreList = sv.Result; if (StoreList != null && StoreList.Count == 1) { StorePerRow = StoreList.FirstOrDefault(); } }; Loading = true; }
public FabricBomViewModel(FabricSetupsWFViewModel viewModel) { if (!DesignerProperties.IsInDesignTool) { _fabricViewModel.InjectFrom(viewModel); MainRowList = new SortableCollectionView <TblFabricBomViewModel>(); SelectedMainRow = new TblFabricBomViewModel(); Client.GetTblFabricBomCompleted += (s, sv) => { foreach (var row in sv.Result) { var newrow = new TblFabricBomViewModel { ItemPerRow = new ItemsDto() }; var ItemRow = sv.FabricServiceList.FirstOrDefault( x => x.Iserial == row.Item && x.ItemGroup == row.ItemType); newrow.ItemPerRow.Code = ItemRow.Code; newrow.ItemPerRow.Name = ItemRow.Name; newrow.ItemPerRow.Unit = ItemRow.Unit; newrow.ItemPerRow.ItemGroup = ItemRow.ItemGroup; newrow.InjectFrom(row); MainRowList.Add(newrow); } Loading = false; FullCount = sv.fullCount; if (FullCount == 0 && MainRowList.Count == 0) { AddNewMainRow(false); } }; Client.UpdateOrInsertTblFabricBomCompleted += (s, x) => { var savedRow = (TblFabricBomViewModel)MainRowList.GetItemAt(x.outindex); if (savedRow != null) { savedRow.InjectFrom(x.Result); } }; Client.DeleteTblFabricBomCompleted += (s, ev) => { if (ev.Error != null) { throw ev.Error; } var oldrow = MainRowList.FirstOrDefault(x => x.Iserial == ev.Result); if (oldrow != null) { MainRowList.Remove(oldrow); } }; } }
public ExcuseRuleViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <TblExcuseRuleViewModel>(); SelectedMainRow = new TblExcuseRuleViewModel(); AttService.AxPeriodsCompleted += (s, sv) => { PeriodList = sv.Result; }; AttService.AxPeriodsAsync(); AttService.ExcuseTypeCompleted += (s, sv) => { ExcuseTypeList = sv.Result; }; AttService.ExcuseTypeAsync(); AttService.GetTblExcuseRuleCompleted += (s, sv) => { foreach (var row in sv.Result) { var newrow = new TblExcuseRuleViewModel(); newrow.InjectFrom(row); MainRowList.Add(newrow); } Loading = false; FullCount = sv.fullCount; if (FullCount == 0 && MainRowList.Count == 0) { AddNewMainRow(false); } }; AttService.UpdateOrInsertTblExcuseRuleCompleted += (s, x) => { var savedRow = (TblExcuseRuleViewModel)MainRowList.ElementAt(x.outindex); if (savedRow != null) { savedRow.InjectFrom(x.Result); } }; AttService.DeleteTblExcuseRuleCompleted += (s, ev) => { if (ev.Error != null) { throw ev.Error; } var oldrow = MainRowList.FirstOrDefault(x => x.Iserial == ev.Result); if (oldrow != null) { MainRowList.Remove(oldrow); } }; GetMaindata(); } }
public RouteFreeIssueViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <RouteCardFabricViewModel>(); SalesOrderList = new SortableCollectionView <TblSalesOrder>(); } }
public ServiceCodingViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <TblServiceViewModel>(); SelectedMainRow = new TblServiceViewModel(); var tblAssetsTypeclient = new CRUD_ManagerServiceClient(); tblAssetsTypeclient.GetGenericAsync("TblServiceGroup", "%%", "%%", "%%", "Iserial", "ASC"); tblAssetsTypeclient.GetGenericCompleted += (s, sv) => { ServiceGroupList = sv.Result; }; Client.GetTblServiceCompleted += (s, sv) => { foreach (var row in sv.Result) { var newrow = new TblServiceViewModel(); newrow.InjectFrom(row); MainRowList.Add(newrow); } Loading = false; FullCount = sv.fullCount; if (FullCount == 0 && MainRowList.Count == 0) { AddNewMainRow(false); } }; Client.UpdateOrInsertTblServiceCompleted += (s, x) => { var savedRow = (TblServiceViewModel)MainRowList.GetItemAt(x.outindex); if (savedRow != null) { savedRow.InjectFrom(x.Result); } }; Client.DeleteTblServiceCompleted += (s, ev) => { if (ev.Error != null) { throw ev.Error; } var oldrow = MainRowList.FirstOrDefault(x => x.Iserial == ev.Result); if (oldrow != null) { MainRowList.Remove(oldrow); } }; GetMaindata(); } }
public AttachmentModel(string TableName, int masterId) { this.TableName = TableName; this.MasterId = masterId; MainRowList = new SortableCollectionView <AttachmentViewModel>(); SelectedMainRow = new AttachmentViewModel(); assistanceClient.GetAttachmentCompleted += (s, sv) => { MainRowList.Clear(); foreach (var row in sv.Result) { var newrow = new AttachmentViewModel(); newrow.InjectFrom(row); MainRowList.Add(newrow); } Loading = false; }; assistanceClient.UpdateOrInsertAttachmentCompleted += (s, sv) => { FolderPath = "/Uploads" + "/" + sv.FolderPath; var folderName = FolderPath;// + "/" + Style.SeasonPerRow.Ename + "_" + Style.Brand + "_" + Style.SectionPerRow.Ename; //var counter = 0; foreach (var item in MainRowList) { if (item.Iserial == 0) { var oldItem = sv.Result.FirstOrDefault(r => r.OrginalFileName == item.OrginalFileName); if (oldItem != null) { item.Path = oldItem.Path; item.FolderPath = folderName; item.UploadFile(item.AttachmentPerRow); } //counter++; } } }; assistanceClient.GetAttachmentAsync(TableName, MasterId); //assistanceClient.UpdateOrInsertAttachmentCompleted += (s, x) => assistanceClient.GetAttachmentAsync(TableName); assistanceClient.DeleteAttachmentCompleted += (s, ev) => { if (ev.Error != null) { throw ev.Error; } var oldrow = MainRowList.FirstOrDefault(x => x.Iserial == ev.Result); if (oldrow != null) { MainRowList.Remove(oldrow); } }; }
public TblBrandBudgetsHeaderViewModel() { DetailsList = new SortableCollectionView <TblBrandBudgetDetailViewModel> { new TblBrandBudgetDetailViewModel() }; AddTotalRow(); TransDate = DateTime.Now; }
public SearchAssetsTransactionViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <TblAssetsTransactionViewModel>(); SelectedMainRow = new TblAssetsTransactionViewModel(); Client.GetTblAssetsTransactionCompleted += (s, sv) => { foreach (var row in sv.Result) { if (sv.Stores != null) { var newrow = new TblAssetsTransactionViewModel { StorePerRow = sv.Stores.FirstOrDefault( x => x.Code == row.StoreCode && x.Organization == row.OrganizationId) }; var tempEmp = sv.employees.FirstOrDefault(x => x.EMPLID == row.Empid); if (tempEmp != null) { newrow.EmpPerRow = new EmployeesView { Emplid = row.Empid, Name = tempEmp.name }; } newrow.AssetPerRow.InjectFrom(row.TblAsset); newrow.InjectFrom(row); MainRowList.Add(newrow); } } Loading = false; FullCount = sv.fullCount; if (MainRowList.Any() && (SelectedMainRow == null || SelectedMainRow.Iserial == 0)) { SelectedMainRow = MainRowList.FirstOrDefault(); } if (Export) { Export = false; //var handler = ExportCompleted; //if (handler != null) handler(this, EventArgs.Empty); //ExportGrid.ExportExcel("Style"); } }; GetMaindata(); } }
public GeneratePurchaseHeaderCurrenciesViewModel(int generatePurchaseHeader) { if (!DesignerProperties.IsInDesignTool) { _generatepurchasehaderIserial = generatePurchaseHeader; GetItemPermissions(PermissionItemName.GeneratePurchase.ToString()); MainRowList = new SortableCollectionView <TblGeneratePurchaseHeaderCurrenciesViewModel>(); SelectedMainRow = new TblGeneratePurchaseHeaderCurrenciesViewModel(); Client.GetTblCurrencyCompleted += (s, sv) => { CurrencyList = sv.Result; }; Client.GetTblCurrencyAsync(0, int.MaxValue, "it.Iserial", null, null); GetMaindata(); Client.TblGeneratePurchaseHeaderCurrencyCompleted += (s, sv) => { foreach (var row in sv.Result) { var newrow = new TblGeneratePurchaseHeaderCurrenciesViewModel(); newrow.InjectFrom(row); MainRowList.Add(newrow); } Loading = false; FullCount = sv.fullCount; if (FullCount == 0 && MainRowList.Count == 0) { AddNewMainRow(false); } }; Client.UpdateOrInsertTblGeneratePurchaseHeaderCurrencyCompleted += (s, x) => { var savedRow = (TblGeneratePurchaseHeaderCurrenciesViewModel)MainRowList.GetItemAt(x.outindex); Loading = false; if (savedRow != null) { savedRow.InjectFrom(x.Result); } }; Client.DeleteTblGeneratePurchaseHeaderCurrencyCompleted += (s, ev) => { if (ev.Error != null) { throw ev.Error; } Loading = false; var oldrow = MainRowList.FirstOrDefault(x => x.Iserial == ev.Result); if (oldrow != null) { MainRowList.Remove(oldrow); } }; } }
public FingerPrintTransactionViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <FingerPrintTransactionModel>(); SelectedMainRow = new FingerPrintTransactionModel(); GetItemPermissions(PermissionItemName.FingerPrintTransaction.ToString()); Client.GetFingerPrintTransactionCompleted += (s, sv) => { foreach (var row in sv.Result) { var newrow = new FingerPrintTransactionModel(); newrow.InjectFrom(row); newrow.StorePerRow = sv.storesAllCompanies.FirstOrDefault( x => x.Code == row.StoreCode && x.Organization == row.Company); newrow.EmpPerRow = sv.empList.FirstOrDefault(x => x.Emplid == row.UserId); MainRowList.Add(newrow); } Loading = false; FullCount = sv.fullCount; if (FullCount == 0 && MainRowList.Count == 0) { AddNewMainRow(false); } }; Client.UpdateOrInsertFingerPrintTransactionCompleted += (s, x) => { var savedRow = (FingerPrintTransactionModel)MainRowList.GetItemAt(x.outindex); if (savedRow != null) { savedRow.InjectFrom(x.Result); } }; Client.DeleteFingerPrintTransactionCompleted += (s, ev) => { if (ev.Error != null) { throw ev.Error; } var oldrow = MainRowList.FirstOrDefault(x => x.GlSerial == ev.Result); if (oldrow != null) { MainRowList.Remove(oldrow); } }; GetMaindata(); } }
public CostDimChildViewModel(LedgerHeaderViewModel ledgerHeaderViewModel) { if (!IsDesignTime) { LedgerHeaderViewModel = ledgerHeaderViewModel; GetItemPermissions(PermissionItemName.Account.ToString()); Glclient = new GlServiceClient(); MainRowList = new SortableCollectionView <TblCostDimDetailViewModel>(); SelectedMainRow = new TblCostDimDetailViewModel(); Glclient.GetTblCostDimSetupHeaderForAccountCompleted += (s, sv) => { if (sv.Result != null) { foreach (var row in sv.Result.TblCostDimDetails) { var newrow = new TblCostDimDetailViewModel(); newrow.InjectFrom(row); newrow.CostCenterPerRow = row.TblCostCenter1; MainRowList.Add(newrow); } } Loading = false; if (MainRowList.Any() && (SelectedMainRow == null)) { SelectedMainRow = MainRowList.FirstOrDefault(); } if (FullCount == 0 && MainRowList.Count == 0) { AddNewMainRow(false); } }; Glclient.SaveTblCostDimHeaderCompleted += (s, ev) => { if (ev.Error != null) { MessageBox.Show(ev.Error.Message); } try { ledgerHeaderViewModel.SelectedDetailRow.TblCostDimHeader = ev.Result; ledgerHeaderViewModel.SaveMainRow(); } catch (Exception) { } }; GetMaindata(); } }
public SearchAssetsViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <TblAssetsViewModel>(); SelectedMainRow = new TblAssetsViewModel(); Client.GetTblAssetsCompleted += (s, sv) => { foreach (var row in sv.Result) { var newrow = new TblAssetsViewModel(); newrow.InjectFrom(row); if (row.TblAssetsType1 != null) { newrow.AssetTypePerRow.InjectFrom(row.TblAssetsType1); } if (row.TblHardDisk1 != null) { newrow.HardDiskPerRow.InjectFrom(row.TblHardDisk1); } if (row.TblMemory1 != null) { newrow.MemoryPerRow.InjectFrom(row.TblMemory1); } if (row.TblProcessor1 != null) { newrow.ProcessorPerRow.InjectFrom(row.TblProcessor1); } newrow.Pending = sv.PendingAssets.Any(x => x == row.Iserial); MainRowList.Add(newrow); } Loading = false; FullCount = sv.fullCount; if (MainRowList.Any() && (SelectedMainRow == null || SelectedMainRow.Iserial == 0)) { SelectedMainRow = MainRowList.FirstOrDefault(); } if (Export) { Export = false; //var handler = ExportCompleted; //if (handler != null) handler(this, EventArgs.Empty); //ExportGrid.ExportExcel("Style"); } }; GetMaindata(); } }
public TransferMsgViewModel() { if (!DesignerProperties.IsInDesignTool) { GetItemPermissions(PermissionItemName.TransferMsg.ToString()); MainRowList = new SortableCollectionView <TblTransferMsgViewModel>(); SelectedMainRow = new TblTransferMsgViewModel(); Client.GetTblTransferMsgCompleted += (s, sv) => { foreach (var row in sv.Result) { var newrow = new TblTransferMsgViewModel(); newrow.InjectFrom(row); MainRowList.Add(newrow); } Loading = false; FullCount = sv.fullCount; if (FullCount == 0 && MainRowList.Count == 0) { AddNewMainRow(false); } }; Client.UpdateOrInsertTblTransferMsgCompleted += (s, x) => { var savedRow = (TblTransferMsgViewModel)MainRowList.GetItemAt(x.outindex); if (savedRow != null) { savedRow.InjectFrom(x.Result); } }; Client.DeleteTblTransferMsgCompleted += (s, ev) => { if (ev.Error != null) { throw ev.Error; } var oldrow = MainRowList.FirstOrDefault(x => x.Iserial == ev.Result); if (oldrow != null) { MainRowList.Remove(oldrow); } }; GetMaindata(); } }
public MissionViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <TblMissionViewModel>(); SelectedMainRows = new ObservableCollection <TblMissionViewModel>(); AttService.MissionTypeCompleted += (x, y) => { Ccmission = y.Result; }; AttService.MissionTypeAsync(); AttService.UpdateAndInsertTblMissionCompleted += (x, y) => { var savedRow = (TblMissionViewModel)MainRowList.GetItemAt(y.outindex); if (savedRow != null) { savedRow.InjectFrom(y.Result); } }; AttService.GetTblMissionCompleted += (x, y) => { foreach (var row in y.Result) { var newrow = new TblMissionViewModel(); newrow.InjectFrom(row); MainRowList.Add(newrow); } }; AttService.DeleteTblMissionCompleted += (s, ev) => { if (ev.Error != null) { throw ev.Error; } var oldrow = MainRowList.FirstOrDefault(x => x.Iserial == ev.Result); if (oldrow != null) { MainRowList.Remove(oldrow); } }; GetMaindata(); } }
private void BtnPrepareSample_OnClick(object sender, RoutedEventArgs e) { var child = new AdvanceSampleRequestChildWindow(_styleViewModel); var list = new SortableCollectionView <TblSalesOrderViewModel>(); foreach (var row in _styleViewModel.SelectedMainRow.TempDetailsList.Where( x => x.TblRequestForSample == _viewModel.SelectedMainRow.Iserial)) { list.Add(row); } _styleViewModel.SelectedMainRow.DetailsList = list; child.Show(); }
public TblBrandStoreTargetHeaderViewModel() { MainRowList = new SortableCollectionView <TblBrandStoreTargetDetailViewModel>(); MainRowList.CollectionChanged += MainRowList_CollectionChanged; _client.GetTblBrandStoreTargetHeaderCompleted += (s, sv) => { Glserial = 0; MainRowList.Clear(); if (sv.Result != null) { foreach (var tblBrandStoreTargetDetail in sv.Result.TblBrandStoreTargetDetails.OrderBy(x => x.TblStore1.code)) { Glserial = tblBrandStoreTargetDetail.Glserial; var row = new TblBrandStoreTargetDetailViewModel().InjectFrom(tblBrandStoreTargetDetail) as TblBrandStoreTargetDetailViewModel; row.StorePerRow = new StoresForBrand { Iserial = tblBrandStoreTargetDetail.TblStore1.iserial, Code = tblBrandStoreTargetDetail.TblStore1.code, Ename = tblBrandStoreTargetDetail.TblStore1.ENAME, Aname = tblBrandStoreTargetDetail.TblStore1.aname }; MainRowList.Add(row); } Glserial = sv.Result.Glserial; } foreach (var variable in sv.Stores.OrderBy(x => x.Code)) { if (MainRowList.FirstOrDefault(x => x.Tblstore == variable.Iserial) == null) { MainRowList.Add(new TblBrandStoreTargetDetailViewModel { Glserial = Glserial, StorePerRow = variable, Qty = 1 }); } } TotalAmount = MainRowList.Sum(x => x.Amount); TotalQty = MainRowList.Sum(x => x.Qty); }; }
public EmployeeInfoViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <TblEmployeeInfoViewModel>(); SelectedMainRows = new ObservableCollection <TblEmployeeInfoViewModel>(); AttService.GetTblEmloyeeInfoCompleted += (x, y) => { foreach (var row in y.Result) { var newrow = new TblEmployeeInfoViewModel(); newrow.InjectFrom(row); MainRowList.Add(newrow); } Loading = false; }; } }
public TblRouteGroupViewModel() { DetailsList = new SortableCollectionView <TblRouteViewModel>(); DetailsList.CollectionChanged += DetailsList_CollectionChanged; Client.GetAxRoutListeCompleted += (s, sv) => { foreach (var detailRow in DetailsList) { foreach (var row in sv.Result.Where(x => x.WRKCTRGROUPID.ToString(CultureInfo.InvariantCulture) == AXRoutLinkCode.ToString(CultureInfo.InvariantCulture))) { if (detailRow.AxRoutesList.All(x => x.WRKCTRID != row.WRKCTRID)) { detailRow.AxRoutesList.Add(row); } } } }; }
public SearchAssetViewModel() { if (!DesignerProperties.IsInDesignTool) { Client = new CRUD_ManagerServiceClient(); MainRowList = new SortableCollectionView <TblAssetsViewModel>(); SelectedMainRow = new TblAssetsViewModel(); Client.GetTblAssetsCompleted += (s, sv) => { foreach (var row in sv.Result) { var newrow = new TblAssetsViewModel(); if (row.TblAssetsType1 != null) { newrow.AssetTypePerRow.InjectFrom(row.TblAssetsType1); } if (row.TblHardDisk1 != null) { newrow.HardDiskPerRow.InjectFrom(row.TblHardDisk1); } if (row.TblMemory1 != null) { newrow.MemoryPerRow.InjectFrom(row.TblMemory1); } if (row.TblProcessor1 != null) { newrow.ProcessorPerRow.InjectFrom(row.TblProcessor1); } newrow.Pending = sv.PendingAssets.Any(x => x == row.Iserial); newrow.InjectFrom(row); MainRowList.Add(newrow); } Loading = false; FullCount = sv.fullCount; }; GetMaindata(); } }
public DocumentationFilesViewModel() { MainRowList = new SortableCollectionView <TblDocumentationFilesViewModel>(); SelectedMainRow = new TblDocumentationFilesViewModel(); Client.GetDocumentationFilesCompleted += (s, sv) => { MainRowList.Clear(); foreach (var row in sv.Result) { var newrow = new TblDocumentationFilesViewModel(); newrow.InjectFrom(row); MainRowList.Add(newrow); } Loading = false; }; Client.GetDocumentationFilesAsync(); }
public SearchPurchaseOrdersViewModel() { if (!DesignerProperties.IsInDesignTool) { Client = new CRUD_ManagerServiceClient(); MainRowList = new SortableCollectionView <CRUD_ManagerServicePurchaseOrderDto>(); SelectedMainRow = new CRUD_ManagerServicePurchaseOrderDto(); Client.GetPurchaseOrderJournalsCompleted += (s, sv) => { foreach (var row in sv.Result) { MainRowList.Add(row); } Loading = false; }; } }
public SearchVendorViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <Vendor>(); SelectedMainRow = new Vendor(); Client.GetVendorsCompleted += (s, sv) => { foreach (var row in sv.Result) { MainRowList.Add(row); } Loading = false; //FullCount = sv.fullCount; }; // GetMaindata(); } }
public SearchAccountViewModel() { if (!IsDesignTime) { Glclient = new GlServiceClient(); MainRowList = new SortableCollectionView <TblAccount>(); SelectedMainRow = new TblAccount(); Glclient.GetTblAccountCompleted += (s, sv) => { foreach (var row in sv.Result) { MainRowList.Add(row); } Loading = false; FullCount = sv.fullCount; }; } }
public SearchGeneratePurchaseViewModel() { if (!DesignerProperties.IsInDesignTool) { MainRowList = new SortableCollectionView <TblGeneratePurchaseHeader>(); SelectedMainRow = new TblGeneratePurchaseHeader(); PurchasePlanClient.GetTblGeneratePurchaseHeaderCompleted += (s, sv) => { foreach (var row in sv.Result) { MainRowList.Add(row); } Loading = false; FullCount = sv.fullCount; }; GetMaindata(); } }
public SearchRetailStyleViewModel() { if (!DesignerProperties.IsInDesignTool) { Client = new CRUD_ManagerServiceClient(); MainRowList = new SortableCollectionView <viewstyle>(); SelectedMainRow = new viewstyle(); Client.GetviewstyleCompleted += (s, sv) => { foreach (var row in sv.Result) { MainRowList.Add(row); } Loading = false; }; } }
internal SortableCollectionDeferRefresh(SortableCollectionView collectionView) { _collectionView = collectionView; }