Esempio n. 1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            DAL.clsCategory ctg = new DAL.clsCategory();

            int er = 0;

            er += txtName.txtValidate();

            if (er == 0)
            {
                ctg.Name = txtName.txtTextValue;

                if (ctg.Insert())
                {
                    MessageBox.Show("New Category Inserted !!");
                    txtName.txtTextValue = "";
                    txtName.Focus();
                }
            }
        }
Esempio n. 2
0
        private void frmProductNew_Load(object sender, EventArgs e)
        {
            DAL.clsCategory ctg = new DAL.clsCategory();
            cmbCategoryId.setDataSource(ctg.Select());

            DAL.clsCompany cp = new DAL.clsCompany();
            cmbCompanyId.setDataSource(cp.Select());

            DAL.clsDiscount ds = new DAL.clsDiscount();
            cmbDiscountId.setDataSource(ds.Select());

            DAL.clsGroup gr = new DAL.clsGroup();
            cmbGroupId.setDataSource(gr.Select());

            DAL.clsPower pr = new DAL.clsPower();
            cmbPowerId.setDataSource(pr.Select());

            DAL.clsSaleStatus st = new DAL.clsSaleStatus();
            cmbSaleStatusId.setDataSource(st.Select());

            DAL.clsUnit u = new DAL.clsUnit();
            cmbUnitId.setDataSource(u.Select());
        }
Esempio n. 3
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     DAL.clsCategory ctg = new DAL.clsCategory();
     dgvData.DataSource = ctg.Select().Tables[0];
 }