private void dgv2_DoubleClick(object sender, EventArgs e)
 {
     if (dgv2.RowCount > 0)
     {
         foreach (Form form in this.ParentForm.MdiChildren)
         {
             if (form.Text == "材料维护页面")
             {
                 if (form.WindowState == FormWindowState.Minimized)
                 {
                     form.WindowState = FormWindowState.Normal;
                 }
                 form.Activate();
                 return;
             }
         }
         string requireid = dgv2.CurrentRow.Cells["require_id"].Value.ToString();
         string statename = dgv2.CurrentRow.Cells["state"].Value.ToString();
         string stateid   = "4";
         if (statename == "待审")
         {
             stateid = "1";
         }
         MaterialRequireUpdate detailform = new MaterialRequireUpdate(requireid, stateid);
         detailform.Text      = "材料维护页面";
         detailform.MdiParent = this.MdiParent;
         detailform.Show();
     }
     else
     {
         return;
     }
 }
Exemplo n.º 2
0
        private void dgv2_DoubleClick(object sender, EventArgs e)
        {
            if (dgv2.RowCount > 0)
            {
                foreach (Form form in this.ParentForm.MdiChildren)
                {
                    if (form.Text == "材料维护页面")
                    {
                        if (form.WindowState == FormWindowState.Minimized)
                        {
                            form.WindowState = FormWindowState.Normal;
                        }
                        form.Activate();
                        return;
                    }
                }
                string requireid = dgv2.CurrentRow.Cells["require_id"].Value.ToString();
                string statename = dgv2.CurrentRow.Cells["state"].Value.ToString();
                string stateid = "4";
                if (statename == "待审")
                    stateid = "1";
                MaterialRequireUpdate detailform = new MaterialRequireUpdate(requireid, stateid);
                detailform.Text = "材料维护页面";
                detailform.MdiParent = this.MdiParent;
                detailform.Show();

            }
            else
            {
                return;
            }
        }