Exemple #1
0
        private void mtxt_brand_Click(object sender, EventArgs e)
        {
            // connection = new MySqlConnection(ConnectionString);
            BrandForm brand = new BrandForm();

            brand.cid = mtxt_cid.Tag.ToString();
            if (brand.ShowDialog(this) == DialogResult.OK)
            {
                mtxt_brand.Text = brand.brand_grid.Rows[brand.row].Cells[1].Value.ToString();
                // mtxt_brand.Tag = brand.brand_grid.Rows[brand.row].Cells[0].Value.ToString();
                mtxt_bid.Tag = brand.brand_grid.Rows[brand.row].Cells[0].Value.ToString();
            }
            brand.Dispose();
        }
Exemple #2
0
        private void mtxt_cat_Click(object sender, EventArgs e)
        {
            mtxt_brand.Enabled = true;
            mtxt_brand.Clear();
            //MessageBox.Show("" + mtxt_cid.Tag);
            connection = new MySqlConnection(ConnectionString);
            CategoryName catname = new CategoryName();
            BrandForm    brand   = new BrandForm();

            if (catname.ShowDialog(this) == DialogResult.OK)
            {
                mtxt_cat.Text = catname.cat_grid.Rows[catname.row].Cells[1].Value.ToString();
                //mtxt_cat.Tag = catname.cat_grid.Rows[catname.row].Cells[0].Value.ToString();
                mtxt_cid.Tag = catname.cat_grid.Rows[catname.row].Cells[0].Value.ToString();
            }
            catname.Dispose();
        }
 private void mtxt_brand_Click(object sender, EventArgs e)
 {
    // connection = new MySqlConnection(ConnectionString);
     BrandForm brand = new BrandForm();
     brand.cid = mtxt_cid.Tag.ToString();
     if (brand.ShowDialog(this) == DialogResult.OK)
     {
         mtxt_brand.Text = brand.brand_grid.Rows[brand.row].Cells[1].Value.ToString();
         // mtxt_brand.Tag = brand.brand_grid.Rows[brand.row].Cells[0].Value.ToString();
         mtxt_bid.Tag = brand.brand_grid.Rows[brand.row].Cells[0].Value.ToString();
     }
     brand.Dispose();
 }
        private void mtxt_cat_Click(object sender, EventArgs e)
        {
            mtxt_brand.Enabled = true;
            mtxt_brand.Clear();
            //MessageBox.Show("" + mtxt_cid.Tag);
            connection = new MySqlConnection(ConnectionString);
            CategoryName catname = new CategoryName();
            BrandForm brand = new BrandForm();

            if (catname.ShowDialog(this) == DialogResult.OK)
            {

                mtxt_cat.Text = catname.cat_grid.Rows[catname.row].Cells[1].Value.ToString();
                //mtxt_cat.Tag = catname.cat_grid.Rows[catname.row].Cells[0].Value.ToString();
                mtxt_cid.Tag = catname.cat_grid.Rows[catname.row].Cells[0].Value.ToString();
            }
            catname.Dispose();
        }