Example #1
0
        public List <Modules.OA_FlowSort> GetList(Modules.Helper.ChangeTrackingList <Modules.Helper.EntitySearcher> changeTrackingList, int start, int records)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("SELECT * ");
            strSql.Append("FROM OA_FlowSort WHERE 1=1 ");

            if (changeTrackingList.Count > 0)
            {
                strSql.Append(" AND ");
                strSql.Append(JointSearcher.BuidSQL(changeTrackingList));
            }
            List <Modules.OA_FlowSort> list = new List <Modules.OA_FlowSort>();

            try
            {
                DataTable dt = DbHelperSQL.GetList(strSql.ToString(), start, records).Tables[0];
                list = FineOffice.Common.CollectionHelper.ConvertTo <FineOffice.Modules.OA_FlowSort>(dt) as List <FineOffice.Modules.OA_FlowSort>;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(list);
        }
        public int GetCount(Modules.Helper.ChangeTrackingList <Modules.Helper.EntitySearcher> changeTrackingList)
        {
            StringBuilder str = new StringBuilder();

            str.Append("SELECT  records= count(*)  ");
            str.Append("FROM ");
            str.Append("(select distinct FlowID  FROM vw_oa_flowauthority WHERE 1=1 ");

            if (changeTrackingList.Count > 0)
            {
                str.Append(" AND ");
                str.Append(JointSearcher.BuidSQL(changeTrackingList));
            }

            str.Append(" ) as t");
            int count = 0;

            try
            {
                DataTable dt = DbHelperSQL.Query(str.ToString()).Tables[0];
                count = int.Parse(dt.Rows[0]["records"].ToString());
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(count);
        }
        public List <Modules.OA_Flow> GetList(Modules.Helper.ChangeTrackingList <Modules.Helper.EntitySearcher> changeTrackingList, int start, int records)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * from vw_oa_flow where ID in ( select distinct FlowID from vw_oa_flowauthority where 1=1 ");
            if (changeTrackingList.Count > 0)
            {
                strSql.Append(" AND ");
                strSql.Append(JointSearcher.BuidSQL(changeTrackingList));
            }
            strSql.Append(" ) ");

            List <Modules.OA_Flow> list = new List <Modules.OA_Flow>();

            try
            {
                DataTable dt = DbHelperSQL.GetList(strSql.ToString(), start, records).Tables[0];
                list = FineOffice.Common.CollectionHelper.ConvertTo <FineOffice.Modules.OA_Flow>(dt) as List <FineOffice.Modules.OA_Flow>;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(list);
        }
Example #4
0
        public List <Modules.CNS_CensusMember> GetList(Modules.Helper.ChangeTrackingList <Modules.Helper.EntitySearcher> changeTrackingList)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("SELECT * ");
            strSql.Append("FROM vw_cns_censusmember WHERE 1=1 ");

            if (changeTrackingList.Count > 0)
            {
                strSql.Append(" AND ");
                strSql.Append(JointSearcher.BuidSQL(changeTrackingList));
            }

            List <Modules.CNS_CensusMember> list = new List <Modules.CNS_CensusMember>();

            try
            {
                DataTable dt = DbHelperSQL.Query(strSql.ToString()).Tables[0];
                list = FineOffice.Common.CollectionHelper.ConvertTo <FineOffice.Modules.CNS_CensusMember>(dt) as List <FineOffice.Modules.CNS_CensusMember>;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(list);
        }
Example #5
0
        public int GetCount(ChangeTrackingList <EntitySearcher> changeTrackingList)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("SELECT  records= count(ID) ");
            strSql.Append("FROM vw_oa_form WHERE 1=1 ");
            int count = 0;

            if (changeTrackingList.Count > 0)
            {
                strSql.Append(" AND ");
                strSql.Append(JointSearcher.BuidSQL(changeTrackingList));
            }

            try
            {
                DataTable dt = DbHelperSQL.Query(strSql.ToString()).Tables[0];
                count = int.Parse(dt.Rows[0]["records"].ToString());
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(count);
        }
Example #6
0
        public int GetCount(Modules.Helper.ChangeTrackingList <Modules.Helper.EntitySearcher> changeTrackingList)
        {
            StringBuilder str = new StringBuilder();

            str.Append("select  records= count(ID) ");
            str.Append("from adm_letterfollow where 1=1 ");
            int count = 0;

            if (changeTrackingList.Count > 0)
            {
                str.Append(" AND ");
                str.Append(JointSearcher.BuidSQL(changeTrackingList));
            }
            try
            {
                DataTable dt = DbHelperSQL.Query(str.ToString()).Tables[0];
                count = int.Parse(dt.Rows[0]["records"].ToString());
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(count);
        }