Esempio n. 1
0
 private void flgView_Yb_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e)
 {
     if (flgView_Yb.Cols[e.Col].Name == "dcSectFlag")
     {
         string s = flgView_Yb[e.Row, "项目代码"].ToString();
         if (flgView_Yb[e.Row, e.Col].ToString() == Boolean.TrueString)
         {
             LisOutPutResult l = new LisOutPutResult();
             l.Bblsh  = yblsh;
             l.Yzxmdm = jyxmdm;
             l.Xmdm   = s;
             l.Xmmc   = flgView_Yb[e.Row, "项目名称"].ToString();
             l.Xmywmc = flgView_Yb[e.Row, "项目英文名称"].ToString();
             l.Xmjg   = flgView_Yb[e.Row, "项目结果"].ToString();
             l.Jgdw   = flgView_Yb[e.Row, "单位"].ToString();
             l.Ckz    = flgView_Yb[e.Row, "参考值范围"].ToString();
             l.Cssj   = flgView_Yb[e.Row, "测试时间"].ToString();
             l.Jgbz   = flgView_Yb[e.Row, "标志"].ToString();
             lisoutres.Add(l);
         }
         else
         {
             LisOutPutResult l = lisoutres.Find(delegate(LisOutPutResult lop) { return(lop.Bblsh == yblsh && lop.Yzxmdm == jyxmdm && lop.Xmdm == s); });
             lisoutres.Remove(l);
         }
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSure_Click(object sender, EventArgs e)
        {
            string strtext = "";

            for (int i = 0; i < lisoutres.Count; i++)
            {
                LisOutPutResult lop = lisoutres[i];

                string jg = "";
                if (lop.Jgdw.Contains("E"))
                {
                    jg = ChangeChar(lop.Xmjg) + "*" + lop.Jgdw;
                }
                else
                {
                    jg = ChangeChar(lop.Xmjg) + " " + lop.Jgdw;
                }
                if (strtext == "")
                {
                    strtext = lop.Xmmc + " " + jg;
                }
                else
                {
                    strtext = strtext + "," + lop.Xmmc + " " + jg;
                }
            }
            //for (int i = 0; i < flgView_Yb.Rows.Count; i++)
            //{
            //    if (flgView_Yb.Rows[i]["dcSectFlag"].ToString()== "True")
            //    {
            //        if (strtext == "")
            //        {
            //            string jg = "";
            //            if (flgView_Yb.Rows[i]["单位"].ToString().Contains("E"))
            //            {//单位
            //                jg = ChangeChar(flgView_Yb.Rows[i]["项目结果"].ToString()) + "*" + flgView_Yb.Rows[i]["单位"].ToString();
            //            }
            //            else
            //            {
            //                jg = ChangeChar(flgView_Yb.Rows[i]["项目结果"].ToString()) + " " + flgView_Yb.Rows[i]["单位"].ToString();
            //            }
            //            strtext = flgView_Yb.Rows[i]["项目名称"].ToString() + " " + jg;
            //        }
            //        else
            //        {
            //            string jg = "";
            //            if (flgView_Yb.Rows[i]["单位"].ToString().Contains("E"))
            //            {//单位
            //                jg = ChangeChar(flgView_Yb.Rows[i]["项目结果"].ToString()) + "*" + flgView_Yb.Rows[i]["单位"].ToString();
            //            }
            //            else
            //            {
            //                jg = ChangeChar(flgView_Yb.Rows[i]["项目结果"].ToString()) + " " + flgView_Yb.Rows[i]["单位"].ToString();
            //            }
            //            strtext = strtext + ", " + flgView_Yb.Rows[i]["项目名称"].ToString() + " " + jg;
            //        }
            //    }
            //}
            App.LisResault = strtext;
            if (GetListValue != null)
            {
                GetListValue(sender, e);
            }
            this.Close();
        }