Esempio n. 1
0
    protected void submitButton_Click(object sender, EventArgs e)
    {
        //清空Label信息
        this.ClearLabel();
        //验证分类名称是否有效
        if (!ValidateFLMC())
        {
            return;
        }
            //验证分类编码是否有效
        else if (!ValidateFLBM())
        {
            return;
        }
        //验证通过则插入新记录
        TSSC_FL tsscFL = new TSSC_FL();
        tsscFL.flmc = this.flmcTextBox.Text.Trim();
        tsscFL.flbm = this.flbmTextBox.Text.Trim();
        tsscFL.zyfl = this.zyflTextBox.Text.Trim();
        tsscDAO.InsertTSSC_FL(tsscFL);

        Response.Write("<Script>alert('添加图书手册分类成功')</Script>");
    }
Esempio n. 2
0
 /// <summary>
 /// 更新一条分类信息
 /// </summary>
 /// <param name="tssc_fl">要更新的分类信息</param>
 /// <returns></returns>
 public Boolean UpdateTSSC_FL(TSSC_FL tssc_fl)
 {
     Boolean flag = true;
     int back = sqlMapper.Update("UpdateTSSC_FL", tssc_fl);
     if (back <= 0)
     {
         flag = false;
     }
     return flag;
 }
Esempio n. 3
0
        /// <summary>
        /// 插入一条分类信息
        /// </summary>
        /// <param name="tssc_fl">分类信息</param>
        /// <returns></returns>
        public Boolean InsertTSSC_FL(TSSC_FL tssc_fl)
        {
            Boolean flag = true;
            try
            {
                sqlMapper.Insert("InsertTSSC_FL", tssc_fl);
            }
            catch (Exception)
            {
                flag = false;
            }

            return flag;
        }