示例#1
0
    protected void submitButton_Click(object sender, EventArgs e)
    {
        //清空Label信息
        this.ClearLabel();
        //验证分类名称是否有效
        if (!ValidateFLMC())
        {
            return;
        }
        //验证分类编码是否有效
        if (!ValidateFLBM())
        {
            return;
        }
        //验证通过则插入新记录
        GJIBZ_FL gjibzFL = new GJIBZ_FL();
        gjibzFL.flmc = this.flmcTextBox.Text.Trim();
        gjibzFL.flbm = this.flbmTextBox.Text.Trim();
        gjibzFL.zyfl = this.zyflTextBox.Text.Trim();
        gjibzFL.ywmc = this.wwmcTextBox.Text.Trim();
        gjibzFL.wjtz = this.wjtzTextBox.Text.Trim();
        gjibzFL.fjtz = this.fjtzTextBox.Text.Trim();

        gjibzDAO.InsertGJIBZ_FL(gjibzFL);

        Response.Write("<Script>alert('添加国际标准分类成功')</Script>");
    }
示例#2
0
文件: GJIBZ_DAO.cs 项目: Brinews/Code
 /// <summary>
 /// 更新一条分类信息
 /// </summary>
 /// <param name="gjbz_fl">要更新的分类信息</param>
 /// <returns></returns>
 public Boolean UpdateGJIBZ_FL(GJIBZ_FL gjbz_fl)
 {
     Boolean flag = true;
     int back = sqlMapper.Update("UpdateGJIBZ_FL", gjbz_fl);
     if (back <= 0)
     {
         flag = false;
     }
     return flag;
 }
示例#3
0
文件: GJIBZ_DAO.cs 项目: Brinews/Code
        /// <summary>
        /// 插入一条分类信息
        /// </summary>
        /// <param name="gjbz_fl">分类信息</param>
        /// <returns></returns>
        public Boolean InsertGJIBZ_FL(GJIBZ_FL gjbz_fl)
        {
            Boolean flag = true;
            try
            {
                sqlMapper.Insert("InsertGJIBZ_FL", gjbz_fl);
            }
            catch (Exception)
            {
                flag = false;
            }

            return flag;
        }