Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPSupplys Model = new ZWL.BLL.ERPSupplys();
            Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.lblSupplysName.Text = Model.SupplysName.ToString();
            GongYingShang            = Model.SupplysName.ToString();
            this.lblSerils.Text      = Model.Serils.ToString();
            this.lblJianCheng.Text   = Model.JianCheng.ToString();
            this.lblDianHua.Text     = Model.DianHua.ToString();
            this.lblMobTel.Text      = Model.MobTel.ToString();
            this.lblChuanZhen.Text   = Model.ChuanZhen.ToString();
            this.lblURLStr.Text      = Model.URLStr.ToString();
            this.lblEmailStr.Text    = Model.EmailStr.ToString();
            this.lblDiQu.Text        = Model.DiQu.ToString();
            this.lblYouBian.Text     = Model.YouBian.ToString();
            this.lblAddress.Text     = Model.Address.ToString();
            this.lblKaiHuHang.Text   = Model.KaiHuHang.ToString();
            this.lblZhangHao.Text    = Model.ZhangHao.ToString();
            this.lblBackInfo.Text    = Model.BackInfo.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.lblSupplysName.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();
        }
    }
Exemplo n.º 2
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPSupplys Model = new ZWL.BLL.ERPSupplys();

        Model.SupplysName = this.txtSupplysName.Text.ToString();
        Model.Serils      = this.txtSerils.Text.ToString();
        Model.JianCheng   = this.txtJianCheng.Text.ToString();
        Model.DianHua     = this.txtDianHua.Text.ToString();
        Model.MobTel      = this.txtMobTel.Text.ToString();
        Model.ChuanZhen   = this.txtChuanZhen.Text.ToString();
        Model.URLStr      = this.txtURLStr.Text.ToString();
        Model.EmailStr    = this.txtEmailStr.Text.ToString();
        Model.DiQu        = this.txtDiQu.Text.ToString();
        Model.YouBian     = this.txtYouBian.Text.ToString();
        Model.Address     = this.txtAddress.Text.ToString();
        Model.KaiHuHang   = this.txtKaiHuHang.Text.ToString();
        Model.ZhangHao    = this.txtZhangHao.Text.ToString();
        Model.BackInfo    = this.txtBackInfo.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.txtSupplysName.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "供应商信息添加成功!", "Supplys.aspx");
    }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         ZWL.BLL.ERPSupplys Model = new ZWL.BLL.ERPSupplys();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.txtSupplysName.Text = Model.SupplysName.ToString();
         this.txtSerils.Text      = Model.Serils.ToString();
         this.txtJianCheng.Text   = Model.JianCheng.ToString();
         this.txtDianHua.Text     = Model.DianHua.ToString();
         this.txtMobTel.Text      = Model.MobTel.ToString();
         this.txtChuanZhen.Text   = Model.ChuanZhen.ToString();
         this.txtURLStr.Text      = Model.URLStr.ToString();
         this.txtEmailStr.Text    = Model.EmailStr.ToString();
         this.txtDiQu.Text        = Model.DiQu.ToString();
         this.txtYouBian.Text     = Model.YouBian.ToString();
         this.txtAddress.Text     = Model.Address.ToString();
         this.txtKaiHuHang.Text   = Model.KaiHuHang.ToString();
         this.txtZhangHao.Text    = Model.ZhangHao.ToString();
         this.txtBackInfo.Text    = Model.BackInfo.ToString();
         this.txtUserName.Text    = Model.UserName.ToString();
         this.txtTimeStr.Text     = Model.TimeStr.ToString();
     }
 }
Exemplo n.º 4
0
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPSupplys MyModel = new ZWL.BLL.ERPSupplys();
        string             sql     = "";

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            sql += "(SupplysName Like '%" + this.TextBox1.Text + "%' or Serils Like '%" + this.TextBox1.Text + "%' or JianCheng Like '%" + this.TextBox1.Text + "%' or MobTel Like '%" + this.TextBox1.Text + "%' or UserName Like '%" + this.TextBox1.Text + "%' or ChuanZhen Like '%" + this.TextBox1.Text + "%' or DiQu Like '%" + this.TextBox1.Text + "%')";
        }
        if (!string.IsNullOrEmpty(this.TextBox3.Text))
        {
            if (string.IsNullOrEmpty(sql))
            {
                sql += " TimeStr >='" + this.TextBox3.Text.Trim() + " 00:00:00' and TimeStr<='" + this.TextBox4.Text.Trim() + " 23:59:59' ";
            }
            else
            {
                sql += "and TimeStr >='" + this.TextBox3.Text.Trim() + " 00:00:00' and TimeStr<='" + this.TextBox4.Text.Trim() + " 23:59:59' ";
            }
            sql += " order by ID desc";
        }
        GVData.DataSource = MyModel.GetList(sql);
        GVData.DataBind();
        LabPageSum.Text     = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text    = LabCurrentPage.Text.ToString();
    }
Exemplo n.º 5
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPSupplys MyModel = new ZWL.BLL.ERPSupplys();
     GVData.DataSource = MyModel.GetList("SupplysName Like '%" + this.TextBox1.Text + "%' 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();
 }