예제 #1
0
파일: OfficeAdd.aspx.cs 프로젝트: cnbin/HLB
    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");
    }
예제 #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();

        }
    }
예제 #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");
    }
예제 #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();
 }
예제 #5
0
파일: Office.aspx.cs 프로젝트: cnbin/HLB
 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();
 }
예제 #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();
     }
 }
예제 #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();
     }
 }