using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Model;
namespace ComResProSystem
{
    public partial class AddWorkPro:BasePage
    {
        BaseBLL bll = new BaseBLL();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Ibt_Submit_Click(object sender, ImageClickEventArgs e)
        {
            Dictionary<string, string> dic = base.FindControls(this.form1);
            dic.Add("AddUser", Session["UserName"].ToString());
            object obj = bll.CreateObject(typeof(Model.WorkPro), dic);
            if (bll.SaveObject(obj, "WorkPro") == 0)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('添加成功！')", true);
                base.SetDefault(this.form1);
            }
            else
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('添加失败！')", true);
                
            }
        }
    }
}