Пример #1
0
 protected void submitButton_Click(object sender, EventArgs e)
 {
     //验证分类名称是否有效
     if (!ValidateFLMC())
     {
         return;
     }
         //验证分类编码是否有效
     else if (!ValidateFLBM())
     {
         return;
     }
     //验证通过则插入新记录
     JJBK_FL jjbkFL = new JJBK_FL();
     jjbkFL.flmc = this.flmcTextBox.Text.Trim();
     jjbkFL.flbm = this.flbmTextBox.Text.Trim();
     jjbkFL.zyfl = this.zyflTextBox.Text.Trim();
     if (jjbkDAO.InsertJJBK_FL(jjbkFL))
     {
         Response.Write("<Script>alert('添加经济报刊分类成功')</Script>");
     }
     else
     {
         Response.Write("<Script>alert('添加经济报刊分类失败')</Script>");
     }
 }
Пример #2
0
 /// <summary>
 /// 更新一条分类信息
 /// </summary>
 /// <param name="jjbk_fl">要更新的分类信息</param>
 /// <returns></returns>
 public Boolean UpdateJJBK_FL(JJBK_FL jjbk_fl)
 {
     Boolean flag = true;
     int back = sqlMapper.Update("UpdateJJBK_FL", jjbk_fl);
     if (back <= 0)
     {
         flag = false;
     }
     return flag;
 }
Пример #3
0
 /// <summary>
 /// 插入一条分类信息
 /// </summary>
 /// <param name="jjbk_fl">分类信息</param>
 /// <returns></returns>
 public Boolean InsertJJBK_FL(JJBK_FL jjbk_fl)
 {
     Boolean flag = true;
     try
     {
         sqlMapper.Insert("InsertJJBK_FL", jjbk_fl);
     }
     catch (Exception)
     {
         flag = false;
     }
     return flag;
 }