using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;
using BLL;
namespace ComResProSystem
{
    public partial class AddWorkPlan: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.WorkPlan), dic);
            if (bll.SaveObject(obj, "WorkPlan") == 0)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('操作成功！')", true);
                base.SetDefault(this.form1);
            }
            else
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('操作失败！')", true);
               
            }
        }
    }
}