Ejemplo n.º 1
0
 private void gBtnDelete_Click(object sender, EventArgs e)
 {
     if (_methodName != null)
     {
         if (DialogResult.OK == MessageBox.Show("是否删除该试验组?", "警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Question))
         {
             BLL.GBT282892012_Twist bllts = new HR_Test.BLL.GBT282892012_Twist();
             bllts.Delete(_methodName);
         }
     }
 }
Ejemplo n.º 2
0
        private static List <TreeNode> ReadGBT28289TwistSamples(DateTime dtp)
        {
            BLL.GBT282892012_Twist bllb = new HR_Test.BLL.GBT282892012_Twist();
            DataSet         dsb         = bllb.GetNotOverlapList("testDate=#" + dtp.Date + "#");
            int             count       = dsb.Tables[0].Rows.Count;
            List <TreeNode> ltn         = new List <TreeNode>();

            for (int j = 0; j < count; j++)
            {
                DataSet  _dsb = bllb.GetList(" testNo='" + dsb.Tables[0].Rows[j]["testNo"].ToString() + "' and testDate=#" + dtp.Date + "#");
                TreeNode tn   = new TreeNode();
                tn.Text       = dsb.Tables[0].Rows[j]["testNo"].ToString();
                tn.Name       = "GBT28289-2012Twist";
                tn.ImageIndex = 0;
                foreach (DataRow dr in _dsb.Tables[0].Rows)
                {
                    if (Convert.ToBoolean(dr["isFinish"].ToString()) == true)
                    {
                        //左侧node完成试验的图标
                        TreeNode ftn = new TreeNode();
                        ftn.ImageIndex = 1;
                        ftn.Text       = dr["testSampleNo"].ToString();
                        ftn.Name       = "GBT28289-2012Twist_c";
                        ftn.Tag        = dr;
                        tn.Nodes.Add(ftn);
                    }
                    else
                    {
                        //左侧node未完成试验的图标
                        TreeNode ftn = new TreeNode();
                        ftn.ImageIndex = 2;
                        ftn.Text       = dr["testSampleNo"].ToString();
                        ftn.Name       = "GBT28289-2012Twist_c";
                        ftn.Tag        = dr;
                        tn.Nodes.Add(ftn);
                    }
                }
                _dsb.Dispose();
                ltn.Add(tn);
            }
            dsb.Dispose();
            return(ltn);
        }