Exemple #1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPOffice Model = new ZWL.BLL.ERPOffice();

        Model.OfficeName=this.txtOfficeName.Text.ToString();
        Model.MiaoShu=this.txtMiaoShu.Text.ToString();
        Model.FuJianStr=ZWL.Common.PublicMethod.GetSessionValue("WenJianList");
        Model.TypeStr=this.txtTypeStr.Text.ToString();
        Model.Serils=this.txtSerils.Text.ToString();
        Model.DanWei=this.txtDanWei.Text.ToString();
        Model.DanJia=this.txtDanJia.Text.ToString();
        Model.GongYingShang=this.txtGongYingShang.Text.ToString();
        Model.MinNum=this.txtMinNum.Text.ToString();
        Model.MaxNum=this.txtMaxNum.Text.ToString();
        Model.NowNum=this.txtNowNum.Text.ToString();
        Model.UserName=ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.TimeStr=DateTime.Now;

        Model.Add();

        //дϵͳ��־
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "�û���Ӱ칫��Ʒ��Ϣ(" + this.txtOfficeName.Text + ")";
        MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "�칫��Ʒ��Ϣ��ӳɹ���", "Office.aspx");
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPOffice Model = new ZWL.BLL.ERPOffice();
            Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.lblOfficeName.Text=Model.OfficeName.ToString();
            this.lblMiaoShu.Text=Model.MiaoShu.ToString();
            this.lblFuJianStr.Text=ZWL.Common.PublicMethod.GetWenJian(Model.FuJianStr.ToString(),"../UpLoadFile/");
            this.lblTypeStr.Text=Model.TypeStr.ToString();
            this.lblSerils.Text=Model.Serils.ToString();
            this.lblDanWei.Text=Model.DanWei.ToString();
            this.lblDanJia.Text=Model.DanJia.ToString();
            this.lblGongYingShang.Text=Model.GongYingShang.ToString();
            this.lblMinNum.Text=Model.MinNum.ToString();
            this.lblMaxNum.Text=Model.MaxNum.ToString();
            this.lblNowNum.Text=Model.NowNum.ToString();
            this.lblUserName.Text=Model.UserName.ToString();
            this.lblTimeStr.Text=Model.TimeStr.ToString();

            //дϵͳ��־
            ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyRiZhi.DoSomething = "�û��鿴�칫��Ʒ��Ϣ(" + this.lblOfficeName.Text + ")";
            MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();

        }
    }
Exemple #3
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPOffice Model = new ZWL.BLL.ERPOffice();

        Model.ID            = int.Parse(Request.QueryString["ID"].ToString());
        Model.OfficeName    = this.txtOfficeName.Text.ToString();
        Model.MiaoShu       = this.txtMiaoShu.Text.ToString();
        Model.FuJianStr     = ZWL.Common.PublicMethod.GetSessionValue("WenJianList");
        Model.TypeStr       = this.txtTypeStr.Text.ToString();
        Model.Serils        = this.txtSerils.Text.ToString();
        Model.DanWei        = this.txtDanWei.Text.ToString();
        Model.DanJia        = this.txtDanJia.Text.ToString();
        Model.GongYingShang = this.txtGongYingShang.Text.ToString();
        Model.MinNum        = this.txtMinNum.Text.ToString();
        Model.MaxNum        = this.txtMaxNum.Text.ToString();
        Model.NowNum        = this.txtNowNum.Text.ToString();
        Model.UserName      = this.txtUserName.Text.ToString();
        Model.TimeStr       = DateTime.Parse(this.txtTimeStr.Text);

        Model.Update();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户修改办公用品信息(" + this.txtOfficeName.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "办公用品信息修改成功!", "Office.aspx");
    }
Exemple #4
0
 public void DataBindToGridview(string IDList)
 {
     ZWL.BLL.ERPOffice MyModel = new ZWL.BLL.ERPOffice();
     if (IDList.Trim().Length > 0)
     {
         GVData.DataSource = MyModel.GetList(" " + DropDownList2.SelectedItem.Value.ToString() + " like '%" + this.TextBox3.Text.Trim() + "%' and ID in(" + IDList + ") order by ID desc");
     }
     else
     {
         GVData.DataSource = MyModel.GetList(" " + DropDownList2.SelectedItem.Value.ToString() + " like '%" + this.TextBox3.Text.Trim() + "%' order by ID desc");
     }
     GVData.DataBind();
     LabPageSum.Text     = Convert.ToString(GVData.PageCount);
     LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
     this.GoPage.Text    = LabCurrentPage.Text.ToString();
 }
Exemple #5
0
 public void DataBindToGridview(string IDList)
 {
     ZWL.BLL.ERPOffice MyModel = new ZWL.BLL.ERPOffice();
     if (IDList.Trim().Length > 0)
     {
         GVData.DataSource = MyModel.GetList(" " + DropDownList2.SelectedItem.Value.ToString() + " like '%" + this.TextBox3.Text.Trim() + "%' and ID in(" + IDList + ") order by ID desc");
     }
     else
     {
         GVData.DataSource = MyModel.GetList(" " + DropDownList2.SelectedItem.Value.ToString() + " like '%" + this.TextBox3.Text.Trim() + "%' order by ID desc");
     }
     GVData.DataBind();
     LabPageSum.Text = Convert.ToString(GVData.PageCount);
     LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
     this.GoPage.Text = LabCurrentPage.Text.ToString();
 }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         ZWL.BLL.ERPOffice Model = new ZWL.BLL.ERPOffice();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.txtOfficeName.Text = Model.OfficeName.ToString();
         this.txtMiaoShu.Text    = Model.MiaoShu.ToString();
         ZWL.Common.PublicMethod.SetSessionValue("WenJianList", Model.FuJianStr);
         ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
         this.txtTypeStr.Text       = Model.TypeStr.ToString();
         this.txtSerils.Text        = Model.Serils.ToString();
         this.txtDanWei.Text        = Model.DanWei.ToString();
         this.txtDanJia.Text        = Model.DanJia.ToString();
         this.txtGongYingShang.Text = Model.GongYingShang.ToString();
         this.txtMinNum.Text        = Model.MinNum.ToString();
         this.txtMaxNum.Text        = Model.MaxNum.ToString();
         this.txtNowNum.Text        = Model.NowNum.ToString();
         this.txtUserName.Text      = Model.UserName.ToString();
         this.txtTimeStr.Text       = Model.TimeStr.ToString();
     }
 }
Exemple #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         ZWL.BLL.ERPOffice Model = new ZWL.BLL.ERPOffice();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.txtOfficeName.Text=Model.OfficeName.ToString();
         this.txtMiaoShu.Text=Model.MiaoShu.ToString();
     ZWL.Common.PublicMethod.SetSessionValue("WenJianList", Model.FuJianStr);
     ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
         this.txtTypeStr.Text=Model.TypeStr.ToString();
         this.txtSerils.Text=Model.Serils.ToString();
         this.txtDanWei.Text=Model.DanWei.ToString();
         this.txtDanJia.Text=Model.DanJia.ToString();
         this.txtGongYingShang.Text=Model.GongYingShang.ToString();
         this.txtMinNum.Text=Model.MinNum.ToString();
         this.txtMaxNum.Text=Model.MaxNum.ToString();
         this.txtNowNum.Text=Model.NowNum.ToString();
         this.txtUserName.Text=Model.UserName.ToString();
         this.txtTimeStr.Text=Model.TimeStr.ToString();
     }
 }