Exemple #1
0
        private void btnEdit_Click_1(object sender, EventArgs e)
        {
            Global.adding       = false;
            Global.editing      = true;
            Global.editQuantity = true;


            if (Global.buttonSeedSelected == true)
            {
                Global.ID       = dtgSeeds.SelectedRows[0].Cells[6].Value.ToString();
                Global.Qty      = dtgSeeds.SelectedRows[0].Cells[1].Value.ToString();
                Global.Unit     = dtgSeeds.SelectedRows[0].Cells[2].Value.ToString();
                Global.name     = dtgSeeds.SelectedRows[0].Cells[0].Value.ToString();
                Global.Supp     = dtgSeeds.SelectedRows[0].Cells[3].Value.ToString();
                Global.SellP    = dtgSeeds.SelectedRows[0].Cells[5].Value.ToString();
                Global.BaseP    = dtgSeeds.SelectedRows[0].Cells[4].Value.ToString();
                Global.prodType = dtgSeeds.SelectedRows[0].Cells[7].Value.ToString();
            }
            else if (Global.buttonEquipmentSelected == true)
            {
                Global.ID       = dtgSeeds.SelectedRows[0].Cells[12].Value.ToString();
                Global.Qty      = dtgSeeds.SelectedRows[0].Cells[1].Value.ToString();
                Global.Unit     = dtgSeeds.SelectedRows[0].Cells[2].Value.ToString();
                Global.name     = dtgSeeds.SelectedRows[0].Cells[0].Value.ToString();
                Global.Supp     = dtgSeeds.SelectedRows[0].Cells[3].Value.ToString();
                Global.SellP    = dtgSeeds.SelectedRows[0].Cells[5].Value.ToString();
                Global.BaseP    = dtgSeeds.SelectedRows[0].Cells[4].Value.ToString();
                Global.Model    = dtgSeeds.SelectedRows[0].Cells[6].Value.ToString();
                Global.PartNum  = dtgSeeds.SelectedRows[0].Cells[7].Value.ToString();
                Global.Location = dtgSeeds.SelectedRows[0].Cells[8].Value.ToString();
                Global.SerialN  = dtgSeeds.SelectedRows[0].Cells[9].Value.ToString();
                Global.EngineN  = dtgSeeds.SelectedRows[0].Cells[10].Value.ToString();
                Global.BigItem  = dtgSeeds.SelectedRows[0].Cells[11].Value.ToString();
                Global.prodType = dtgSeeds.SelectedRows[0].Cells[13].Value.ToString();
            }
            else if (Global.buttonOthersSelected == true)
            {
                Global.ID       = dtgSeeds.SelectedRows[0].Cells[10].Value.ToString();
                Global.Qty      = dtgSeeds.SelectedRows[0].Cells[1].Value.ToString();
                Global.Unit     = dtgSeeds.SelectedRows[0].Cells[2].Value.ToString();
                Global.name     = dtgSeeds.SelectedRows[0].Cells[0].Value.ToString();
                Global.Supp     = dtgSeeds.SelectedRows[0].Cells[3].Value.ToString();
                Global.SellP    = dtgSeeds.SelectedRows[0].Cells[5].Value.ToString();
                Global.BaseP    = dtgSeeds.SelectedRows[0].Cells[4].Value.ToString();
                Global.Model    = dtgSeeds.SelectedRows[0].Cells[6].Value.ToString();
                Global.PartNum  = dtgSeeds.SelectedRows[0].Cells[7].Value.ToString();
                Global.Location = dtgSeeds.SelectedRows[0].Cells[8].Value.ToString();
                Global.SerialN  = dtgSeeds.SelectedRows[0].Cells[9].Value.ToString();
                Global.prodType = dtgSeeds.SelectedRows[0].Cells[11].Value.ToString();
            }

            frmAddEditProduct addedit = new frmAddEditProduct();

            addedit.Show();
            this.Hide();
        }
Exemple #2
0
        private void btnAdd_Click_1(object sender, EventArgs e)
        {
            Global.adding       = true;
            Global.editing      = false;
            Global.editQuantity = false;



            frmAddEditProduct addedit = new frmAddEditProduct();

            addedit.Show();
            this.Hide();
        }