void cmbCombo_SelectedValueChanged(object sender, EventArgs e) { DAL.clsProduct pd2 = new DAL.clsProduct(); pd2.DiscountId = cmbDiscount.txtTextValueInt; cmbDiscount.setDataSource(pd2.Select(), "discount"); pd2.ListPrice = cmbRate.txtTextValueInt; cmbRate.setDataSource(pd2.Select(), "listPrice"); pd2.Vat = cmbVat.txtTextValueInt; cmbVat.setDataSource(pd2.Select(), "vat"); pd2.Code = cmbCode.txtTextValueInt.ToString(); cmbCode.setDataSource(pd2.Select(), "code"); //pd2.Name = cmbProduct.txtTextValueInt.ToString(); //cmbProduct.setDataSource(pd2.Select()); }
private void frmPurchaseNew_Load(object sender, EventArgs e) { DAL.clsProduct pd2 = new DAL.clsProduct(); cmbProduct.setDataSource(pd2.Select()); cmbProduct.cmbCombo.SelectedValueChanged += cmbCombo_SelectedValueChanged; //cmbDiscount.txtTextValueInt = pd.DiscountId; //cmbRate.txtTextValueInt = Convert.ToInt32(pd.ListPrice); //cmbVat.txtTextValueInt = Convert.ToInt32(pd.Vat); //cmbCode.txtTextValueInt = Convert.ToInt32(pd.Code); //cmbProduct.setDataSource(pd.Select()); DAL.clsEmployee em = new DAL.clsEmployee(); em.Id = cmbEmployee.txtTextValueInt; cmbEmployee.setDataSource(em.Select()); }
private void btnSearch_Click(object sender, EventArgs e) { DAL.clsProduct p = new DAL.clsProduct(); dgvData.DataSource = p.Select().Tables[0]; }
private void frmRackNew_Load(object sender, EventArgs e) { DAL.clsProduct p = new DAL.clsProduct(); cmbProduct.setDataSource(p.Select()); }