Пример #1
0
    protected void submitButton_Click(object sender, EventArgs e)
    {
        //清空Label信息
        this.ClearLabel();
        //验证分类名称是否有效
        if (!ValidateFLMC())
        {
            return;
        }
            //验证分类编码是否有效
        else if (!ValidateFLBM())
        {
            return;
        }
        //验证通过则插入新记录
        WWQK_FL wwqkFL = new WWQK_FL();
        wwqkFL.flmc = this.flmcTextBox.Text.Trim();
        wwqkFL.flbm = this.flbmTextBox.Text.Trim();
        wwqkFL.flsm = this.flsmTextBox.Text.Trim();
        wwqkDAO.insertWwqkFL(wwqkFL);

        Response.Write("<Script>alert('添加外文期刊分类成功')</Script>");
    }
Пример #2
0
 /// <summary>
 /// 按分类编码更新分类信息。
 /// 分类编码为主键。
 /// </summary>
 /// <param name="fl"></param>
 /// <returns></returns>
 public bool updateWwqkFLByFLBM(WWQK_FL fl)
 {
     bool result;
     try
     {
         sqlMapper.BeginTransaction();
         sqlMapper.Update("UpdateWWQK_FL", fl);
         sqlMapper.CommitTransaction();
         result = true;
     }
     catch
     {
         sqlMapper.RollBackTransaction();
         result = false;
     }
     return result;
 }
Пример #3
0
 /// <summary>
 /// 插入外文期刊分类信息。
 /// </summary>
 /// <param name="fl"></param>
 public void insertWwqkFL(WWQK_FL fl)
 {
     sqlMapper.Insert("InsertWWQK_FL", fl);
 }