private void GVDataBind()
        {
            StringBuilder sql = new StringBuilder("select project_id,jp_project_api.get_name(project_id) project_name,package_no,package_name,po_no,package_value,currency from gen_part_package");

            sql.Append(" where 1=1");
            if (DdlProject.SelectedValue != "0")
            {
                sql.Append(string.Format(" and project_id='{0}'", DdlProject.SelectedValue));
            }
            if (TxtPackageNo.Text.Trim() != "")
            {
                sql.Append(string.Format(" and package_no like '{0}'", TxtPackageNo.Text.Trim()));
            }
            //if (TxtPO.Text.Trim() != "")
            //{
            //    sql.Append(string.Format(" and po_no='{0}'", TxtPO.Text.Trim()));
            //}
            if (TxtPkgName.Text.Trim() != "")
            {
                sql.Append(string.Format(" and package_name like '{0}'", TxtPkgName.Text.Trim()));
            }
            GVData.DataSource   = DBHelper.createGridView(sql.ToString());
            GVData.DataKeyNames = new string[] { "package_no" };
            GVData.DataBind();
        }
示例#2
0
    public void DataBindToGridview()
    {
        //string xKeGuanDep = "'"+ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 xKeGuanDep from ERPUser where UserName='******','")+"'")+"'";
        //string ConditinonStr = " 1=1 ";
        //if (xKeGuanDep == "'所有部门'" || xKeGuanDep == "''")
        //{
        //}
        //else
        //{ ConditinonStr = " Department in (" + xKeGuanDep + ") "; }

        ZWL.BLL.ERPUser MyModel = new ZWL.BLL.ERPUser();
        //GVData.DataSource = MyModel.GetList("UserName Like '%" + this.TextBox1.Text + "%' and Department Like '%" + this.TextBox2.Text + "%' and  " + ConditinonStr + "  order by ID desc");
        DataSet ds = MyModel.GetList("UserName Like '%" + this.TextBox1.Text + "%' and Department Like '%" + this.TextBox2.Text + "%'  order by ID desc");

        if (ds != null)
        {
            GVData.DataSource = ds;
            GVData.DataBind();


            LabPageSum.Text     = Convert.ToString(GVData.PageCount);
            LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
            this.GoPage.Text    = LabCurrentPage.Text.ToString();
        }
    }
示例#3
0
        private void GVDataBind()
        {
            StringBuilder sql = new StringBuilder("select * from gen_pkg_arr_v where 1=1 ");

            if (TxtArrDate.Text.Trim() != "")
            {
                sql.Append(string.Format(" and arr_date_ch ='{0}'", TxtArrDate.Text.Trim()));
            }
            if (TxtPackageNo.Text.Trim() != "")
            {
                sql.Append(string.Format(" and package_no='{0}'", TxtPackageNo.Text.Trim()));
            }
            if (TxtPkgName.Text.Trim() != "")
            {
                sql.Append(string.Format(" and pkg_name like '{0}'", TxtPkgName.Text.Trim()));
            }
            if (DdlProject.SelectedValue != "0")
            {
                sql.Append(string.Format(" and project_id='{0}'", DdlProject.SelectedValue));
            }
            if (TxtPO.Text.Trim() != "")
            {
                sql.Append(string.Format(" and po_no= '{0}'", TxtPO.Text.Trim()));
            }
            if (TxtContract.Text.Trim() != "")
            {
                sql.Append(string.Format(" and contract_no like '{0}'", TxtContract.Text.Trim()));
            }
            if (TxtDec.Text.Trim() != "")
            {
                sql.Append(string.Format(" and dec_no like '{0}'", TxtDec.Text.Trim()));
            }
            if (TxtPart.Text.Trim() != "")
            {
                sql.Append(string.Format(" and (part_name_e like '{0}' or part_name like '{0}')", TxtPart.Text.Trim()));
            }
            if (TxtSpec.Text.Trim() != "")
            {
                sql.Append(string.Format(" and part_spec like '{0}'", TxtSpec.Text.Trim()));
            }
            if (ChkBoxChecked.Checked && ChkBoxNoChk.Checked)
            {
                sql.Append(" and check_mark in ('nocheck','checked')");
            }
            else
            {
                if (ChkBoxNoChk.Checked)
                {
                    sql.Append(" and check_mark='nocheck'");
                }
                if (ChkBoxChecked.Checked)
                {
                    sql.Append(" and check_mark='checked'");
                }
            }
            sql.Append(" order by to_number(arrived_id) ");
            GVData.DataSource   = DBHelper.createGridView(sql.ToString());
            GVData.DataKeyNames = new string[] { "arrived_id" };
            GVData.DataBind();
        }
示例#4
0
    public void DataBindToGridview()
    {
        DataEntityDataContext context = new DataEntityDataContext();

        foreach (var Fence in context.FenceXX.ToList())
        {
            string   Coords     = "";
            string[] CoordsList = Fence.Coords.Split(';');
            for (int i = 0; i < CoordsList.Length; i++)
            {
                if ((i + 1) % 3 == 0)  //换行
                {
                    Coords += CoordsList[i] + ";" + "<br />";
                }
                else
                {
                    Coords += CoordsList[i] + ";" + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                }
            }
            Fence.Coords = Coords;
        }
        var T = context.FenceXX.Where(f => f.ID > 0);

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            T = T.Where(f => f.MC.Contains(this.TextBox1.Text));
        }
        GVData.DataSource = T.ToList();

        GVData.DataBind();
        LabPageSum.Text     = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text    = LabCurrentPage.Text.ToString();
    }
示例#5
0
    public void DataBindToGridview()
    {
        string XiaShuUser             = ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select top 1 XiaShuUser from ERPUser where UserName='******'");
        DataEntityDataContext context = new DataEntityDataContext();
        ERPRecive             Model   = new ERPRecive();
        var T = context.ERPRecive.Where(p => p.ID > 0 && p.NowState == "S");

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            T = T.Where(p => p.HeTongName.Contains(this.TextBox1.Text) || p.QianYueKeHu.Contains(this.TextBox1.Text) || p.SFDK.Contains(this.TextBox1.Text) || p.HTJE.Contains(this.TextBox1.Text));
        }
        if (!string.IsNullOrEmpty(this.TextBox3.Text))
        {
            T = T.Where(p => p.DaoKuanDate >= DateTime.Parse(this.TextBox3.Text) || p.TiXingDate >= DateTime.Parse(this.TextBox3.Text) || p.CreateTime >= DateTime.Parse(this.TextBox3.Text));
        }
        if (!string.IsNullOrEmpty(this.TextBox4.Text))
        {
            T = T.Where(p => p.DaoKuanDate >= DateTime.Parse(this.TextBox4.Text) || p.TiXingDate >= DateTime.Parse(this.TextBox4.Text) || p.CreateTime >= DateTime.Parse(this.TextBox4.Text));
        }
        GVData.DataSource = T;
        GVData.DataBind();
        LabPageSum.Text     = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text    = LabCurrentPage.Text.ToString();
    }
示例#6
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();
    }
示例#7
0
文件: Warning.aspx.cs 项目: cnbin/HLB
    public void DataBindToGridview()
    {
        //ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
        ////DataSet ds = MyModel.GetList("TitleStr Like '%" + this.TextBox1.Text + "%' and UserName='******' order by ID desc");
        //DataSet ds = MyModel.GetDataSetByUserNameTitleStr(TextBox2.Text, TextBox1.Text);


        #region //生成条件
        string[] UNs          = TextBox2.Text.Split(',');
        string   ConditionUNs = "";
        string   ConditionTS  = "";
        string   Condition    = "";
        foreach (string UN in UNs)
        {
            if (!string.IsNullOrEmpty(UN))
            {
                ConditionUNs += ConditionUNs == "" ? "(H.[UserName] like '%" + UN + "%')" : "or ( H.[UserName] like '%" + UN + "%')";
            }
        }
        if (ConditionUNs != "")
        {
            Condition += ConditionUNs;
        }
        if (!string.IsNullOrEmpty(TextBox1.Text))
        {
            ConditionTS += ConditionTS == "" ? "(H.TitleStr like '%" + TextBox1.Text + "%')" : "or (H.TitleStr like '%" + TextBox1.Text + "%')";
        }
        if (ConditionTS != "")
        {
            Condition += Condition == "" ? ConditionTS : "and " + ConditionTS;
        }
        #endregion
        if (Condition != "")
        {
            Condition = " Where " + Condition;
        }

        DataTable dt = ZWL.DBUtility.DbHelperSQL.GetDataTable("select H.[ID],H.[TitleStr],H.[ContentStr],H.[FuJianStr],H.[UserName],H.[CanLookUser],H.[TimeStr],H.SSBM,H.DDWL,H.ZT,H.BZ1,H.BZ2,U.TrueName " +
                                                              "FROM hx_vERPHuiBao as H left join ERPUser as U on H.UserName=U.UserName " + Condition +
                                                              " order by H.ID desc");
        if (dt != null)
        {
            foreach (DataRow R in dt.Rows)
            {
                if (string.IsNullOrEmpty(R["TrueName"].ToString()))
                {
                    R["TrueName"] = R["UserName"];
                }
                else
                {
                }
            }

            GVData.DataSource = dt;
            GVData.DataBind();
            LabPageSum.Text     = Convert.ToString(GVData.PageCount);
            LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
            this.GoPage.Text    = LabCurrentPage.Text.ToString();
        }
    }
示例#8
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPReport Model = new ZWL.BLL.ERPReport();
     Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
     GVData.DataSource = ZWL.DBUtility.DbHelperSQL.GetDataSet(Model.ReportSql.ToString());
     GVData.DataBind();
 }
示例#9
0
    public void DataBindToGridview()
    {
        string XiaShuUser = ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select top 1 XiaShuUser from ERPUser where UserName='******'");
        string SSTempSTR  = "";

        if (XiaShuUser != "全部")
        {
            SSTempSTR = "and CreateUser in(" + "'" + XiaShuUser.Replace(",", "','") + "'" + ")";
        }
        ZWL.BLL.ERPContract MyModel = new ZWL.BLL.ERPContract();
        MyModel.HZ();
        string sql = "";

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            sql += "(HeTongName Like '%" + this.TextBox1.Text + "%' or HeTongSerils Like '%" + this.TextBox1.Text + "%' or QianYueKeHu Like '%" + this.TextBox1.Text + "%' or HeTongLeiXing Like '%" + this.TextBox1.Text + "%' or CreateUser Like '%" + this.TextBox1.Text + "%' or SFJF Like '%" + this.TextBox1.Text + "%')";
        }
        if (!string.IsNullOrEmpty(this.TextBox3.Text))
        {
            if (string.IsNullOrEmpty(sql))
            {
                sql += " (CreateTime >='" + this.TextBox3.Text.Trim() + " 00:00:00' and CreateTime<='" + this.TextBox4.Text.Trim() + " 23:59:59')  or QianYueRenBuy = '" + this.TextBox3.Text + "' or QianYueRenBuy = '" + this.TextBox4.Text + "' or QianYueRenSell = '" + this.TextBox3.Text + "' or QianYueRenSell = '" + this.TextBox4.Text + "'";
            }
            else
            {
                sql += " and CreateTime >='" + this.TextBox3.Text.Trim() + " 00:00:00' and CreateTime<='" + this.TextBox4.Text.Trim() + " 23:59:59')  or QianYueRenBuy = '" + this.TextBox3.Text + "' or QianYueRenBuy = '" + this.TextBox4.Text + "' or QianYueRenSell = '" + this.TextBox3.Text + "' or QianYueRenSell = '" + this.TextBox4.Text + "' ";
            }
            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();
    }
示例#10
0
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPContract MyModel = new ZWL.BLL.ERPContract();
        MyModel.HZ();
        string sql = " CreateUser='******'";

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            sql += "  and  (HeTongName Like '%" + this.TextBox1.Text + "%' or HeTongSerils Like '%" + this.TextBox1.Text + "%' or QianYueKeHu Like '%" + this.TextBox1.Text + "%' or HeTongLeiXing Like '%" + this.TextBox1.Text + "%'  or SFJF Like '%" + this.TextBox1.Text + "%')";
        }
        if (!string.IsNullOrEmpty(this.TextBox3.Text))
        {
            if (string.IsNullOrEmpty(sql))
            {
                sql += " (CreateTime >='" + this.TextBox3.Text.Trim() + " 00:00:00' and CreateTime<='" + this.TextBox4.Text.Trim() + " 23:59:59')  or QianYueRenBuy = '" + this.TextBox3.Text + "' or QianYueRenBuy = '" + this.TextBox4.Text + "' or QianYueRenSell = '" + this.TextBox3.Text + "' or QianYueRenSell = '" + this.TextBox4.Text + "'";
            }
            else
            {
                sql += "and (CreateTime >='" + this.TextBox3.Text.Trim() + " 00:00:00' and CreateTime<='" + this.TextBox4.Text.Trim() + " 23:59:59')  or QianYueRenBuy = '" + this.TextBox3.Text + "' or QianYueRenBuy = '" + this.TextBox4.Text + "' or QianYueRenSell = '" + this.TextBox3.Text + "' or QianYueRenSell = '" + this.TextBox4.Text + "'";
            }
            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();
    }
示例#11
0
    public void DataBindToGridview()
    {
        //ZWL.BLL.ERPHuiBao MyModel = new ZWL.BLL.ERPHuiBao();
        //DataSet ds = MyModel.GetList("(TitleStr Like '%" + this.TextBox1.Text + "%' and ','+CanLookUser+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%' or UserName='******') and ZT='信息转发' order by ID desc");
        DataTable dt = ZWL.DBUtility.DbHelperSQL.GetDataTable("select H.[ID],H.[TitleStr],H.[ContentStr],H.[FuJianStr],H.[UserName],H.[CanLookUser],H.[TimeStr],H.SSBM,H.DDWL,H.ZT,H.BZ1,H.BZ2,U.TrueName " +
                                                              "FROM hx_vERPHuiBao as H left join ERPUser as U on H.UserName=U.UserName " +
                                                              "where (H.TitleStr Like '%" + this.TextBox1.Text + "%' and ','+H.CanLookUser+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%' or H.UserName='******')" +
                                                              "order by H.ID desc");

        //DataSet ds = MyModel.GetList("(TitleStr Like '%" + this.TextBox1.Text + "%' and ','+CanLookUser+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%' or UserName='******')","ID",true);
        if (dt != null)
        {
            foreach (DataRow R in dt.Rows)
            {
                if (string.IsNullOrEmpty(R["TrueName"].ToString()))
                {
                    R["TrueName"] = R["UserName"];
                }
                else
                {
                }
            }

            GVData.DataSource = dt;
            GVData.DataBind();
            LabPageSum.Text     = Convert.ToString(GVData.PageCount);
            LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
            this.GoPage.Text    = LabCurrentPage.Text.ToString();
        }
    }
示例#12
0
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPSupplyLink MyModel = new ZWL.BLL.ERPSupplyLink();
        string sql = "";

        if (!string.IsNullOrEmpty(this.TextBox1.Text))
        {
            sql += "(SupplysName Like '%" + this.TextBox1.Text + "%' or LinkManName Like '%" + this.TextBox1.Text + "%' or ZhiWei Like '%" + this.TextBox1.Text + "%' or Sex Like '%" + this.TextBox1.Text + "%' or UserName Like '%" + this.TextBox1.Text + "%' or IFFirstLink Like '%" + this.TextBox1.Text + "%' or JobTel Like '%" + this.TextBox1.Text + "%'  or MobTel Like '%" + this.TextBox1.Text + "%'  or QQorMsn 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();
    }
        //查询后显示
        protected void GVDataBind()
        {
            DataView      dv;
            StringBuilder sqlstr = new StringBuilder("select a.*,");

            sqlstr.Append("decode(release_qty,null,require_qty,release_qty) release_qty_1,");
            sqlstr.Append("IFS_DATA_API.GET_BAY_NO_FOR_PART(part_no,contract,project_id) location ");
            sqlstr.Append(" from jp_demand_vw a ");
            sqlstr.Append(" where rowstate='lack' ");

            if (TxtDemandId.Text.Trim() != "")
            {
                sqlstr.Append(string.Format(" and demand_id like '{0}'", TxtDemandId.Text.Trim()));
            }
            if (DdlProject.SelectedValue != "0")
            {
                sqlstr.Append(string.Format(" and project_id = '{0}'", DdlProject.SelectedValue));
            }
            if (DdlProdSite.SelectedValue != "0")
            {
                sqlstr.Append(string.Format(" and place='{0}' ", DdlProdSite.SelectedValue));
            }
            if (TxtLocation.Text.Trim() != "")
            {
                sqlstr.Append(string.Format(" and IFS_DATA_API.GET_BAY_NO_FOR_PART(part_no,contract,project_id)='{0}'", TxtLocation.Text.Trim()));
            }
            if (TxtMtrSeqNo.Text.Trim() != "")
            {
                sqlstr.Append(string.Format(" and matr_seq_no like '{0}'", TxtMtrSeqNo.Text.Trim()));
            }
            if (TxtMtrLineNo.Text.Trim() != "")
            {
                sqlstr.Append(string.Format(" and matr_seq_line_no='{0}'", TxtMtrLineNo.Text.Trim()));
            }
            if (TxtPartNo.Text.Trim() != "")
            {
                sqlstr.Append(string.Format(" and part_no like '{0}'", TxtPartNo.Text.Trim()));
            }
            if (TxtRecieveDate.Text.Trim() != "")
            {
                sqlstr.Append(string.Format(" and receive_date = to_date('{0}','yyyy-mm-dd')", TxtRecieveDate.Text.Trim()));
            }
            if (TxtReciever.Text.Trim() != "")
            {
                sqlstr.Append(string.Format(" and receiver = '{0}'", TxtReciever.Text.Trim()));
            }
            if (DdlReqGroup.SelectedValue != "0")
            {
                sqlstr.Append(string.Format(" and req_group='{0}'", DdlReqGroup.SelectedValue));
            }
            if (DdlReceiptDept.SelectedValue != "0")
            {
                sqlstr.Append(string.Format(" and receipt_dept='{0}'", DdlReceiptDept.SelectedValue));
            }

            dv = DBHelper.createGridView(sqlstr.ToString());
            GVData.DataSource   = dv;
            GVData.DataKeyNames = new string[] { "demand_id" };
            GVData.DataBind();
        }
示例#14
0
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPContractChanPin MyModel = new ZWL.BLL.ERPContractChanPin();
        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 += "(HeTongName Like '%" + this.TextBox1.Text + "%' or ChanPinName Like '%" + this.TextBox1.Text + "%' or DanJia Like '%" + this.TextBox1.Text + "%' or ShuLiang Like '%" + this.TextBox1.Text + "%' or UserName Like '%" + this.TextBox1.Text + "%' or IFJiaoFu 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 += " " + 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();
    }
示例#15
0
    public void DataBindToGridview()
    {
        //ZWL.BLL.ERPLanEmail MyLanEmail = new ZWL.BLL.ERPLanEmail();
        //GVData.DataSource = MyLanEmail.GetList("EmailTitle like '%" + this.TextBox1.Text.Trim() + "%' and FromUser='******' and EmailState='草稿' order by ID desc");

        DataTable dt = ZWL.DBUtility.DbHelperSQL.GetDataTable("select L.[ID],L.[EmailTitle],L.[TimeStr],L.[EmailContent],L.[FuJian],L.[FromUser],L.[ToUser],L.[EmailState],U.TrueName " +
                                                              "from ERPLanEmail as L left join ERPUser as U on L.ToUser=U.UserName " +
                                                              "where EmailTitle like '%" + this.TextBox1.Text.Trim() + "%' and FromUser='******' and EmailState='草稿' order by ID desc");

        foreach (DataRow R in dt.Rows)
        {
            if (string.IsNullOrEmpty(R["TrueName"].ToString()))
            {
                R["TrueName"] = R["ToUser"];
            }
            else
            {
            }
        }
        GVData.DataSource = dt;
        GVData.DataBind();
        LabPageSum.Text     = Convert.ToString(GVData.PageCount);
        LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
        this.GoPage.Text    = LabCurrentPage.Text.ToString();
    }
        /// <summary>
        /// 数据绑定
        /// </summary>
        private void Bind()
        {
            var strWhere = " 1=1";

            if (ddlDepartment.SelectedIndex != 0)
            {
                strWhere += " and DepartmentID =" + ddlDepartment.SelectedValue;
            }

            if (TextBox1.Text.Trim() != "")
            {
                strWhere += " and TrueName Like '%" + TextBox1.Text + "%' ";
            }

            if (DropDownList2.Text == "在职")
            {
                strWhere = " IsDelete=1 and " + strWhere;
            }
            else
            {
                strWhere = " IsDelete=0 and " + strWhere;
            }

            AspNetPager1.RecordCount = _userBll.GetRecordCount(strWhere);
            Label1.Text = AspNetPager1.RecordCount.ToString();

            // 在职
            GVData.DataSource = _userBll.GetListByPage(strWhere, "ID desc", (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1, AspNetPager1.CurrentPageIndex * AspNetPager1.PageSize);
            GVData.DataBind();
        }
        private void GVDataDataBind()
        {
            StringBuilder sqlstr = new StringBuilder("select * from jp_pkg_requisition_v where rowstate = 'init'");

            if (Session["reqid"] != null)
            {
                ArrayList arr_ = (ArrayList)Session["reqid"];
                if (arr_.Count != 0)
                {
                    sqlstr.Append(" and requisition_id in (");
                    for (int i = 0; i < arr_.Count; i++)
                    {
                        if (i == arr_.Count - 1)
                        {
                            sqlstr.Append("'" + arr_[i].ToString() + "')");
                        }
                        else
                        {
                            sqlstr.Append("'" + arr_[i].ToString() + "',");
                        }
                    }
                    GVData.DataSource   = DBHelper.createGridView(sqlstr.ToString());
                    GVData.DataKeyNames = new string[] { "requisition_id" };
                    GVData.DataBind();
                    return;
                }
            }
            else
            {
                GVData.DataSource = null;
                GVData.DataBind();
            }
        }
示例#18
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPYinZhangLog MyRiZhi = new ZWL.BLL.ERPYinZhangLog();
     GVData.DataSource = MyRiZhi.GetList("UserName like '%" + this.TextBox2.Text.Trim() + "%' and DoSomething like '%" + this.TextBox1.Text.Trim() + "%' and TypeStr='" + Request.QueryString["Type"].ToString() + "' 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();
 }
示例#19
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPUser MyModel = new ZWL.BLL.ERPUser();
     GVData.DataSource = MyModel.GetList("Department like '%" + this.TextBox1.Text.Trim() + "%' order by UserName asc");
     GVData.DataBind();
     LabPageSum.Text     = Convert.ToString(GVData.PageCount);
     LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
     this.GoPage.Text    = LabCurrentPage.Text.ToString();
 }
示例#20
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPTelFile MyERPTelFile = new ZWL.BLL.ERPTelFile();
     GVData.DataSource = MyERPTelFile.GetList("TitleStr like '%" + this.TextBox1.Text.Trim() + "%' and FromUser='******' and " + GetDicNameCondition() + " 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();
 }
示例#21
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPBaoJia MyModel = new ZWL.BLL.ERPBaoJia();
     GVData.DataSource = MyModel.GetList(" " + this.DropDownList1.SelectedItem.Value.ToString() + " Like '%" + this.TextBox1.Text + "%' and UserName='******' 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();
 }
示例#22
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPKaoQin MyModel = new ZWL.BLL.ERPKaoQin();
     GVData.DataSource = MyModel.GetList("UserName ='******' and (KaoQinRiQi BETWEEN '" + this.TextBox2.Text.Trim() + " 00:00:00' and '" + this.TextBox3.Text.Trim() + " 23:59:59')  order by KaoQinRiQi asc");
     GVData.DataBind();
     LabPageSum.Text     = Convert.ToString(GVData.PageCount);
     LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
     this.GoPage.Text    = LabCurrentPage.Text.ToString();
 }
示例#23
0
    public void DataBindToGridview()
    {
        ZWL.BLL.ERPNetEmail MyLanEmail = new ZWL.BLL.ERPNetEmail();
        DataSet             ds         = MyLanEmail.GetList("EmailTitle like '%" + this.TextBox1.Text.Trim() + "%' and FromUser='******' and EmailState='草稿' order by ID desc");

        GVData.DataSource = ds;
        GVData.DataBind();
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
    }
示例#24
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPMobile MyLanEmail = new ZWL.BLL.ERPMobile();
     GVData.DataSource = MyLanEmail.GetList("ContentStr like '%" + this.TextBox1.Text.Trim() + "%' and FaSongUser='******' 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();
 }
示例#25
0
文件: JuanKu.aspx.cs 项目: cnbin/HLB
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPJuanKu MyModel = new ZWL.BLL.ERPJuanKu();
     GVData.DataSource = MyModel.GetList("JuanKuName Like '%" + this.TextBox1.Text + "%'  and ( ','+CanViewUserList+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%' or UserName='******' )  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();
 }
示例#26
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPSongYang MyModel = new ZWL.BLL.ERPSongYang();
     GVData.DataSource = MyModel.GetList(" " + this.DropDownList1.SelectedItem.Value.ToString() + " Like '%" + this.TextBox1.Text + "%' and " + GetPageType() + " 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();
 }
示例#27
0
文件: GuDing.aspx.cs 项目: cnbin/HLB
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPGuDing MyModel = new ZWL.BLL.ERPGuDing();
     GVData.DataSource = MyModel.GetList("GDName 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();
 }
示例#28
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPLinkMan MyModel = new ZWL.BLL.ERPLinkMan();
     GVData.DataSource = MyModel.GetList("CustomName Like '%" + this.TextBox1.Text + "%' and NameStr Like '%" + this.TextBox2.Text + "%'  and UserName 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();
 }
示例#29
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPLanEmailShou MyLanEmail = new ZWL.BLL.ERPLanEmailShou();
     GVData.DataSource = MyLanEmail.GetList("EmailTitle like '%" + this.TextBox1.Text.Trim() + "%' and FromUser like '%" + this.TextBox2.Text.Trim() + "%'  and EmailState like '%" + this.TextBox3.Text.Trim() + "%' and ShouUser='******' and (EmailState='未读' or EmailState='已读')  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();
 }
示例#30
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPBaoXiao MyModel = new ZWL.BLL.ERPBaoXiao();
     GVData.DataSource = MyModel.GetList("ProjectName Like '%" + this.TextBox1.Text + "%' and ShenPiRen='" + ZWL.Common.PublicMethod.GetSessionValue("UserName") + "' 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();
 }