Пример #1
0
        protected void Delete_OnClick(object sender, EventArgs e)
        {
            DataSet ds = new DataSet();
            ExtendBLL.Standard stan = new ExtendBLL.Standard();
            ds = stan.GetSelfInfoByTitleID(int.Parse(TitleDDL.SelectedValue), LabDDL.SelectedValue, int.Parse(DateDDL.SelectedValue));
            string strWhere="1=0";

            for(int i=0;i<ds.Tables[0].Rows.Count;i++)
            {
                strWhere+=" or EID="+int.Parse(ds.Tables[0].Rows[i]["EID"].ToString());
            }
            try
            {
                stan.DeleteEva(strWhere);
                Page.ClientScript.RegisterClientScriptBlock(GetType(), "", "<script type='text/javascript'>alert('删除成功!')</script>");
                DateDropDownList(int.Parse(TitleDDL.SelectedValue), int.Parse(LabDDL.SelectedValue));
                if (DateDDL.SelectedValue != "")
                {
                    EvalTitleGV_DataBind(int.Parse(TitleDDL.SelectedValue),LabDDL.SelectedValue, int.Parse(DateDDL.SelectedValue));
                }
                else
                {
                    EvalResultGridView.DataSource = "";
                    EvalResultGridView.DataBind();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
        //绑定评估日期
        protected void DateDropDownList(int ID, int LabID)
        {
            ExtendBLL.Standard sta = new ExtendBLL.Standard();
            DataSet ds = new DataSet();

            ds = sta.GetDateList(ID, LabID);
            DateDDL.DataSource = ds;
            DateDDL.DataBind();
        }
Пример #3
0
 //根据主题ID获取评估标准信息
 protected DataSet GetStandardByTitleID(int TitleID, string strLabID,int EvTimeID)
 {
     ExtendBLL.Standard stan = new ExtendBLL.Standard();
     DataSet ds = new DataSet();
     try
     {
         ds = stan.GetSelfInfoByTitleID(TitleID, strLabID,EvTimeID);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return ds;
 }
Пример #4
0
        //获取评估次数
        protected int GetMaxEvTime(int TitleID, int LabID)
        {
            ExtendBLL.Standard sta = new ExtendBLL.Standard();
            DataSet ds = new DataSet();
            int Time;

            ds = sta.GetMaxTime(TitleID, LabID);
            if (ds.Tables[0].Rows.Count == 0 || ds.Tables[0].Rows[0][0].ToString()=="")
            {
                Time = 1;
            }
            else
            {
                Time = int.Parse(ds.Tables[0].Rows[0][0].ToString()) + 1;
            }
            return Time;
        }
Пример #5
0
        //保存
        protected void Save_OnClick(object sender, EventArgs e)
        {
            List<string[]> list = new List<string[]>();

            int count = LabEvalGridView.Rows.Count;
            int EvTime;
            for (int i = 0; i < count; i++)
            {
                string[] str = new string[4];
                TextBox selftb = (TextBox)LabEvalGridView.Rows[i].FindControl("SelfEvalTBX");
                TextBox resulttb = (TextBox)LabEvalGridView.Rows[i].FindControl("EventTBX");
                RadioButton rbl = (RadioButton)LabEvalGridView.Rows[i].FindControl("IsRBL1");

                str[0] = selftb.Text.Trim();
                str[1] = resulttb.Text.Trim();
                if (rbl.Checked == true)
                {
                    str[2] = "1";
                }
                else
                {
                    str[2] = "0";
                }
                str[3] = LabEvalGridView.DataKeys[i]["ID"].ToString();
                list.Add(str);
            }
            EvTime = GetMaxEvTime(int.Parse(TitleDDL.SelectedValue), int.Parse(LabDDL.SelectedValue));
            ExtendBLL.Standard stan = new ExtendBLL.Standard();
            try
            {
                stan.AddSelfInfo(int.Parse(LabDDL.SelectedValue), list,EvTime);
                Page.ClientScript.RegisterClientScriptBlock(GetType(), "", "<script type='text/javascript'>alert('添加成功!');refreshParent();</script>");
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }