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 ProductIn:BasePage
    {
        BaseBLL bll = new BaseBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Tb_ProPerInName.Text = Session["UserName"].ToString();
            }
        }

        protected void Ibt_Submit_Click(object sender, ImageClickEventArgs e)
        {
         
            Dictionary<string, string> dic = base.FindControls(this.form1);
            object obj = bll.CreateObject(typeof(ProIn), dic);
            if (bll.SaveObject(obj, "ProIn") == 0)
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('操作成功！')", true);
                Tb_ProCount.Text = "";
                Tb_ProName.Text = "";
                Tb_ProStyle.Text = "";
                Tb_ProPrice.Text = "";
                Tb_ProPerName.Text = "";
            }
            else
            {
                System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('操作失败！')", true);
            }

        }

        protected void Ibt_Check_Click(object sender, ImageClickEventArgs e)
        {
            System.Web.UI.ScriptManager.RegisterStartupScript(this, Page.GetType(), "ajaxjs", " var sReturn=window.showModalDialog('SelectPerson.aspx','window','dialogWidth:180px;dialogHeight:300px;help:0;scroll:1;status:no;');document.getElementById('" + this.Tb_ProPerName.UniqueID + "').value=sReturn;", true);
      
        }
    }
}