示例#1
0
        public IList<Core.Business.JointReview> GetAllJointReview()
        {
            IList<Core.Business.JointReview> jointReviewlist = new List<Core.Business.JointReview>();
            SqlServerUtility sql = new SqlServerUtility();

            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectJointReviewsAll");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.JointReview jointReview = new Core.Business.JointReview();

                    if (!reader.IsDBNull(0)) jointReview.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) jointReview.InstrumentName = reader.GetString(1);
                    if (!reader.IsDBNull(2)) jointReview.ApplicationUint = reader.GetString(2);
                    if (!reader.IsDBNull(3)) jointReview.ApplicationUintID = reader.GetGuid(3);
                    if (!reader.IsDBNull(4)) jointReview.Corporate = reader.GetString(4);
                    if (!reader.IsDBNull(5)) jointReview.ApplicaitionPerson = reader.GetGuid(5);
                    if (!reader.IsDBNull(6)) jointReview.ApplicationTime = reader.GetDateTime(6);
                    if (!reader.IsDBNull(7)) jointReview.CreateTime = reader.GetDateTime(7);
                    if (!reader.IsDBNull(8)) jointReview.Status = reader.GetInt32(8);
                    if (!reader.IsDBNull(9)) jointReview.ApplicationDes = reader.GetString(9);
                    if (!reader.IsDBNull(10)) jointReview.AuditDes = reader.GetString(10);

                    jointReview.MarkOld();
                    jointReviewlist.Add(jointReview);
                }
                reader.Close();
            }
            return jointReviewlist;
        }
示例#2
0
        public IEnumerable<JointReview> SelectTopNJoinReview(int count, string whereCondition, string orderExpression)
        {
            System.Text.StringBuilder sbSql = new StringBuilder();

            sbSql.Append(string.Format("select top({0}) * from JointReview where {1} order by {2} ", count, whereCondition, orderExpression));

            IList<Core.Business.JointReview> jointReviewlist = new List<Core.Business.JointReview>();

            SqlServerUtility sql = new SqlServerUtility();

            SqlDataReader reader = sql.ExecuteSqlReader(sbSql.ToString());

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.JointReview jointReview = new Core.Business.JointReview();

                    if (!reader.IsDBNull(0)) jointReview.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) jointReview.InstrumentName = reader.GetString(1);
                    if (!reader.IsDBNull(2)) jointReview.ApplicationUint = reader.GetString(2);
                    if (!reader.IsDBNull(3)) jointReview.ApplicationUintID = reader.GetGuid(3);
                    if (!reader.IsDBNull(4)) jointReview.Corporate = reader.GetString(4);
                    if (!reader.IsDBNull(5)) jointReview.ApplicaitionPerson = reader.GetGuid(5);
                    if (!reader.IsDBNull(6)) jointReview.ApplicationTime = reader.GetDateTime(6);
                    if (!reader.IsDBNull(7)) jointReview.CreateTime = reader.GetDateTime(7);
                    if (!reader.IsDBNull(8)) jointReview.Status = reader.GetInt32(8);
                    if (!reader.IsDBNull(9)) jointReview.ApplicationDes = reader.GetString(9);
                    if (!reader.IsDBNull(10)) jointReview.AuditDes = reader.GetString(10);

                    jointReview.MarkOld();
                    jointReviewlist.Add(jointReview);
                }
                reader.Close();
            }
            return jointReviewlist;
        }
示例#3
0
        public IList<Core.Business.JointReview> SelectJointReviewDynamic(string whereCondition, string orderByExpression)
        {
            IList<Core.Business.JointReview> jointReviewlist = new List<Core.Business.JointReview>();
            SqlServerUtility sql = new SqlServerUtility();
            sql.AddParameter("@WhereCondition", SqlDbType.NVarChar, whereCondition);
            sql.AddParameter("@OrderByExpression", SqlDbType.NVarChar, orderByExpression);

            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectJointReviewsDynamic");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.JointReview jointReview = new Core.Business.JointReview();

                    if (!reader.IsDBNull(0)) jointReview.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) jointReview.InstrumentName = reader.GetString(1);
                    if (!reader.IsDBNull(2)) jointReview.ApplicationUint = reader.GetString(2);
                    if (!reader.IsDBNull(3)) jointReview.ApplicationUintID = reader.GetGuid(3);
                    if (!reader.IsDBNull(4)) jointReview.Corporate = reader.GetString(4);
                    if (!reader.IsDBNull(5)) jointReview.ApplicaitionPerson = reader.GetGuid(5);
                    if (!reader.IsDBNull(6)) jointReview.ApplicationTime = reader.GetDateTime(6);
                    if (!reader.IsDBNull(7)) jointReview.CreateTime = reader.GetDateTime(7);
                    if (!reader.IsDBNull(8)) jointReview.Status = reader.GetInt32(8);
                    if (!reader.IsDBNull(9)) jointReview.ApplicationDes = reader.GetString(9);
                    if (!reader.IsDBNull(10)) jointReview.AuditDes = reader.GetString(10);

                    jointReview.MarkOld();
                    jointReviewlist.Add(jointReview);
                }
                reader.Close();
            }
            return jointReviewlist;
        }