Exemplo n.º 1
0
        private void btnBatch_Click(object sender, EventArgs e)
        {
            frmBatch batch = new frmBatch();

            this.Visible = false;
            batch.ShowDialog();
            this.Visible = true;

            //Application.Exit();
        }
        private void gridBatch_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Batch op = new Batch();

            if (gridBatch.SelectedCells.Count > 0)
            {
                int             index = gridBatch.SelectedCells[0].RowIndex;
                DataGridViewRow s     = gridBatch.Rows[index];
                op.Id             = Convert.ToInt32(s.Cells["Id"].Value);
                op.BatchNo        = s.Cells["BatchNo"].Value.ToString();
                op.ProductId      = Convert.ToInt32(s.Cells["ProductId"].Value);
                op.ExpDate        = s.Cells["ExpDate"].Value.ToString();
                op.BatchSize      = s.Cells["BatchSize"].Value.ToString();
                op.ReleaseDate    = s.Cells["ReleaseDate"].Value.ToString();
                op.IncubationDate = s.Cells["IncubationDate"].Value.ToString();
                op.CountryId      = Convert.ToInt32(s.Cells["CountryId"].Value);
                op.Type           = Convert.ToInt32(s.Cells["Type"].Value);
                op.OtherInfo      = s.Cells["OtherInfo"].Value.ToString();
                op.MfgDate        = s.Cells["MfgDate"].Value.ToString();
            }
            frmBatch p = new frmBatch(op);

            p.ShowDialog();
        }
        private void lnkAddBatch_Click(object sender, EventArgs e)
        {
            frmBatch fr = new frmBatch();

            fr.ShowDialog();
        }