예제 #1
0
        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);
            }
        }
예제 #2
0
 public TopicForm(string topic, Common.FormMode mode)
 {
     this._topicName = topic;
     this._mode      = mode;
     TopicEntries    = new Dictionary <string, string>(0);
     InitializeComponent();
 }
예제 #3
0
 public CardForm(Common.FormMode mode, string key, string value)
 {
     this._mode = mode;
     this.Key   = key;
     this.Value = value;
     InitializeComponent();
 }
예제 #4
0
        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);
            }
        }
예제 #5
0
        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();
        }
예제 #6
0
        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;
            }
        }
예제 #7
0
        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);
                }
            }
        }