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

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

            return flag;
        }