Example #1
0
 public mainControl(string username)
 {
     user = username;
     InitializeComponent();
     label1.Text = "Hello " + username;
     db          = new PrjDAO();
     dataGridView1.DataSource = db.getProducts();
 }
Example #2
0
        public Input(string username)
        {
            db            = new PrjDAO();
            ps            = new List <ProductControl>();
            this.username = username;
            InitializeComponent();
            ProductControl p = new ProductControl(username);

            ps.Add(p);
            flowLayoutPanel1.Controls.Add(p);
        }
Example #3
0
        public AddCategoryForm()
        {
            db = new PrjDAO();
            InitializeComponent();
            dataGridView1.DataSource          = db.getCategory();
            dataGridView1.AutoGenerateColumns = false;
            DataTable tb = db.getCategory();

            t = new List <int>();
            for (int i = 0; i < tb.Rows.Count; i++)
            {
                t.Add(Convert.ToInt32(tb.Rows[i][0]));
            }
        }
Example #4
0
        public AddProduct()
        {
            InitializeComponent();
            db = new PrjDAO();
            dataGridView1.DataSource          = db.getProductsandCategory();
            cbxCate.DataSource                = db.getCategory();
            cbxCate.DisplayMember             = "name";
            cbxCate.ValueMember               = "id";
            dataGridView1.AutoGenerateColumns = false;
            DataTable tb = db.getProductsandCategory();

            t = new List <int>();
            for (int i = 0; i < tb.Rows.Count; i++)
            {
                t.Add(Convert.ToInt32(tb.Rows[i][0]));
            }
        }
Example #5
0
 public Form1()
 {
     InitializeComponent();
     db = new PrjDAO();
 }