private void UpdateKHType()
 {
     PD_BASE_KAOPINGTYPEDETAIL_Model model = new PD_BASE_KAOPINGTYPEDETAIL_Model();
     PD_BASE_KAOPINGTYPEDETAIL_Bll bll = new PD_BASE_KAOPINGTYPEDETAIL_Bll();
     if (base.Request["PK"] != null)
     {
         model.AUTO_ID = new int?(Convert.ToInt32(base.Request["PK"].ToString()));
     }
     model.KP_CONTENT = this.txtKPContent.Text;
     model.KP_BIAOZHUN = this.txtKP_BiaoZhun.Text;
     model.KP_YEAR = this.ddlKP_Year.SelectedValue;
     model.KP_TYPEID = new int?(int.Parse(this.txtKHTypeID.Value));
     model.ISCOMFIRM = this.ddlIsComfirm.SelectedValue.ToString();
     if (bll.Update(model))
     {
         Const.DoSuccessClose("修改成功", this.Page);
     }
 }
 private void AddKHTypeDetail()
 {
     try
     {
         if (this.txtKPContent.Text.Trim() == "")
         {
             Const.ShowMessage("请输入考评内容!", this.Page);
         }
         if (this.txtKP_BiaoZhun.Text.Trim() == "")
         {
             Const.ShowMessage("请输入扣分标准!", this.Page);
         }
         else
         {
             PD_BASE_KAOPINGTYPEDETAIL_Model model = new PD_BASE_KAOPINGTYPEDETAIL_Model();
             PD_BASE_KAOPINGTYPEDETAIL_Bll bll = new PD_BASE_KAOPINGTYPEDETAIL_Bll();
             model.KP_CONTENT = this.txtKPContent.Text;
             model.KP_BIAOZHUN = this.txtKP_BiaoZhun.Text;
             model.KP_YEAR = this.ddlKP_Year.SelectedValue;
             model.KP_TYPEID = new int?(int.Parse(this.txtKHTypeID.Value));
             DataSet set = DbHelperOra.Query("select khtypeper from PD_BASE_KAOPINGTYPE where auto_id=" + model.KP_TYPEID);
             if (set != null)
             {
                 model.KP_BASECODE = new int?(Convert.ToInt32(set.Tables[0].Rows[0][0].ToString()));
             }
             else
             {
                 model.KP_BASECODE = 0;
             }
             model.ISCOMFIRM = this.ddlIsComfirm.SelectedValue.ToString();
             bll.Add(model);
             Const.DoSuccessOpen("", this.Page);
         }
     }
     catch (Exception exception)
     {
         this.el = new ExceptionLog.ExceptionLog();
         this.el.ErrClassName = base.GetType().ToString();
         this.el.ErrMessage = exception.Message.ToString();
         this.el.ErrMethod = "AddMenu()";
         this.el.WriteExceptionLog(true);
         Const.OpenErrorPage("操作失败,请联系管理员!", this.Page);
     }
 }
 private void ShowInfo(string pk)
 {
     PD_BASE_KAOPINGTYPEDETAIL_Model model = new PD_BASE_KAOPINGTYPEDETAIL_Model();
     model = new PD_BASE_KAOPINGTYPEDETAIL_Bll().GetModel(Convert.ToInt32(pk));
     this.txtKPContent.Text = model.KP_CONTENT;
     this.txtKP_BiaoZhun.Text = model.KP_BIAOZHUN;
     this.ddlKP_Year.SelectedValue = model.KP_YEAR;
     this.ddlIsComfirm.SelectedValue = model.ISCOMFIRM.ToString();
     this.txtKHTypeID.Value = model.KP_TYPEID.ToString();
     this.txtKHType.Value = model.typename.ToString();
 }
 private void AddKHTypeDetail()
 {
     try
     {
         if (this.txtKPContent.Text.Trim() == "")
         {
             Const.ShowMessage("请输入考评内容!", this.Page);
         }
         if (this.txtKP_BiaoZhun.Text.Trim() == "")
         {
             Const.ShowMessage("请输入扣分标准!", this.Page);
         }
         else
         {
             PD_BASE_KAOPINGTYPEDETAIL_Model model = new PD_BASE_KAOPINGTYPEDETAIL_Model();
             PD_BASE_KAOPINGTYPEDETAIL_Bll bll = new PD_BASE_KAOPINGTYPEDETAIL_Bll();
             model.KP_CONTENT = this.txtKPContent.Text;
             model.KP_BIAOZHUN = this.txtKP_BiaoZhun.Text;
             model.KP_YEAR = this.ddlKP_Year.SelectedValue;
             model.KP_TYPEID = new int?(this.KPTypeID);
             model.ISCOMFIRM = this.ddlIsComfirm.SelectedValue.ToString();
             bll.Add(model);
             Const.DoSuccessOpen("", this.Page);
         }
     }
     catch (Exception exception)
     {
         this.el = new ExceptionLog.ExceptionLog();
         this.el.ErrClassName = base.GetType().ToString();
         this.el.ErrMessage = exception.Message.ToString();
         this.el.ErrMethod = "AddMenu()";
         this.el.WriteExceptionLog(true);
         Const.OpenErrorPage("操作失败,请联系管理员!", this.Page);
     }
 }