Esempio n. 1
0
        private void but_lookset_Click(object sender, EventArgs e)
        {
            int selectedIndex  = 0;
            int selectedIndex2 = 0;

            if (dgv_01.Rows.Count == 0 && dgv_02.Rows.Count == 0)
            {
                MessageBox.Show("你好,没有清洗批次选择。请先选择灭菌批次。", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            else
            {
                if (dgv_01.Visible == true)
                {
                    washing_batch.Clear();
                    if (dgv_01.SelectedRows != null && dgv_01.SelectedRows.Count > 0 && dgv_01.SelectedRows[0] != null)
                    {
                        washing_batch.Add("s_name", dgv_01.SelectedRows[0].Cells["s_name"].Value);
                        washing_batch.Add("s_batch", dgv_01.SelectedRows[0].Cells["batch"].Value.ToString());
                    }
                    selectedIndex = dgv_01.Rows.IndexOf(dgv_01.SelectedRows[0]);
                }
                else if (dgv_02.Visible == true)
                {
                    washing_batch.Clear();
                    if (dgv_02.SelectedRows != null && dgv_02.SelectedRows.Count > 0 && dgv_02.SelectedRows[0] != null)
                    {
                        washing_batch.Add("s_name", dgv_02.SelectedRows[0].Cells["sterilizer"].Value);
                        washing_batch.Add("s_batch", dgv_02.SelectedRows[0].Cells["batch"].Value.ToString());
                    }
                    selectedIndex2 = dgv_02.Rows.IndexOf(dgv_02.SelectedRows[0]);
                }

                bool isselect         = true;
                HCSRS_wasbatch_set FS = new HCSRS_wasbatch_set(washing_batch, isselect);
                FS.ShowDialog();
                washing_batch  = FS.setbarcode;
                dt_end.Value   = new DateTime();
                dt_start.Value = new DateTime();
                if (dgv_01.Visible == true)
                {
                    LoadData();
                    dgv_02.Rows.Clear();
                    if (dgv_01.Rows.Count > selectedIndex)
                    {
                        dgv_01.CurrentRow = dgv_01.Rows[selectedIndex];
                    }
                }
            }
        }
Esempio n. 2
0
        private void radButton1_Click_1(object sender, EventArgs e)
        {
            if (dgv_01.Rows.Count == 0 && dgv_01.Rows.Count == 0)
            {
                MessageBox.Show("你好,没有灭菌批次选择。请先选择灭菌批次。", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            washing_batch.Clear();
            if (dgv_01.SelectedRows != null && dgv_01.SelectedRows.Count > 0 && dgv_01.SelectedRows[0] != null)
            {
                washing_batch.Add("s_name", dgv_01.SelectedRows[0].Cells["s_name"].Value);
                washing_batch.Add("s_batch", dgv_01.SelectedRows[0].Cells["batch"].Value.ToString());
            }
            bool isselect            = false;
            HCSRS_wasbatch_set HCSRS = new HCSRS_wasbatch_set(washing_batch, isselect);

            HCSRS.ShowDialog();
        }