Esempio n. 1
0
        private void dgvDetail_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            FrmProportionSend formProportionSend = new FrmProportionSend();

            int id;

            try
            {
                id = int.Parse(dgvDetail.CurrentRow.Cells["id"].Value.ToString());//发送配合比表Id

                formProportionSend.PSClass.Id        = id;
                formProportionSend.PSClass.Sort      = dgvDetail.CurrentRow.Cells["sort"].Value.ToString();
                formProportionSend.PSClass.Name      = dgvDetail.CurrentRow.Cells["name"].Value.ToString();
                formProportionSend.PSClass.Model     = dgvDetail.CurrentRow.Cells["model"].Value.ToString();
                formProportionSend.PSClass.InputDate = Convert.ToDateTime(dgvDetail.CurrentRow.Cells["inputDate"].Value.ToString());
                formProportionSend.PSClass.InputMan  = dgvDetail.CurrentRow.Cells["inputMan"].Value.ToString();
                if (dgvDetail.CurrentRow.Cells["confirmDate"].Value.ToString() != "")
                {
                    formProportionSend.PSClass.ConfirmDate = Convert.ToDateTime(dgvDetail.CurrentRow.Cells["confirmDate"].Value.ToString());
                }
                if (dgvDetail.CurrentRow.Cells["R"].Value.ToString() != null)
                {
                    formProportionSend.PSClass.Remark = dgvDetail.CurrentRow.Cells["R"].Value.ToString();
                }
                formProportionSend.PSClass.EiId = dgvDetail.CurrentRow.Cells["no"].Value.ToString();

                formProportionSend.Tag = 1;

                formProportionSend.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
            }
        }
Esempio n. 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            FrmProportionSend FormFrmProportionSend = new FrmProportionSend();

            try
            {
                FormFrmProportionSend.Tag = 0;
                if (FormFrmProportionSend.ShowDialog() == DialogResult.OK)
                {
                    qualityLogic.FormFrmProportionSendSearch(dgvDetail);
                    if (dgvDetail.Rows.Count != 0)
                    {
                        dgvDetail.Rows[0].Selected = false;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
            }
        }