Пример #1
0
        /// <summary>
        /// 获取分页数据
        /// </summary>
        /// <param name="pageSize">显示页数</param>
        /// <param name="startIndex">起始页数</param>
        /// <param name="custNo">客户编码</param>
        /// <param name="custName">客户名称</param>
        /// <param name="stlGrd">钢种</param>
        /// <param name="techProt">客户协议</param>
        /// <param name="std">执行标准</param>
        /// <returns></returns>
        public DataSet GetListByPage(int pageSize, int startIndex, string custNo, string custName, string stlGrd, string techProt, string std)
        {
            StringBuilder where = new StringBuilder();

            string item  = "C_ID,C_STD_ID,C_CUST_TECH_PROT,C_ZYX1,C_ZYX2,C_STL_GRD,C_STD_CODE,C_STEEL_SIGN,C_EMP_ID,D_MOD_DT,C_REMARK,D_START_DATE,D_END_DATE,N_STATUS,C_CUST_NO,C_CUST_NAME,C_ZZS";
            string table = "TB_STD_CONFIG";
            string order = "C_STL_GRD  desc";

            where.Append(" and N_STATUS=1");

            if (!string.IsNullOrEmpty(custNo))
            {
                where.Append(" and C_CUST_NO like '%" + custNo + "%'");
            }
            if (!string.IsNullOrEmpty(custName))
            {
                where.Append(" and C_CUST_NAME like '%" + custName + "%'");
            }
            if (!string.IsNullOrEmpty(stlGrd))
            {
                where.Append(" and UPPER(C_STL_GRD) like '%" + stlGrd.ToUpper() + "%'");
            }
            if (!string.IsNullOrEmpty(techProt))
            {
                where.Append(" and UPPER(C_CUST_TECH_PROT) like  '%" + techProt.ToUpper() + "%'");
            }
            if (!string.IsNullOrEmpty(std))
            {
                where.Append(" and UPPER(C_STD_CODE) like  '%" + std.ToUpper() + "%'");
            }

            string sql = ByPage.GenerateByPageSql(pageSize, startIndex, item, table, order, where.ToString());

            return(DbHelperOra.Query(sql));
        }
Пример #2
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(int pageSize, int startIndex, string title, string start, string end, string empID)
        {
            StringBuilder where = new StringBuilder();

            string item  = "C_ID,C_TITLE,C_XGID,C_STLGRD,D_TIME,C_CUSTNO,C_CUSTNAME,C_EMPID,C_EMPNAME,N_STATUS,C_REMARK,C_ORDER_NO";
            string table = "TMC_CUSTGMARK_MAIN";
            string order = "D_TIME  desc";



            if (!string.IsNullOrEmpty(empID))
            {
                where.Append(" and C_EMPID = '" + empID + "'");
            }
            if (!string.IsNullOrEmpty(title))
            {
                where.Append(" and C_TITLE like '%" + title + "%'");
            }

            if (!string.IsNullOrEmpty(start) && !string.IsNullOrEmpty(end))
            {
                where.Append(" and D_TIME between to_date('" + start + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + Convert.ToDateTime(end).AddDays(1).ToString() + "', 'yyyy-mm-dd hh24:mi:ss')");
            }

            string sql = ByPage.GenerateByPageSql(pageSize, startIndex, item, table, order, where.ToString());

            return(DbHelperOra.Query(sql));
        }
Пример #3
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(int pageSize, int startIndex, string classID, string title, string start, string end)
        {
            StringBuilder where = new StringBuilder();

            string item  = "C_ID,C_CLASS,C_TITLE,C_PICURL,C_LINK,C_CONTENT,C_FILE,N_SORT,C_REMARK,N_STATUS,C_EMP_ID,C_EMP_NAME,D_MOD_DT";
            string table = "TMB_NOTICE";
            string order = "D_MOD_DT  desc";

            where.Append(" and N_STATUS=1");

            if (!string.IsNullOrEmpty(classID))
            {
                where.Append(" and C_CLASS='" + classID + "'");
            }
            if (!string.IsNullOrEmpty(title))
            {
                where.Append(" and C_TITLE like '%" + title + "%'");
            }
            if (!string.IsNullOrEmpty(start) && !string.IsNullOrEmpty(end))
            {
                where.Append(" and D_MOD_DT between to_date('" + start + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + Convert.ToDateTime(end).AddDays(1).ToString() + "', 'yyyy-mm-dd hh24:mi:ss')");
            }

            string sql = ByPage.GenerateByPageSql(pageSize, startIndex, item, table, order, where.ToString());

            return(DbHelperOra.Query(sql));
        }
Пример #4
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(int pageSize, int startIndex, string matCode, string STLGRD, string SPEC, string start_dt, string end_dt, string matName, string Area)
        {
            StringBuilder where = new StringBuilder();

            string item  = "C_ID,C_MAT_CODE,C_MAT_NAME,C_STL_GRD,C_SPEC,N_PRICE,N_PRICE2,C_STATUS,C_REMARK,C_EMP_ID,C_EMP_NAME,D_MOD_DT,C_AREAMAX,C_PROD_NAME,D_START_DT,D_END_DT";
            string table = "TMB_ACTIVITY";

            string order = " D_MOD_DT asc";

            if (!string.IsNullOrEmpty(Area))
            {
                where.Append(" and C_AREAMAX='" + Area + "'");
            }

            if (!string.IsNullOrEmpty(matName))
            {
                where.Append(" and C_INVSHORTNAME='" + matName + "'");
            }

            if (!string.IsNullOrEmpty(matCode))
            {
                where.Append(" and C_MAT_CODE like '%" + matCode + "%'");
            }
            if (!string.IsNullOrEmpty(STLGRD))
            {
                where.Append(" and C_STL_GRD like '%" + STLGRD + "%'");
            }
            if (!string.IsNullOrEmpty(SPEC))
            {
                where.Append(" and C_SPEC like '%" + SPEC + "%'");
            }

            if (!string.IsNullOrEmpty(start_dt) && !string.IsNullOrEmpty(end_dt))
            {
                where.Append(" and to_date('" + start_dt + "', 'yyyy-MM-dd HH24:mi:ss') >=D_START_DT");
                where.Append(" and to_date('" + end_dt + "', 'yyyy-MM-dd HH24:mi:ss') <=D_END_DT");
            }


            string sql = ByPage.GenerateByPageSql(pageSize, startIndex, item, table, order, where.ToString());

            return(DbHelperOra.Query(sql));
        }
Пример #5
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(int pageSize, int startIndex, string areaID)
        {
            StringBuilder where = new StringBuilder();

            string item  = "C_ID,C_AERA_ID,N_WGT,D_START,D_END,C_REMARK,N_STATUS,C_EMP_ID,C_EMP_NAME,D_MOD_DT";
            string table = "TMB_AREAPLAN ";
            string order = "D_MOD_DT  desc";

            where.Append(" and N_STATUS=1");

            if (!string.IsNullOrEmpty(areaID))
            {
                where.Append("and C_AERA_ID='" + areaID + "'");
            }


            string sql = ByPage.GenerateByPageSql(pageSize, startIndex, item, table, order, where.ToString());

            return(DbHelperOra.Query(sql));
        }
Пример #6
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(int pageSize, int startIndex, string deptID, string start, string end)
        {
            StringBuilder where = new StringBuilder();

            string item = @"t.C_ID,
                           t.C_QUEST_ID,
                          (select a.c_name from tmc_question a where a.c_id=t.c_quest_id) QUEST_NAME,
                           t.C_CUST_NAME,
                           t.C_CUST_CODE,
                           t.C_STL_GRD,
                           t.C_USE_DESC,
                           t.C_REMARK,
                           t.C_EMP_ID,
                           t.C_EMP_NAME,
                           t.D_MOD_DT,
                           (select b.c_name from ts_user b where b.c_id = d.c_emp_id) deptEmp,
                           d.c_dept,
                           (select t.c_name from ts_dept t where t.c_id=d.c_dept) deptName,
                           d.d_plan_dt,
                           d.d_finish_dt";

            string table = @"tmc_tech_consult t
                             inner join tmc_tech_consult_result d
                                on t.c_id = d.c_tech_consult_id";
            string order = "t.D_MOD_DT  desc";

            where.Append(" and d.c_dept in(" + deptID + ")");



            if (!string.IsNullOrEmpty(start) && !string.IsNullOrEmpty(end))
            {
                where.Append(" and t.D_MOD_DT between to_date('" + start + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + Convert.ToDateTime(end).AddDays(1).ToString() + "', 'yyyy-mm-dd hh24:mi:ss')");
            }

            string sql = ByPage.GenerateByPageSql(pageSize, startIndex, item, table, order, where.ToString());

            return(DbHelperOra.Query(sql));
        }
Пример #7
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(int pageSize, int startIndex, string start, string end, string type)
        {
            StringBuilder where = new StringBuilder();

            string item  = "C_ID,C_CLASS,C_MODULE,C_CONENT,C_XGEMP,C_DEPT,C_TEL,D_TIME,C_ICT,C_RESULT,D_ICTTIME,C_REAMRK";
            string table = "TQ_MODULE";
            string order = " D_TIME desc";

            if (!string.IsNullOrEmpty(type))
            {
                where.Append("and C_CLASS = '" + type + "'");
            }

            if (!string.IsNullOrEmpty(start) && !string.IsNullOrEmpty(end))
            {
                where.Append(" and D_TIME between to_date('" + start + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + Convert.ToDateTime(end).AddDays(1).ToString() + "', 'yyyy-mm-dd hh24:mi:ss')");
            }

            string sql = ByPage.GenerateByPageSql(pageSize, startIndex, item, table, order, where.ToString());

            return(DbHelperOra.Query(sql));
        }
Пример #8
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(int pageSize, int startIndex, string C_NO, string C_NAME)
        {
            StringBuilder where = new StringBuilder();

            string item  = "C_ID,C_NC_ID,C_NC_M_ID,N_ISFLAG,C_NO,C_NAME,C_SHORNAME,C_AREATYPE,C_LEGALREPRES,C_AGENT,C_OPERATOR,C_FAX,C_TAXPAYERNO,N_LEVEL,N_STATUS,N_TYPE,C_EXTEND1,C_EXTEND2,C_EXTEND3,C_EXTEND4,C_EXTEND5,C_EMP_ID,C_EMP_NAME,D_MOD_DT,N_ISGPS,C_AREAMMAX";
            string table = "TS_CUSTFILE";
            string order = " C_NO desc";



            if (!string.IsNullOrEmpty(C_NO))
            {
                where.Append("and C_NO='" + C_NO + "'");
            }
            if (!string.IsNullOrEmpty(C_NAME))
            {
                where.Append("and C_NAME like '%" + C_NAME + "%'");
            }

            string sql = ByPage.GenerateByPageSql(pageSize, startIndex, item, table, order, where.ToString());

            return(DbHelperOra.Query(sql));
        }
Пример #9
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(int pageSize, int startIndex, string classID, string empID, string start, string end, string title, string state)
        {
            StringBuilder where = new StringBuilder();


            string item = "C_ID,C_QUEST_ID,(select a.c_name from tmc_question a where a.c_id=TMC_TECH_CONSULT.c_quest_id)QUEST_NAME,C_CUST_NAME,C_CUST_CODE,C_STL_GRD,C_USE_DESC,C_REMARK,C_EMP_ID,C_EMP_NAME,D_MOD_DT,C_DEPT,C_EMP,D_PLAN_DT,D_FINISH_DT,C_REAL_TIME,C_RESULT,C_LEAVE_Q,C_REMARK2,N_CUST_EVAL,N_STATE,decode(N_STATE,0,'未处理',1,'已处理',2,'已评分',3,'办结')as N_STATE2,D_CUST_EVAL_DT,N_XG_EVAL,C_XG_EVAL_EMP,D_XG_EVAL_DT,C_ORDER_NO";

            string table = "TMC_TECH_CONSULT";
            string order = "D_MOD_DT  desc";

            if (!string.IsNullOrEmpty(empID))
            {
                where.Append(" and C_EMP_ID='" + empID + "'");
            }
            if (!string.IsNullOrEmpty(classID))
            {
                where.Append(" and C_QUEST_ID='" + classID + "'");
            }
            if (!string.IsNullOrEmpty(title))
            {
                where.Append(" and C_STL_GRD like '%" + title + "%'");
            }

            if (!string.IsNullOrEmpty(start) && !string.IsNullOrEmpty(end))
            {
                where.Append(" and D_MOD_DT between to_date('" + start + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + Convert.ToDateTime(end).AddDays(1).ToString() + "', 'yyyy-mm-dd hh24:mi:ss')");
            }
            if (!string.IsNullOrEmpty(state))
            {
                where.Append("and N_STATE=" + state + "");
            }

            string sql = ByPage.GenerateByPageSql(pageSize, startIndex, item, table, order, where.ToString());

            return(DbHelperOra.Query(sql));
        }