private void FormAddProduct_Load(object sender, EventArgs e)
        {
            MCP = new ManagerCarPresenter(this);
            List <Category> list = MCP.GetCate();

            cbCategory.DataSource    = list;
            cbCategory.DisplayMember = "CategoryName";
            cbCategory.ValueMember   = "CategoryID";
            List <Supplier> listS = MCP.GetSup();

            cbSupplier.DataSource    = listS;
            cbSupplier.DisplayMember = "SupName";
            cbSupplier.ValueMember   = "SupID";
        }
Beispiel #2
0
        private void LoadData()
        {
            MCP = new ManagerCarPresenter(this);
            List <Product> list = MCP.SearchProductAD();

            tblCar.DataSource = list;
            List <Category> list1 = MCP.GetCate();

            cbCategory.DataSource    = list1;
            cbCategory.DisplayMember = "CategoryName";
            cbCategory.ValueMember   = "CategoryID";
            List <Supplier> listS = MCP.GetSup();

            cbSupplier.DataSource    = listS;
            cbSupplier.DisplayMember = "SupName";
            cbSupplier.ValueMember   = "SupID";
            txtProductID.Text        = "";
            txtProductName.Text      = "";
            txtPrice.Text            = "";
            txtQuantity.Text         = "";
            txtSearchName.Text       = "";
            txtCreateDate.Text       = "";
        }