示例#1
0
        private void ProductRadButtonElement_Click(object sender, EventArgs e)
        {
            ProductRadForm _productRadForm = new ProductRadForm();

            if (!isOpenForm(_productRadForm))
            {
                _productRadForm.MdiParent = this;
                _productRadForm.Show();
            }
        }
        public NewProductRadForm(ProductRadForm currentParentForm, StateForm stateForm)
        {
            InitializeComponent();
            this._stateForm                       = stateForm;
            this._serviceProductBL                = new ProductBL();
            this._serviceCategoryBL               = new CategoryBL();
            this._serviceUnitBL                   = new UnitBL();
            this._serviceTaxBL                    = new TaxBL();
            this._currentParentForm               = currentParentForm;
            this.CategoryIDComboBox.DataSource    = this._serviceCategoryBL.GetCategories();
            this.CategoryIDComboBox.DisplayMember = "CategoryName";
            this.CategoryIDComboBox.ValueMember   = "CategoryID";

            this.UnitIDComboBox.DataSource    = this._serviceUnitBL.Sp_GetUnits();
            this.UnitIDComboBox.DisplayMember = "UnitDescription";
            this.UnitIDComboBox.ValueMember   = "UnitID";

            this.TaxIDComboBox.DataSource    = this._serviceTaxBL.Sp_Taxes();
            this.TaxIDComboBox.DisplayMember = "TaxDescription";
            this.TaxIDComboBox.ValueMember   = "TaxID";
        }