protected void OnButtonAddObjectClicked(object sender, EventArgs e) { var filter = new ObjectBalanceFilter (MyOrmDialog.UoW); if (CurObject != null) filter.RestrictObject = CurObject; var selectFromObjectDlg = new ReferenceRepresentation (new ViewModel.ObjectBalanceVM (filter)); selectFromObjectDlg.ShowFilter = CurObject == null; selectFromObjectDlg.Mode = OrmReferenceMode.MultiSelect; selectFromObjectDlg.ObjectSelected += SelectFromObjectDlg_ObjectSelected;; var dialog = new OneWidgetDialog (selectFromObjectDlg); dialog.Show (); dialog.Run (); dialog.Destroy (); }
void RunDlg(ITdiTab dlg) { if (dlg is Gtk.Dialog) { var window = dlg as Gtk.Dialog; window.Show(); window.Run(); window.Destroy(); } else if (dlg is Gtk.Widget) { var window = new OneWidgetDialog(dlg as Gtk.Widget); window.Show(); window.Run(); window.Destroy(); } else { throw new NotImplementedException(); } }
protected void OnButtonAddClicked(object sender, EventArgs e) { if(IncomeDoc.Operation == IncomeOperations.Return) { var selectFromEmployeeDlg = new ReferenceRepresentation (new ViewModel.EmployeeBalanceVM (IncomeDoc.EmployeeCard)); selectFromEmployeeDlg.Mode = OrmReferenceMode.MultiSelect; selectFromEmployeeDlg.ObjectSelected += SelectFromEmployeeDlg_ObjectSelected; var dialog = new OneWidgetDialog (selectFromEmployeeDlg); dialog.Show (); dialog.Run (); dialog.Destroy (); } if(IncomeDoc.Operation == IncomeOperations.Object) { var selectFromObjectDlg = new ReferenceRepresentation (new ViewModel.ObjectBalanceVM (IncomeDoc.Facility)); selectFromObjectDlg.Mode = OrmReferenceMode.MultiSelect; selectFromObjectDlg.ObjectSelected += SelectFromObjectDlg_ObjectSelected;; var dialog = new OneWidgetDialog (selectFromObjectDlg); dialog.Show (); dialog.Run (); dialog.Destroy (); } if(IncomeDoc.Operation == IncomeOperations.Enter) { var selectNomenclatureDlg = new OrmReference (typeof(Nomenclature)); selectNomenclatureDlg.Mode = OrmReferenceMode.MultiSelect; selectNomenclatureDlg.ObjectSelected += SelectNomenclatureDlg_ObjectSelected; var dialog = new OneWidgetDialog (selectNomenclatureDlg); dialog.Show (); dialog.Run (); dialog.Destroy (); } }
void RunDlg(ITdiTab dlg) { if (dlg is Gtk.Dialog) { var window = dlg as Gtk.Dialog; window.Show (); window.Run (); window.Destroy (); } else if (dlg is Gtk.Widget) { var window = new OneWidgetDialog (dlg as Gtk.Widget); window.Show (); window.Run (); window.Destroy (); } else throw new NotImplementedException (); }
protected void OnActionHistoryLogActivated(object sender, EventArgs e) { OneWidgetDialog dialog = new OneWidgetDialog (new QSHistoryLog.HistoryView ()); dialog.Show (); dialog.Run (); dialog.Destroy (); }
protected void OnButtonAddClicked(object sender, EventArgs e) { var selectDlg = new ReferenceRepresentation (new ViewModel.StockBalanceVM (MyOrmDialog.UoW, ExpenceDoc.Operation == ExpenseOperations.Employee ? ViewModel.StockBalanceVMMode.DisplayAll : ViewModel.StockBalanceVMMode.OnlyProperties )); selectDlg.Mode = OrmReferenceMode.MultiSelect; selectDlg.ObjectSelected += SelectDlg_ObjectSelected; var dialog = new OneWidgetDialog (selectDlg); dialog.Show (); dialog.Run (); dialog.Destroy (); }
protected void OnActionNormsActivated(object sender, EventArgs e) { var refWin = new ReferenceRepresentation (new workwear.ViewModel.NormVM ()); var dialog = new OneWidgetDialog (refWin); dialog.Show (); dialog.Run (); dialog.Destroy (); }
protected void OnAction9Activated(object sender, EventArgs e) { var refWin = new OrmReference (typeof(Leader)); var dialog = new OneWidgetDialog (refWin); dialog.Show (); dialog.Run (); dialog.Destroy (); }
protected void OnButtonAddStoreClicked(object sender, EventArgs e) { var selectFromStockDlg = new ReferenceRepresentation (new ViewModel.StockBalanceVM ()); selectFromStockDlg.Mode = OrmReferenceMode.MultiSelect; selectFromStockDlg.ObjectSelected += SelectFromStockDlg_ObjectSelected;; var dialog = new OneWidgetDialog (selectFromStockDlg); dialog.Show (); dialog.Run (); dialog.Destroy (); }