Example #1
0
 protected void btn_Search_Click(object sender, EventArgs e)
 {
     try
     {
         CheckInput();
         Model_SysModule model = InsertOrUpdate();
         if (module_ID != null && module_ID != "" && actionType == "2")
         {
             if (sysModuleBll.UpdateSysModuleBySyscodeAndModuleID(model))
             {
                 ClientScript.RegisterStartupScript(this.GetType(), "fildSave", "<script type='text/javascript'>parent.Handel('操作成功', '');</script>");
             }
             else
             {
                 ClientScript.RegisterStartupScript(this.GetType(), "fildSave", "<script type='text/javascript'>parent.showTipsErr('修改模块失败!', '4');</script>");
             }
         }
         else
         {
             if (CheckExists(model, "1"))
             {
                 ClientScript.RegisterStartupScript(this.GetType(), "fildSave", "<script type='text/javascript'>parent.showTipsErr('此模块ID已存在', '4');</script>");
             }
             else
             {
                 if (sysModuleBll.AddSysModule(model))
                 {
                     ClientScript.RegisterStartupScript(this.GetType(), "fildSave", "<script type='text/javascript'>parent.Handel('操作成功', '');</script>");
                 }
                 else
                 {
                     ClientScript.RegisterStartupScript(this.GetType(), "fildSave", "<script type='text/javascript'>parent.showTipsErr('新增模块失败!', '4');</script>");
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Rc.Common.SystemLog.SystemLog.AddLogErrorFromBS(loginUser.SysUser_ID, Module_Id, string.Format("类:{0},方法:{1},错误信息:{2}, 详细:{3}", ex.TargetSite.DeclaringType.ToString(), ex.TargetSite.Name.ToString(), ex.Message, ex.StackTrace));
         throw ex;
     }
 }