async void SetLocation(InvWarehouse master, InvSerieBatchClient rec) { if (api.CompanyEntity.Location) { if (master != null) { rec.locationSource = master.Locations ?? await master.LoadLocations(api); } else { rec.locationSource = null; rec.Location = null; } rec.NotifyPropertyChanged("LocationSource"); } }
private void LocalMenu_OnItemClicked(string ActionType) { InvSerieBatchClient selectedItem = dgInvSeriesBatchGrid.SelectedItem as InvSerieBatchClient; switch (ActionType) { case "AttachSerieBatch": if (selectedItem == null) { return; } double qty = Math.Abs(Uniconta.Common.Utility.NumberConvert.ToDoubleNoThousandSeperator(txtQty.Text)); if (qty == 0d) { UnicontaMessageBox.Show(string.Format(Uniconta.ClientTools.Localization.lookup("CannotBeBlank"), Uniconta.ClientTools.Localization.lookup("Qty")), Uniconta.ClientTools.Localization.lookup("Warning")); return; } AttachSerieBatch(selectedItem, qty); break; } }
private void LocalMenu_OnItemClicked(string ActionType) { InvSerieBatchClient selectedItem = dgInvSeriesBatchGrid.SelectedItem as InvSerieBatchClient; switch (ActionType) { case "AddRow": dgInvSeriesBatchGrid.AddRow(); break; case "CopyRow": dgInvSeriesBatchGrid.CopyRow(); break; case "SaveGrid": saveGrid(); break; case "DeleteRow": dgInvSeriesBatchGrid.DeleteRow(); break; case "OpenOrAll": RibbonBase rb = (RibbonBase)localMenu.DataContext; ibase = UtilDisplay.GetMenuCommandByName(rb, "OpenOrAll"); if (openMaster == null) { openMaster = new InvSerieBatchOpen(); SetMaster(pageMaster, openMaster); ibase.Caption = Uniconta.ClientTools.Localization.lookup("All"); } else /*For All*/ { SetMaster(pageMaster, null); openMaster = null; ibase.Caption = Uniconta.ClientTools.Localization.lookup("Open"); } dgInvSeriesBatchGrid.Filter(null); break; case "RemoveFromTransaction": if (selectedItem != null) { RemoveFromTransaction(selectedItem); } break; case "Transactions": if (selectedItem != null) { AddDockItem(TabControls.InventoryTransactions, selectedItem, string.Format("{0}:{1}", Uniconta.ClientTools.Localization.lookup("Transactions"), selectedItem._Item)); } break; case "Storage": AddDockItem(TabControls.InvItemStoragePage, dgInvSeriesBatchGrid.syncEntity, Uniconta.ClientTools.Localization.lookup("OnHand")); break; case "AddNote": if (selectedItem != null) { AddDockItem(TabControls.UserNotesPage, dgInvSeriesBatchGrid.syncEntity); } break; case "AddDoc": if (selectedItem != null) { AddDockItem(TabControls.UserDocsPage, dgInvSeriesBatchGrid.syncEntity, string.Format("{0}: {1}", Uniconta.ClientTools.Localization.lookup("Documents"), selectedItem._Number)); } break; case "BatchLocations": if (selectedItem != null) { AddDockItem(TabControls.InvSerieBatchStorage, dgInvSeriesBatchGrid.syncEntity, string.Format("{0}: {1}", Uniconta.ClientTools.Localization.lookup("BatchLocations"), selectedItem._Number)); } break; default: gridRibbon_BaseActions(ActionType); break; } }