protected void OnButtonLesseeOpenClicked(object sender, EventArgs e) { lessee winLessee = new lessee(); winLessee.LesseeFill(LesseeId); winLessee.Show(); winLessee.Run(); winLessee.Destroy(); }
protected virtual void OnPlaceOpenLessee(object o, EventArgs args) { int result, itemid; TreeIter iter; treeviewPlaces.Selection.GetSelected(out iter); itemid = Convert.ToInt32(PlaceSort.GetValue(iter, (int)PlaceCol.lessee_id)); lessee winLessee = new lessee(); winLessee.LesseeFill(itemid); winLessee.Show(); result = winLessee.Run(); winLessee.Destroy(); if((ResponseType)result == ResponseType.Ok) { UpdatePlaces(); } }
protected void OnRunReferenceItemDialog(object sender, Reference.RunReferenceItemDlgEventArgs e) { ResponseType Result; switch (e.TableName) { case "meter_types": MeterType MeterTypeEdit = new MeterType (e.NewItem); if (!e.NewItem) MeterTypeEdit.Fill (e.ItemId); MeterTypeEdit.Show (); Result = (ResponseType)MeterTypeEdit.Run (); MeterTypeEdit.Destroy (); break; case "contact_persons": Contact ContactEdit = new Contact (); ContactEdit.NewContact = e.NewItem; if (!e.NewItem) ContactEdit.ContactFill (e.ItemId); ContactEdit.Show (); Result = (ResponseType)ContactEdit.Run (); ContactEdit.Destroy (); break; case "lessees": lessee LesseeEdit = new lessee (); LesseeEdit.NewLessee = e.NewItem; if (!e.NewItem) LesseeEdit.LesseeFill (e.ItemId); LesseeEdit.Show (); Result = (ResponseType)LesseeEdit.Run (); LesseeEdit.Destroy (); break; case "services": Service ServiceEdit = new Service (); ServiceEdit.NewService = e.NewItem; if (!e.NewItem) ServiceEdit.ServiceFill (e.ItemId); ServiceEdit.Show (); Result = (ResponseType)ServiceEdit.Run (); ServiceEdit.Destroy (); break; case "cash": Cash CashEdit = new Cash (); CashEdit.NewItem = e.NewItem; if (!e.NewItem) CashEdit.Fill (e.ItemId); CashEdit.Show (); Result = (ResponseType)CashEdit.Run (); CashEdit.Destroy (); break; default: Result = ResponseType.None; break; } e.Result = Result; }
protected virtual void OnButtonViewClicked(object sender, System.EventArgs e) { TreeIter iter; int type, itemid; string place; ResponseType result; switch (notebookMain.CurrentPage) { case 0: treeviewPlaces.Selection.GetSelected (out iter); place = PlaceSort.GetValue (iter, (int)PlaceCol.place_no).ToString (); type = Convert.ToInt32 (PlaceSort.GetValue (iter, (int)PlaceCol.type_place_id)); Place winPlace = new Place (false); winPlace.PlaceFill (type, place); winPlace.Show (); result = (ResponseType)winPlace.Run (); winPlace.Destroy (); if (result == ResponseType.Ok) UpdatePlaces (); break; case 1: treeviewLessees.Selection.GetSelected (out iter); itemid = Convert.ToInt32 (LesseesSort.GetValue (iter, (int)LesseesCol.id)); lessee winLessee = new lessee (); winLessee.LesseeFill (itemid); winLessee.Show (); result = (ResponseType)winLessee.Run (); winLessee.Destroy (); if (result == ResponseType.Ok) UpdateLessees (); break; case 2: treeviewContract.Selection.GetSelected (out iter); itemid = (int)ContractSort.GetValue (iter, (int)ContractCol.id); Contract winContract = new Contract (); winContract.ContractFill (itemid); winContract.Show (); result = (ResponseType)winContract.Run (); winContract.Destroy (); if (result == ResponseType.Ok) UpdateContract (); break; case 3: itemid = Convert.ToInt32 (treeviewAccrual.GetSelectedObject<AccrualListEntryDTO>().Id); Accrual winAccrual = new Accrual (); winAccrual.AccrualFill (itemid); winAccrual.Show (); result = (ResponseType)winAccrual.Run (); winAccrual.Destroy (); if (result == ResponseType.Ok) UpdateAccrual (); break; case 4: switch (notebookCash.CurrentPage) { case 0: treeviewIncome.Selection.GetSelected (out iter); itemid = Convert.ToInt32 (CashIncomeSort.GetValue (iter, (int)CashIncomeCol.id)); IncomeSlip winIncome = new IncomeSlip (); winIncome.SlipFill (itemid, false); winIncome.Show (); result = (ResponseType)winIncome.Run (); winIncome.Destroy (); if (result == ResponseType.Ok) { UpdateCashIncome (); CalculateTotalCash (); } break; case 1: treeviewExpense.Selection.GetSelected (out iter); itemid = Convert.ToInt32 (CashExpenseSort.GetValue (iter, (int)CashExpenseCol.id)); ExpenseSlip winExpense = new ExpenseSlip (); winExpense.SlipFill (itemid, false); winExpense.Show (); result = (ResponseType)winExpense.Run (); winExpense.Destroy (); if (result == ResponseType.Ok) { UpdateCashExpense (); CalculateTotalCash (); } break; case 2: treeviewAdvance.Selection.GetSelected (out iter); itemid = Convert.ToInt32 (CashAdvanceSort.GetValue (iter, (int)CashAdvanceCol.id)); AdvanceStatement winAdvance = new AdvanceStatement (); winAdvance.StatementFill (itemid, false); winAdvance.Show (); result = (ResponseType)winAdvance.Run (); winAdvance.Destroy (); if (result == ResponseType.Ok) UpdateCashAdvance (); break; } break; case 5: treeviewEvents.Selection.GetSelected (out iter); itemid = Convert.ToInt32 (EventsListStore.GetValue (iter, 0)); Event winEvent = new Event (); winEvent.EventFill (itemid); winEvent.Show (); result = (ResponseType)winEvent.Run (); winEvent.Destroy (); if (result == ResponseType.Ok) UpdateEvents (); break; default: break; } }
protected virtual void OnHistoryOpenLessee(object o, EventArgs args) { int itemid; TreeIter iter; treeviewHistory.Selection.GetSelected(out iter); itemid = Convert.ToInt32(HistoryStore.GetValue(iter,5)); lessee winLessee = new lessee(); winLessee.LesseeFill(itemid); winLessee.Show(); winLessee.Run(); winLessee.Destroy(); UpdateHistory (); }
protected void OnButtonLesseeClicked(object sender, EventArgs e) { lessee winLessee = new lessee(); winLessee.LesseeFill(lessee_id); winLessee.Show(); winLessee.Run(); winLessee.Destroy(); FillCurrentContract (); }