Exemple #1
0
    /// <summary>
    /// 添加
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string tname = txt_levname.Text;

        SP.Model.actionType model = new SP.Model.actionType();
        model.levname = tname;

        bll.Add(model);

        Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('操作成功,请返回!');location.href='List.aspx';</script>");
    }
Exemple #2
0
    /// <summary>
    /// 编辑
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        //更新
        string levname = txt_levname.Text;

        SP.Model.actionType model = new SP.Model.actionType();
        model.levname = levname;
        model.levid   = int.Parse(Request.QueryString["id"]);

        //提交到数据库
        bll.Update(model);

        Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('操作成功,请返回!');location.href='List.aspx';</script>");
    }
Exemple #3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(SP.Model.actionType model)
 {
     return(dal.Update(model));
 }
Exemple #4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(SP.Model.actionType model)
 {
     return(dal.Add(model));
 }