public SupplierDialogFrm(Common.FormMode formMode, Data_Supplier supplier) { InitializeComponent(); try { this.formMode = formMode; if (Global.HideSensitiveSupplierFields) { HideSensitiveFields(); } bsSupplierTypes.DataSource = Data_SupplierType.GetSupplierTypes(); if (formMode == Common.FormMode.Add) { supplierID = -1; luSupplierType.SelectedIndex = -1; } else { BindControls(supplier); if (formMode == Common.FormMode.View) { Utils.DisableAllControls(this); this.Text = String.Format("View Supplier {0} ({1})", supplier.SupplierID, supplier.Name); return; } this.Text = String.Format("Edit Supplier {0} ({1})", supplier.SupplierID, supplier.Name); } } catch (Exception ex) { Utils.ShowException(ex); } }
public TopicForm(string topic, Common.FormMode mode) { this._topicName = topic; this._mode = mode; TopicEntries = new Dictionary <string, string>(0); InitializeComponent(); }
public CardForm(Common.FormMode mode, string key, string value) { this._mode = mode; this.Key = key; this.Value = value; InitializeComponent(); }
public BankAccountDialogFrm(Common.FormMode formMode, Data_BankAccount bankAccount) { InitializeComponent(); try { this.formMode = formMode; if (formMode != Common.FormMode.Add) { BindControls(bankAccount); if (formMode == Common.FormMode.View) { Utils.DisableAllControls(this); this.Text = String.Format("View Bank Account {0}", bankAccount.BankAccountCode); return; } this.Text = String.Format("Edit Bank Account {0}", bankAccount.BankAccountCode); txtCode.ReadOnly = true; txtName.Focus(); } } catch (Exception ex) { Utils.ShowException(ex); } }
public BankIdentifierCodeDlg(Common.FormMode formMode, Data_BankIdentifierCode bic) { InitializeComponent(); if (formMode == Common.FormMode.Edit) { this.Text = "Edit BIC"; txtCode.Text = bic.Code; } BIC = bic; txtCode.Focus(); }
public SupplierTypeDialogFrm(Common.FormMode mode, Data_SupplierType supplierType) { InitializeComponent(); formMode = mode; if (mode == Common.FormMode.Edit) { this.Text = String.Format("Edit Supplier Type {0}", supplierType.SupplierTypeCode); txtCode.ReadOnly = true; txtCode.Text = supplierType.SupplierTypeCode; txtName.Text = supplierType.Name; } }
public UserDialogFrm(Newcourt.Common.FormMode formMode, Data_User user) { InitializeComponent(); this.formMode = formMode; if (formMode == Common.FormMode.Edit) { this.Text = String.Format("Edit User {0}", user.Username); BindControls(user); if (user.Username == "Admin") { Utils.DisableAllControls(this); } } }