Exemplo n.º 1
0
        private void datagrd_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            frmProductAdd FRMUNIT = new frmProductAdd();

            FRMUNIT.txtPId.Text       = this.datagrd.CurrentRow.Cells[0].Value.ToString();
            FRMUNIT.txtPName.Text     = this.datagrd.CurrentRow.Cells[1].Value.ToString();
            FRMUNIT.cmbCatId.Text     = this.datagrd.CurrentRow.Cells[2].Value.ToString();
            FRMUNIT.cmbTyp.Text       = this.datagrd.CurrentRow.Cells[3].Value.ToString();
            FRMUNIT.txtUnitCost.Text  = this.datagrd.CurrentRow.Cells[4].Value.ToString();
            FRMUNIT.txtBarcode.Text   = this.datagrd.CurrentRow.Cells[5].Value.ToString();
            FRMUNIT.txtUnitPrice.Text = this.datagrd.CurrentRow.Cells[6].Value.ToString();
            FRMUNIT.txtPacketQty.Text = this.datagrd.CurrentRow.Cells[7].Value.ToString();
            FRMUNIT.txtSellQty.Text   = this.datagrd.CurrentRow.Cells[8].Value.ToString();
            //   FRMUNIT.txtTax1.Text = this.datagrd.CurrentRow.Cells[9].Value.ToString();
            //  FRMUNIT.txtTax2.Text = this.datagrd.CurrentRow.Cells[10].Value.ToString();
            FRMUNIT.txtQtyOnHand.Text = this.datagrd.CurrentRow.Cells[11].Value.ToString();
            FRMUNIT.cmbSupplId.Text   = this.datagrd.CurrentRow.Cells[12].Value.ToString();
            FRMUNIT.txtStoreId.Text   = this.datagrd.CurrentRow.Cells[13].Value.ToString();
            if (this.datagrd.CurrentRow.Cells[9].Value.ToString().Length > 0)
            {
                FRMUNIT.tax1.Checked = true;
            }
            if (this.datagrd.CurrentRow.Cells[10].Value.ToString().Length > 0)
            {
                FRMUNIT.tax2.Checked = true;
            }

            FRMUNIT.MdiParent = this.MdiParent;
            FRMUNIT.Dock      = DockStyle.Fill;
            FRMUNIT.Show();
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmProductAdd FRMUNIT = new frmProductAdd();

            FRMUNIT.MdiParent = this.MdiParent;
            FRMUNIT.Dock      = DockStyle.Fill;
            FRMUNIT.Show();
        }