예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         ZWL.BLL.ERPBuyOrder Model = new ZWL.BLL.ERPBuyOrder();
         Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
         this.txtOrderName.Text         = Model.OrderName.ToString();
         this.txtGongYingShangName.Text = Model.GongYingShangName.ToString();
         this.txtSerils.Text            = Model.Serils.ToString();
         this.txtDingDanLeiXing.Text    = Model.DingDanLeiXing.ToString();
         this.txtDingDanMiaoShu.Text    = Model.DingDanMiaoShu.ToString();
         this.txtCreateDate.Text        = Model.CreateDate.ToString().Replace(" 0:00:00", "");
         this.txtLaiHuoDate.Text        = Model.LaiHuoDate.ToString().Replace(" 0:00:00", "");
         this.txtTiXingDate.Text        = Model.TiXingDate.ToString().Replace(" 0:00:00", "");
         this.txtChuangJianRen.Text     = Model.ChuangJianRen.ToString();
         this.txtFuZeRen.Text           = Model.FuZeRen.ToString();
         ZWL.Common.PublicMethod.SetSessionValue("WenJianList", Model.FuJianList);
         ZWL.Common.PublicMethod.BindDDL(this.CheckBoxList1, ZWL.Common.PublicMethod.GetSessionValue("WenJianList"));
         this.txtNowState.Text         = Model.NowState.ToString();
         this.txtShenPiTongGuoRen.Text = Model.ShenPiTongGuoRen.ToString();
         this.txtBackInfo.Text         = Model.BackInfo.ToString();
         this.txtUserName.Text         = Model.UserName.ToString();
         this.txtTimeStr.Text          = Model.TimeStr.ToString();
         this.txtGongYingShangName.Attributes.Add("readonly", "true");
     }
 }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPBuyOrder Model = new ZWL.BLL.ERPBuyOrder();
            Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.lblOrderName.Text = Model.OrderName.ToString();
            OrderName = Model.OrderName.ToString();
            this.lblGongYingShangName.Text = Model.GongYingShangName.ToString();
            this.lblSerils.Text            = Model.Serils.ToString();
            this.lblDingDanLeiXing.Text    = Model.DingDanLeiXing.ToString();
            this.lblDingDanMiaoShu.Text    = Model.DingDanMiaoShu.ToString();
            this.lblCreateDate.Text        = Model.CreateDate.ToString().Replace(" 0:00:00", "");
            this.lblLaiHuoDate.Text        = Model.LaiHuoDate.ToString().Replace(" 0:00:00", "");
            this.lblTiXingDate.Text        = Model.TiXingDate.ToString().Replace(" 0:00:00", "");
            this.lblChuangJianRen.Text     = Model.ChuangJianRen.ToString();
            this.lblFuZeRen.Text           = Model.FuZeRen.ToString();
            this.lblFuJianList.Text        = ZWL.Common.PublicMethod.GetWenJian(Model.FuJianList.ToString(), "../UploadFile/");
            this.lblNowState.Text          = Model.NowState.ToString();
            this.lblShenPiTongGuoRen.Text  = Model.ShenPiTongGuoRen.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.lblOrderName.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();
        }
    }
예제 #3
0
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPBuyOrder MyModel = new ZWL.BLL.ERPBuyOrder();
        MyModel.HZ();
        string XiaShuUser = ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select top 1 XiaShuUser from ERPUser where UserName='******'");
        string SSTempSTR  = "";

        if (XiaShuUser != "全部")
        {
            SSTempSTR = "and UserName in(" + "'" + XiaShuUser.Replace(",", "','") + "'" + ")";
        }
        string sql = "";

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            sql += "(OrderName Like '%" + this.TextBox1.Text + "%' or GongYingShangName Like '%" + this.TextBox1.Text + "%' or Serils Like '%" + this.TextBox1.Text + "%' or DingDanLeiXing Like '%" + this.TextBox1.Text + "%' or UserName Like '%" + this.TextBox1.Text + "%' or SFJF 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')  or (LaiHuoDate >='" + this.TextBox3.Text.Trim() + " 00:00:00' and LaiHuoDate<='" + this.TextBox4.Text.Trim() + " 23:59:59') or (TiXingDate >='" + this.TextBox3.Text.Trim() + " 00:00:00' and TiXingDate<='" + 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')  or (LaiHuoDate >='" + this.TextBox3.Text.Trim() + " 00:00:00' and LaiHuoDate<='" + this.TextBox4.Text.Trim() + " 23:59:59') or (TiXingDate >='" + this.TextBox3.Text.Trim() + " 00:00:00' and TiXingDate<='" + this.TextBox4.Text.Trim() + " 23:59:59')";
            }
            sql += " " + SSTempSTR + " 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();
    }
예제 #4
0
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPBuyOrder MyModel = new ZWL.BLL.ERPBuyOrder();
        MyModel.HZ();
        string sql = " UserName='******' ";

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            sql += "  and   (OrderName Like '%" + this.TextBox1.Text + "%' or GongYingShangName Like '%" + this.TextBox1.Text + "%' or Serils Like '%" + this.TextBox1.Text + "%' or DingDanLeiXing Like '%" + this.TextBox1.Text + "%' or SFJF 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')  or (LaiHuoDate >='" + this.TextBox3.Text.Trim() + " 00:00:00' and LaiHuoDate<='" + this.TextBox4.Text.Trim() + " 23:59:59') or (TiXingDate >='" + this.TextBox3.Text.Trim() + " 00:00:00' and TiXingDate<='" + 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')  or (LaiHuoDate >='" + this.TextBox3.Text.Trim() + " 00:00:00' and LaiHuoDate<='" + this.TextBox4.Text.Trim() + " 23:59:59') or (TiXingDate >='" + this.TextBox3.Text.Trim() + " 00:00:00' and TiXingDate<='" + 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();
    }
예제 #5
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPBuyOrder Model = new ZWL.BLL.ERPBuyOrder();

        Model.OrderName         = this.txtOrderName.Text.ToString();
        Model.GongYingShangName = this.txtGongYingShangName.Text.ToString();
        Model.Serils            = this.txtSerils.Text.ToString();
        Model.DingDanLeiXing    = this.txtDingDanLeiXing.Text.ToString();
        Model.DingDanMiaoShu    = this.txtDingDanMiaoShu.Text.ToString();
        Model.CreateDate        = DateTime.Parse(this.txtCreateDate.Text);
        Model.LaiHuoDate        = DateTime.Parse(this.txtLaiHuoDate.Text);
        Model.TiXingDate        = DateTime.Parse(this.txtTiXingDate.Text);
        Model.ChuangJianRen     = this.txtChuangJianRen.Text.ToString();
        Model.FuZeRen           = this.txtFuZeRen.Text.ToString();
        Model.FuJianList        = ZWL.Common.PublicMethod.GetSessionValue("WenJianList");
        Model.NowState          = "等待审核";
        Model.ShenPiTongGuoRen  = "";
        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.txtOrderName.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "采购订单信息添加成功!", "BuyDengJi.aspx");
    }
예제 #6
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPBuyOrder MyModel = new ZWL.BLL.ERPBuyOrder();
     GVData.DataSource = MyModel.GetList("OrderName 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();
 }
예제 #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ZWL.Common.PublicMethod.CheckSession();
         //设置上传的附件为空
         ZWL.Common.PublicMethod.SetSessionValue("WenJianList", "");
         string str = Request.QueryString["name"];
         ZWL.BLL.ERPBuyOrder Model = new ZWL.BLL.ERPBuyOrder();
         txtSerils.Text         = Model.GetSerils();
         this.txtOrderName.Text = str;
         this.txtGongYingShangName.Attributes.Add("readonly", "true");
         string sql = "insert into ERPBuyChanPin(OrderName,ProductName,Danjia,ShuLiang,ZongJia,YiFuKuan,QianKuanShu,IFJiaoFu) select HeTongName,ChanPinName,DanJia,ShuLiang,ZongJia,YiFuKuan,QianKuanShu,IFJiaoFu from ERPContractChanPin where HeTongName='" + str + "'";
         DbHelperSQL.ExecuteSql(sql.ToString());
     }
 }
예제 #8
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPBuyOrder Model  = new ZWL.BLL.ERPBuyOrder();
        ZWL.BLL.ERPContract Model1 = new ZWL.BLL.ERPContract();
        if (ZWL.Common.PublicMethod.IFExists("OrderName", "ERPBuyOrder", 0, this.txtOrderName.Text) == true)
        {
            Model.OrderName         = this.txtOrderName.Text.ToString();
            Model.GongYingShangName = this.txtGongYingShangName.Text.ToString();
            Model.Serils            = this.txtSerils.Text.ToString();
            Model.DingDanLeiXing    = this.txtDingDanLeiXing.Text.ToString();
            Model.DingDanMiaoShu    = this.txtDingDanMiaoShu.Text.ToString();
            Model.CreateDate        = DateTime.Parse(this.txtCreateDate.Text);
            Model.LaiHuoDate        = DateTime.Parse(this.txtLaiHuoDate.Text);
            Model.TiXingDate        = DateTime.Parse(this.txtTiXingDate.Text);
            Model.ChuangJianRen     = this.txtChuangJianRen.Text.ToString();
            Model.FuZeRen           = this.txtFuZeRen.Text.ToString();
            Model.FuJianList        = ZWL.Common.PublicMethod.GetSessionValue("WenJianList");
            Model.NowState          = "等待审核";
            Model.ShenPiTongGuoRen  = "";
            Model.BackInfo          = this.txtBackInfo.Text.ToString();
            Model.UserName          = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            Model.TimeStr           = DateTime.Now;

            Model.Add();
            DataSet ds = Model1.GetList("HeTongName='" + this.txtOrderName.Text + "'");
            if (ds.Tables[0].Rows.Count > 0)
            {
                string sql = "update  ERPContract set NowState='正在采购' where ID=" + ds.Tables[0].Rows[0]["ID"].ToString() + "";
                DbHelperSQL.ExecuteSql(sql.ToString());
            }

            //写系统日志
            ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyRiZhi.DoSomething = "用户添加采购订单信息(" + this.txtOrderName.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();

            ZWL.Common.MessageBox.ShowAndRedirect(this, "采购订单信息添加成功!", "BuyDengJi.aspx");
        }
        else
        {
            ZWL.Common.MessageBox.Show(this, "该订单名称已经存在,请更改其他订单名称!");
        }
    }
예제 #9
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPBuyOrder Model = new ZWL.BLL.ERPBuyOrder();
        if (ZWL.Common.PublicMethod.IFExists("OrderName", "ERPBuyOrder", 0, this.txtOrderName.Text) == true)
        {
            Model.ID                = int.Parse(Request.QueryString["ID"].ToString());
            Model.OrderName         = this.txtOrderName.Text.ToString();
            Model.GongYingShangName = this.txtGongYingShangName.Text.ToString();
            Model.Serils            = this.txtSerils.Text.ToString();
            Model.DingDanLeiXing    = this.txtDingDanLeiXing.Text.ToString();
            Model.DingDanMiaoShu    = this.txtDingDanMiaoShu.Text.ToString();
            Model.CreateDate        = DateTime.Parse(this.txtCreateDate.Text);
            Model.LaiHuoDate        = DateTime.Parse(this.txtLaiHuoDate.Text);
            Model.TiXingDate        = DateTime.Parse(this.txtTiXingDate.Text);
            Model.ChuangJianRen     = this.txtChuangJianRen.Text.ToString();
            Model.FuZeRen           = this.txtFuZeRen.Text.ToString();
            Model.FuJianList        = ZWL.Common.PublicMethod.GetSessionValue("WenJianList");
            Model.NowState          = this.txtNowState.Text.ToString();
            Model.ShenPiTongGuoRen  = this.txtShenPiTongGuoRen.Text.ToString();
            Model.BackInfo          = this.txtBackInfo.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.txtOrderName.Text + ")";
            MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
            MyRiZhi.Add();

            ZWL.Common.MessageBox.ShowAndRedirect(this, "采购订单信息修改成功!", "BuyDengJi.aspx");
        }
        else
        {
            ZWL.Common.MessageBox.Show(this, "该订单名称已经存在,请更改其他订单名称!");
        }
    }