Exemplo n.º 1
0
 /// <summary>
 /// 绑定涉及条线
 /// </summary>
 /// <param name="dtTouchFiled"></param>
 public void ExeBindTouchFiled(DataTable dtTouchFiled)
 {
     if (dtTouchFiled != null && dtTouchFiled.Rows != null && dtTouchFiled.Rows.Count > 0)
     {
         ExtAspNet.CheckBoxList touchFiled = new ExtAspNet.CheckBoxList();
         touchFiled.ID           = "touchFiled1";
         touchFiled.ColumnNumber = 6;
         touchFiled.AutoPostBack = true;
         touchFiled.Required     = true;
         touchFiled.Label        = "涉及条线";
         for (int i = 0; i < dtTouchFiled.Rows.Count; i++)
         {
             touchFiled.Items.Add(new ExtAspNet.CheckItem(dtTouchFiled.Rows[i]["NAME"].ToString(), dtTouchFiled.Rows[i]["CODE"].ToString()));
         }
         row_TouchFiled.Items.Add(touchFiled);
     }
 }
Exemplo n.º 2
0
 private void SaveCheck()
 {
     exeCheckArgs.UnitID          = Convert.ToInt64(Session["UnitID"]);
     exeCheckArgs.UnitName        = Session["UnitName"].ToString();
     exeCheckArgs.TempID          = Convert.ToInt64(Session["ExeTempID"]);
     exeCheckArgs.TempName        = txt_Tmp.Text; //Session["SelectedTemplateNameExeCheck"].ToString();
     exeCheckArgs.IsLicence       = Convert.ToChar(ddl_wuzheng.SelectedValue);
     exeCheckArgs.IsFiling        = Convert.ToChar(ddl_jiandang.SelectedValue);
     exeCheckArgs.StartDateTime   = Convert.ToDateTime(dp_start.Text);
     exeCheckArgs.End_DateTime    = Convert.ToDateTime(dp_end.Text);
     exeCheckArgs.CheckPoint      = txt_address.Text;
     exeCheckArgs.IsRectification = Convert.ToChar(ddl_zhenggai.SelectedValue);
     if (ddl_zhenggai.SelectedValue == "1")
     {
         exeCheckArgs.Review = Convert.ToDateTime(dp_fucha.Text);
     }
     else
     {
         exeCheckArgs.Review = Convert.ToDateTime("0001-01-01");
     }
     exeCheckArgs.IsReview = Convert.ToChar(ddl_fucha.SelectedValue);
     if (ddl_fucha.SelectedValue == "1")
     {
         exeCheckArgs.RectificationResult = Convert.ToChar(ddl_zhqk.SelectedValue);
     }
     else
     {
         exeCheckArgs.RectificationResult = ' ';
     }
     ExtAspNet.CheckBoxList checkboxlist = row_TouchFiled.FindControl("touchFiled1") as ExtAspNet.CheckBoxList;
     if (checkboxlist.SelectedIndexArray.Length == 0)
     {
         exeCheckArgs.TouchFiled = "";
     }
     else
     {
         for (int i = 0; i < checkboxlist.SelectedValueArray.Length; i++)
         {
             exeCheckArgs.TouchFiled = exeCheckArgs.TouchFiled + "|" + checkboxlist.SelectedValueArray[i];
         }
     }
     exeCheckArgs.Remark = txt_remark.Text;
     ExtAspNet.DropDownList dropdownList = row_CheckResult.FindControl("DdcheckResult1") as ExtAspNet.DropDownList;
     exeCheckArgs.CheckResult  = Convert.ToInt64(dropdownList.SelectedValue);
     exeCheckArgs.CheckOne     = Convert.ToInt64((Session["User"] as DataTable).Rows[0]["USER_ID"]);
     exeCheckArgs.CheckOneName = (Session["User"] as DataTable).Rows[0]["USER_NAME"].ToString();
     exeCheckArgs.CheckTwo     = Convert.ToInt64(ddl_Checker.SelectedValue);
     exeCheckArgs.CheckTwoName = ddl_Checker.SelectedText.ToString();
     if (Session["ExeCheckTitleClassList"] != null)
     {
         List <AnswerTitle> ListAnswerTitle = Session["ExeCheckTitleClassList"] as List <AnswerTitle>;
         if (ListAnswerTitle != null)
         {
             string CheckResult = "{0}卫生监督员【{1},{2}】,对【{3}】进行现场检查。检查人员向【{4}】负责人出示执法证并了解相关情况,经检查发现:" + Environment.NewLine;
             CheckResult = string.Format(CheckResult, (Session["User"] as DataTable).Rows[0]["ORGAN_NAME"].ToString(), (Session["User"] as DataTable).Rows[0]["USER_NAME"].ToString(), ddl_Checker.SelectedText, Session["UnitName"].ToString(), Session["UnitName"].ToString());
             string CheckAdvice = "";
             int    a           = 1;
             int    b           = 1;
             //List<AnswerTitle> ListAnswerTitle1 = Session["ExeCheckTitleClassList"] as List<AnswerTitle>;
             for (int i = 0; i < ListAnswerTitle.Count; i++)
             {
                 if (ListAnswerTitle[i].IsAnswered == true)
                 {
                     if (ListAnswerTitle[i].TitleRusult != "")
                     {
                         CheckResult = CheckResult + a.ToString() + "、 " + ListAnswerTitle[i].TitleRusult + "。" + Environment.NewLine;
                         a++;
                     }
                     if (ListAnswerTitle[i].TitleAdvice != "")
                     {
                         CheckAdvice = CheckAdvice + b.ToString() + "、 " + ListAnswerTitle[i].TitleAdvice + "。" + Environment.NewLine;
                         b++;
                     }
                 }
             }
             exeCheckArgs.CheckNotes   = string.Format(CheckResult, exeCheckArgs.CheckOneName, exeCheckArgs.CheckTwoName, exeCheckArgs.UnitName, exeCheckArgs.UnitName);
             exeCheckArgs.CheckOpinion = CheckAdvice;
         }
         else
         {
             exeCheckArgs.CheckNotes   = "";
             exeCheckArgs.CheckOpinion = "";
         }
     }
     else
     {
         exeCheckArgs.CheckNotes   = "";
         exeCheckArgs.CheckOpinion = "";
     }
     exeCheckArgs.listCheckTitle = Session["ExeCheckTitleClassList"] as List <AnswerTitle>;
     exeCheckArgs.organ_id       = Convert.ToInt64((Session["User"] as DataTable).Rows[0]["ORGAN_ID"]);
     exeCheckArgs.UserId         = Convert.ToInt64((Session["User"] as DataTable).Rows[0]["USER_ID"]);
     OnExeCheck(null, exeCheckArgs);
 }