public void SwitchPurchaseType(InvoiceType it) { ButtonNew.Visible = false; switch (it) { case InvoiceType.Buy: LabelInvoiceType.Text = "Buy"; LabelSubInvoiceType.Text = "Purchase"; break; case InvoiceType.Sell: LabelInvoiceType.Text = "Sell"; LabelSubInvoiceType.Text = "Purchase"; break; case InvoiceType.Rent: LabelInvoiceType.Text = "Sell"; LabelSubInvoiceType.Text = "Rent"; break; case InvoiceType.BuyLedger: LabelInvoiceType.Text = "Buy"; LabelSubInvoiceType.Text = "Ledger"; ButtonNew.Visible = true; break; case InvoiceType.SellLedger: LabelInvoiceType.Text = "Sell"; LabelSubInvoiceType.Text = "Ledger"; ButtonNew.Visible = true; break; } WebUserControlInvoiceBase1.SwitchPurchaseType(it); }
private void ShowSelectedInvoice(string InvoiceID) { WebUserControlInvoiceBase1.InitUserControl(); WebUserControlInvoiceBase1.KeyID = new System.Guid(InvoiceID); WebUserControlInvoiceBase1.Visible = true; WebUserControlInvoiceBase1.DataBind(); }