示例#1
1
        public Core.Business.OperateSort Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectOperateSort");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.OperateSort operateSort = new Core.Business.OperateSort();

                if (!reader.IsDBNull(0)) operateSort.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) operateSort.OperateSortName = reader.GetString(1);

                reader.Close();
                return operateSort;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
        public Core.Business.Role Select(int id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@RoleId", SqlDbType.Int, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectRole");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.Role role = new Core.Business.Role();

                if (!reader.IsDBNull(0)) role.Id = reader.GetInt32(0);
                if (!reader.IsDBNull(1)) role.Description = reader.GetString(1);
                if (!reader.IsDBNull(2)) role.UserCode = reader.GetGuid(2);

                reader.Close();
                return role;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
        public IList<Core.Business.InstrumentPictureRepository> GetAllInstrumentPictureRepository()
        {
            IList<Core.Business.InstrumentPictureRepository> instrumentPictureRepositorylist = new List<Core.Business.InstrumentPictureRepository>();
            SqlServerUtility sql = new SqlServerUtility();

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

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.InstrumentPictureRepository instrumentPictureRepository = new Core.Business.InstrumentPictureRepository();

                    if (!reader.IsDBNull(0)) instrumentPictureRepository.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) instrumentPictureRepository.PictureName = reader.GetString(1);
                    if (!reader.IsDBNull(2)) instrumentPictureRepository.InstrumentID = reader.GetGuid(2);
                    if (!reader.IsDBNull(3)) instrumentPictureRepository.PictureSortID = reader.GetGuid(3);
                    if (!reader.IsDBNull(4)) instrumentPictureRepository.PictureOrigin = reader.GetString(4);
                    if (!reader.IsDBNull(5)) instrumentPictureRepository.PictureContent = reader.GetString(5);
                    if (!reader.IsDBNull(6)) instrumentPictureRepository.Remark = reader.GetString(6);
                    if (!reader.IsDBNull(7)) instrumentPictureRepository.DranscriberID = reader.GetGuid(7);
                    if (!reader.IsDBNull(8)) instrumentPictureRepository.DranscribeDate = reader.GetDateTime(8);

                    instrumentPictureRepository.MarkOld();
                    instrumentPictureRepositorylist.Add(instrumentPictureRepository);
                }
                reader.Close();
            }
            return instrumentPictureRepositorylist;
        }
        public Core.Business.ObjectStimulatedType Select(int id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.Int, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectObjectStimulatedType");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.ObjectStimulatedType objectStimulatedType = new Core.Business.ObjectStimulatedType();

                if (!reader.IsDBNull(0)) objectStimulatedType.Id = reader.GetInt32(0);
                if (!reader.IsDBNull(1)) objectStimulatedType.Name = reader.GetString(1);
                if (!reader.IsDBNull(2)) objectStimulatedType.Description = reader.GetString(2);

                reader.Close();
                return objectStimulatedType;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
示例#5
0
        public IList<Core.Business.Annex> GetAllAnnex()
        {
            IList<Core.Business.Annex> annexlist = new List<Core.Business.Annex>();
            SqlServerUtility sql = new SqlServerUtility();

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

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.Annex annex = new Core.Business.Annex();

                    if (!reader.IsDBNull(0)) annex.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) annex.AnnexTypeID = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) annex.ContentType = reader.GetInt32(2);
                    if (!reader.IsDBNull(3)) annex.ContentID = reader.GetGuid(3);
                    if (!reader.IsDBNull(4)) annex.Name = reader.GetString(4);
                    if (!reader.IsDBNull(5)) annex.AnnexURI = reader.GetString(5);

                    annex.MarkOld();
                    annexlist.Add(annex);
                }
                reader.Close();
            }
            return annexlist;
        }
示例#6
0
        public Core.Business.Subsidies Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectSubsidy");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.Subsidies subsidies = new Core.Business.Subsidies();

                if (!reader.IsDBNull(0)) subsidies.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) subsidies.Name = reader.GetString(1);
                if (!reader.IsDBNull(2)) subsidies.Des = reader.GetString(2);
                if (!reader.IsDBNull(3)) subsidies.AddPerson = reader.GetString(3);
                if (!reader.IsDBNull(4)) subsidies.AddTime = reader.GetDateTime(4);
                if (!reader.IsDBNull(5)) subsidies.Status = reader.GetInt32(5);

                reader.Close();
                return subsidies;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
        public Core.Business.JointReviewSecondAudit Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectJointReviewSecondAudit");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.JointReviewSecondAudit jointReviewSecondAudit = new Core.Business.JointReviewSecondAudit();

                if (!reader.IsDBNull(0)) jointReviewSecondAudit.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) jointReviewSecondAudit.JointReviewID = reader.GetGuid(1);
                if (!reader.IsDBNull(2)) jointReviewSecondAudit.AuditPerson = reader.GetGuid(2);
                if (!reader.IsDBNull(3)) jointReviewSecondAudit.AuditTime = reader.GetDateTime(3);
                if (!reader.IsDBNull(4)) jointReviewSecondAudit.AuditDes = reader.GetString(4);

                reader.Close();
                return jointReviewSecondAudit;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
        public Core.Business.SubCenterPluginList Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectSubCenterPluginList");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.SubCenterPluginList subCenterPluginList = new Core.Business.SubCenterPluginList();

                if (!reader.IsDBNull(0)) subCenterPluginList.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) subCenterPluginList.Name = reader.GetString(1);
                if (!reader.IsDBNull(2)) subCenterPluginList.URI = reader.GetString(2);

                reader.Close();
                return subCenterPluginList;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
        public Core.Business.JointReviewExperts Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectJointReviewExperts");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.JointReviewExperts jointReviewExperts = new Core.Business.JointReviewExperts();

                if (!reader.IsDBNull(0)) jointReviewExperts.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) jointReviewExperts.JointReviewID = reader.GetGuid(1);
                if (!reader.IsDBNull(2)) jointReviewExperts.ExpertID = reader.GetGuid(2);
                if (!reader.IsDBNull(3)) jointReviewExperts.ExpertHead = reader.GetInt32(3);

                reader.Close();
                return jointReviewExperts;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
        public IList<Core.Business.JointReviewExperts> GetAllJointReviewExperts()
        {
            IList<Core.Business.JointReviewExperts> jointReviewExpertslist = new List<Core.Business.JointReviewExperts>();
            SqlServerUtility sql = new SqlServerUtility();

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

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.JointReviewExperts jointReviewExperts = new Core.Business.JointReviewExperts();

                    if (!reader.IsDBNull(0)) jointReviewExperts.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) jointReviewExperts.JointReviewID = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) jointReviewExperts.ExpertID = reader.GetGuid(2);
                    if (!reader.IsDBNull(3)) jointReviewExperts.ExpertHead = reader.GetInt32(3);

                    jointReviewExperts.MarkOld();
                    jointReviewExpertslist.Add(jointReviewExperts);
                }
                reader.Close();
            }
            return jointReviewExpertslist;
        }
示例#11
0
        public IList<Core.Business.Picture> GetAllPicture()
        {
            IList<Core.Business.Picture> picturelist = new List<Core.Business.Picture>();
            SqlServerUtility sql = new SqlServerUtility(connectionString);

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

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.Picture picture = new Core.Business.Picture();

                    long id = reader.GetInt64(0);
                    picture = Core.Business.Picture.Load(id);

                    /*
                    if (!reader.IsDBNull(0)) picture.Id = reader.GetInt64(0);
                    if (!reader.IsDBNull(1)) picture.AlbumId = reader.GetInt64(1);
                    if (!reader.IsDBNull(2)) picture.DateCreated = reader.GetDateTime(2);
                    if (!reader.IsDBNull(3)) picture.Name = reader.GetString(3);
                    if (!reader.IsDBNull(4)) picture.Remark = reader.GetString(4);
                    if (!reader.IsDBNull(5)) picture.BigPath = reader.GetString(5);
                    if (!reader.IsDBNull(6)) picture.MiddlePath = reader.GetString(6);
                    if (!reader.IsDBNull(7)) picture.SmallPath = reader.GetString(7);
                    */

                    picture.MarkOld();
                    picturelist.Add(picture);
                }
                reader.Close();
            }
            return picturelist;
        }
示例#12
0
        public Core.Business.UserEducation Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@EducationID", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectUserEducation");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.UserEducation userEducation = new Core.Business.UserEducation();

                if (!reader.IsDBNull(0)) userEducation.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) userEducation.EducationName = reader.GetString(1);

                reader.Close();
                return userEducation;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
        public IList<Core.Business.SubsidiesApplication> GetAllSubsidiesApplication()
        {
            IList<Core.Business.SubsidiesApplication> subsidiesApplicationlist = new List<Core.Business.SubsidiesApplication>();
            SqlServerUtility sql = new SqlServerUtility();

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

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.SubsidiesApplication subsidiesApplication = new Core.Business.SubsidiesApplication();

                    if (!reader.IsDBNull(0)) subsidiesApplication.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) subsidiesApplication.SubsidiesID = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) subsidiesApplication.ApplicaiotnUser = reader.GetGuid(2);
                    if (!reader.IsDBNull(3)) subsidiesApplication.Type = reader.GetInt32(3);
                    if (!reader.IsDBNull(4)) subsidiesApplication.Status = reader.GetInt32(4);
                    if (!reader.IsDBNull(5)) subsidiesApplication.ApplicationTime = reader.GetDateTime(5);
                    if (!reader.IsDBNull(6)) subsidiesApplication.Des = reader.GetString(6);
                    if (!reader.IsDBNull(7)) subsidiesApplication.AuditDes = reader.GetString(7);

                    subsidiesApplication.MarkOld();
                    subsidiesApplicationlist.Add(subsidiesApplication);
                }
                reader.Close();
            }
            return subsidiesApplicationlist;
        }
        public IList<CY.CSTS.Core.Business.INSTRATTACHMENT> GetInstrattachmentDynamic(string whereCondition, string orderByExpression)
        {
            IList<Core.Business.INSTRATTACHMENT> iNSTRATTACHMENTlist = new List<Core.Business.INSTRATTACHMENT>();
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@WhereCondition", SqlDbType.NVarChar, whereCondition);
            sql.AddParameter("@OrderByExpression", SqlDbType.NVarChar, orderByExpression);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectINSTRATTACHMENTsDynamic");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.INSTRATTACHMENT iNSTRATTACHMENT = new Core.Business.INSTRATTACHMENT();

                    if (!reader.IsDBNull(0)) iNSTRATTACHMENT.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) iNSTRATTACHMENT.InstruId = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) iNSTRATTACHMENT.ATTACHMENTNAME = reader.GetString(2);
                    if (!reader.IsDBNull(3)) iNSTRATTACHMENT.ATTACHMENTAMOUNT = reader.GetInt32(3);
                    if (!reader.IsDBNull(4)) iNSTRATTACHMENT.ATTACHMENTSPEC = reader.GetString(4);
                    if (!reader.IsDBNull(5)) iNSTRATTACHMENT.ATTACHMENTPRICE = reader.GetDecimal(5);
                    if (!reader.IsDBNull(6)) iNSTRATTACHMENT.PURPOSE = reader.GetString(6);
                    if (!reader.IsDBNull(7)) iNSTRATTACHMENT.MANUFACTURER = reader.GetString(7);
                    if (!reader.IsDBNull(8)) iNSTRATTACHMENT.REMARK = reader.GetString(8);
                    if (!reader.IsDBNull(9)) iNSTRATTACHMENT.WRITEDATE = reader.GetDateTime(9);
                    if (!reader.IsDBNull(10)) iNSTRATTACHMENT.UPDATEDATE = reader.GetDateTime(10);

                    iNSTRATTACHMENT.MarkOld();
                    iNSTRATTACHMENTlist.Add(iNSTRATTACHMENT);
                }
                reader.Close();
            }
            return iNSTRATTACHMENTlist;
        }
        public IList<Core.Business.INSTRATTACHMENT> GetAllINSTRATTACHMENT()
        {
            IList<Core.Business.INSTRATTACHMENT> iNSTRATTACHMENTlist = new List<Core.Business.INSTRATTACHMENT>();
            SqlServerUtility sql = new SqlServerUtility();

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

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.INSTRATTACHMENT iNSTRATTACHMENT = new Core.Business.INSTRATTACHMENT();

                    if (!reader.IsDBNull(0)) iNSTRATTACHMENT.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) iNSTRATTACHMENT.InstruId = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) iNSTRATTACHMENT.ATTACHMENTNAME = reader.GetString(2);
                    if (!reader.IsDBNull(3)) iNSTRATTACHMENT.ATTACHMENTAMOUNT = reader.GetInt32(3);
                    if (!reader.IsDBNull(4)) iNSTRATTACHMENT.ATTACHMENTSPEC = reader.GetString(4);
                    if (!reader.IsDBNull(5)) iNSTRATTACHMENT.ATTACHMENTPRICE = reader.GetDecimal(5);
                    if (!reader.IsDBNull(6)) iNSTRATTACHMENT.PURPOSE = reader.GetString(6);
                    if (!reader.IsDBNull(7)) iNSTRATTACHMENT.MANUFACTURER = reader.GetString(7);
                    if (!reader.IsDBNull(8)) iNSTRATTACHMENT.REMARK = reader.GetString(8);
                    if (!reader.IsDBNull(9)) iNSTRATTACHMENT.WRITEDATE = reader.GetDateTime(9);
                    if (!reader.IsDBNull(10)) iNSTRATTACHMENT.UPDATEDATE = reader.GetDateTime(10);

                    iNSTRATTACHMENT.MarkOld();
                    iNSTRATTACHMENTlist.Add(iNSTRATTACHMENT);
                }
                reader.Close();
            }
            return iNSTRATTACHMENTlist;
        }
示例#16
0
        public Core.Business.LinkClass Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectLinkClas");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.LinkClass linkClass = new Core.Business.LinkClass();

                if (!reader.IsDBNull(0)) linkClass.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) linkClass.ClassName = reader.GetString(1);
                if (!reader.IsDBNull(2)) linkClass.Index = reader.GetInt32(2);

                reader.Close();
                return linkClass;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
示例#17
0
        public Core.Business.DomainCode Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectDomainCode");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.DomainCode domainCode = new Core.Business.DomainCode();

                if (!reader.IsDBNull(0)) domainCode.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) domainCode.Name = reader.GetString(1);

                reader.Close();
                return domainCode;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
示例#18
0
        public IList<PV> GetPVDynamic(string whereCondition, string orderByExpression)
        {
            if (string.IsNullOrEmpty(whereCondition))
            {
                return this.GetAllPV();
            }

            IList<Core.Business.PV> pVlist = new List<Core.Business.PV>();
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@WhereCondition", SqlDbType.NVarChar, whereCondition);
            sql.AddParameter("@OrderByExpression", SqlDbType.NVarChar, orderByExpression);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectPVsDynamic");

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.PV pV = new Core.Business.PV();

                    if (!reader.IsDBNull(0)) pV.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) pV.IP = reader.GetString(1);
                    if (!reader.IsDBNull(2)) pV.VisitDate = reader.GetDateTime(2);

                    pV.MarkOld();
                    pVlist.Add(pV);
                }
                reader.Close();
            }
            return pVlist;
        }
        public IList<Core.Business.JointReviewSecondAudit> GetAllJointReviewSecondAudit()
        {
            IList<Core.Business.JointReviewSecondAudit> jointReviewSecondAuditlist = new List<Core.Business.JointReviewSecondAudit>();
            SqlServerUtility sql = new SqlServerUtility();

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

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.JointReviewSecondAudit jointReviewSecondAudit = new Core.Business.JointReviewSecondAudit();

                    if (!reader.IsDBNull(0)) jointReviewSecondAudit.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) jointReviewSecondAudit.JointReviewID = reader.GetGuid(1);
                    if (!reader.IsDBNull(2)) jointReviewSecondAudit.AuditPerson = reader.GetGuid(2);
                    if (!reader.IsDBNull(3)) jointReviewSecondAudit.AuditTime = reader.GetDateTime(3);
                    if (!reader.IsDBNull(4)) jointReviewSecondAudit.AuditDes = reader.GetString(4);

                    jointReviewSecondAudit.MarkOld();
                    jointReviewSecondAuditlist.Add(jointReviewSecondAudit);
                }
                reader.Close();
            }
            return jointReviewSecondAuditlist;
        }
示例#20
0
        public IList<CY.UME.Core.Business.PictureExtend> GetActivityPicture(long accountId, string activityId,string activityPicId)
        {
            IList<Core.Business.PictureExtend> pictureExtendlist = new List<Core.Business.PictureExtend>();
            SqlServerUtility sql = new SqlServerUtility(connectionString);
            sql.AddParameter("@AccountId", SqlDbType.BigInt, accountId);
            sql.AddParameter("@ActivityId", SqlDbType.NVarChar, activityId);
            sql.AddParameter("@ActivityPicId", SqlDbType.NVarChar, activityPicId);

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

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.PictureExtend pictureExtend = new Core.Business.PictureExtend();
                    long Id = 0;

                    if (!reader.IsDBNull(0)) Id = reader.GetInt64(0);

                    pictureExtend = CY.UME.Core.Business.PictureExtend.Load(Id);
                    pictureExtend.MarkOld();
                    pictureExtendlist.Add(pictureExtend);
                }
                reader.Close();
            }
            return pictureExtendlist;
        }
示例#21
0
        public IList<Core.Business.Subsidies> GetAllSubsidies()
        {
            IList<Core.Business.Subsidies> subsidieslist = new List<Core.Business.Subsidies>();
            SqlServerUtility sql = new SqlServerUtility();

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

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.Subsidies subsidies = new Core.Business.Subsidies();

                    if (!reader.IsDBNull(0)) subsidies.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) subsidies.Name = reader.GetString(1);
                    if (!reader.IsDBNull(2)) subsidies.Des = reader.GetString(2);
                    if (!reader.IsDBNull(3)) subsidies.AddPerson = reader.GetString(3);
                    if (!reader.IsDBNull(4)) subsidies.AddTime = reader.GetDateTime(4);
                    if (!reader.IsDBNull(5)) subsidies.Status = reader.GetInt32(5);

                    subsidies.MarkOld();
                    subsidieslist.Add(subsidies);
                }
                reader.Close();
            }
            return subsidieslist;
        }
示例#22
0
        public IList<Core.Business.Document> GetAllDocument()
        {
            IList<Core.Business.Document> documentlist = new List<Core.Business.Document>();
            SqlServerUtility sql = new SqlServerUtility();

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

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.Document document = new Core.Business.Document();

                    if (!reader.IsDBNull(0)) document.Id = reader.GetInt64(0);
                    if (!reader.IsDBNull(1)) document.Title = reader.GetString(1);
                    if (!reader.IsDBNull(2)) document.SubTitle = reader.GetString(2);
                    if (!reader.IsDBNull(3)) document.Content = reader.GetString(3);
                    if (!reader.IsDBNull(4)) document.SendDate = reader.GetDateTime(4);
                    if (!reader.IsDBNull(5)) document.State = reader.GetInt32(5);
                    if (!reader.IsDBNull(6)) document.Secret = reader.GetInt32(6);
                    if (!reader.IsDBNull(7)) document.Mergency = reader.GetInt32(7);
                    if (!reader.IsDBNull(8)) document.DraftDate = reader.GetDateTime(8);
                    if (!reader.IsDBNull(9)) document.Sender = reader.GetInt32(9);

                    document.MarkOld();
                    documentlist.Add(document);
                }
                reader.Close();
            }
            return documentlist;
        }
示例#23
0
        public Core.Business.SysSetting Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectSysSetting");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.SysSetting sysSetting = new Core.Business.SysSetting();

                if (!reader.IsDBNull(0)) sysSetting.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) sysSetting.Name = reader.GetString(1);
                if (!reader.IsDBNull(2)) sysSetting.SysValue = reader.GetString(2);

                reader.Close();
                return sysSetting;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
        public Core.Business.STATUSMESSAGECODE Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectSTATUSMESSAGECODE");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.STATUSMESSAGECODE sTATUSMESSAGECODE = new Core.Business.STATUSMESSAGECODE();

                if (!reader.IsDBNull(0)) sTATUSMESSAGECODE.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) sTATUSMESSAGECODE.StatusMessageNAME = reader.GetString(1);

                reader.Close();
                return sTATUSMESSAGECODE;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
示例#25
0
        public Core.Business.Annex Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@ID", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectAnnex");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.Annex annex = new Core.Business.Annex();

                if (!reader.IsDBNull(0)) annex.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) annex.AnnexTypeID = reader.GetGuid(1);
                if (!reader.IsDBNull(2)) annex.ContentType = reader.GetInt32(2);
                if (!reader.IsDBNull(3)) annex.ContentID = reader.GetGuid(3);
                if (!reader.IsDBNull(4)) annex.Name = reader.GetString(4);
                if (!reader.IsDBNull(5)) annex.AnnexURI = reader.GetString(5);

                reader.Close();
                return annex;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
示例#26
0
        public IList<Core.Business.NewsPhoto> GetAllNewsPhoto()
        {
            IList<Core.Business.NewsPhoto> newsPhotolist = new List<Core.Business.NewsPhoto>();
            SqlServerUtility sql = new SqlServerUtility();

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

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.NewsPhoto newsPhoto = new Core.Business.NewsPhoto();

                    if (!reader.IsDBNull(0)) newsPhoto.Id = reader.GetGuid(0);
                    if (!reader.IsDBNull(1)) newsPhoto.Title = reader.GetString(1);
                    if (!reader.IsDBNull(2)) newsPhoto.PhotoSrc = reader.GetString(2);
                    if (!reader.IsDBNull(3)) newsPhoto.Author = reader.GetString(3);
                    if (!reader.IsDBNull(4)) newsPhoto.AddDate = reader.GetDateTime(4);
                    if (!reader.IsDBNull(5)) newsPhoto.ContentUrl = reader.GetString(5);
                    if (!reader.IsDBNull(6)) newsPhoto.Status = reader.GetInt32(6);
                    if (!reader.IsDBNull(7)) newsPhoto.ContentID = reader.GetGuid(7);
                    newsPhoto.MarkOld();
                    newsPhotolist.Add(newsPhoto);
                }
                reader.Close();
            }
            return newsPhotolist;
        }
        public int GetCommentCountByMiniBlogId(CY.UME.Core.Business.MiniBlog miniBlog)
        {
            int count = 0;

            if (miniBlog == null)
            {
                return count;
            }

            SqlServerUtility sql = new SqlServerUtility(connectionString);

            sql.AddParameter("@MiniBlogId", SqlDbType.BigInt, miniBlog.Id);
            SqlDataReader reader = sql.ExecuteSPReader("USP_MiniBlogComment_SelectCount_By_MiniBlogId");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) count = reader.GetInt32(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }

            return count;
        }
示例#28
0
        public void Insert(Core.Business.NewsPhoto newsPhoto)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Title", SqlDbType.NVarChar, newsPhoto.Title);
            sql.AddParameter("@PhotoSrc", SqlDbType.NVarChar, newsPhoto.PhotoSrc);
            sql.AddParameter("@Author", SqlDbType.NVarChar, newsPhoto.Author);
            sql.AddParameter("@AddDate", SqlDbType.DateTime, newsPhoto.AddDate);
            sql.AddParameter("@ContentUrl",SqlDbType.NVarChar,newsPhoto.ContentUrl);
            sql.AddParameter("@Status", SqlDbType.Int, newsPhoto.Status);
            sql.AddParameter("@ContentID", SqlDbType.UniqueIdentifier, newsPhoto.ContentID);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertNewsPhoto");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) newsPhoto.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#29
0
        public Core.Business.NewsPhoto Select(Guid id)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, id);
            SqlDataReader reader = sql.ExecuteSPReader("usp_SelectNewsPhoto");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                Core.Business.NewsPhoto newsPhoto = new Core.Business.NewsPhoto();

                if (!reader.IsDBNull(0)) newsPhoto.Id = reader.GetGuid(0);
                if (!reader.IsDBNull(1)) newsPhoto.Title = reader.GetString(1);
                if (!reader.IsDBNull(2)) newsPhoto.PhotoSrc = reader.GetString(2);
                if (!reader.IsDBNull(3)) newsPhoto.Author = reader.GetString(3);
                if (!reader.IsDBNull(4)) newsPhoto.AddDate = reader.GetDateTime(4);
                if (!reader.IsDBNull(5)) newsPhoto.ContentUrl = reader.GetString(5);
                if (!reader.IsDBNull(6)) newsPhoto.Status = reader.GetInt32(6);
                if (!reader.IsDBNull(7)) newsPhoto.ContentID = reader.GetGuid(7);

                reader.Close();
                return newsPhoto;
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();

                return null;
            }
        }
示例#30
0
        public IList<Core.Business.AdvancedPage> GetAllAdvancedPage()
        {
            IList<Core.Business.AdvancedPage> advancedPagelist = new List<Core.Business.AdvancedPage>();
            SqlServerUtility sql = new SqlServerUtility(connectionString);

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

            if (reader != null)
            {
                while (reader.Read())
                {
                    Core.Business.AdvancedPage advancedPage = new Core.Business.AdvancedPage();

                    if (!reader.IsDBNull(0)) advancedPage.Id = reader.GetInt32(0);
                    if (!reader.IsDBNull(1)) advancedPage.GroupId = reader.GetInt32(1);
                    if (!reader.IsDBNull(2)) advancedPage.AccountId = reader.GetInt64(2);
                    if (!reader.IsDBNull(3)) advancedPage.Name = reader.GetString(3);
                    if (!reader.IsDBNull(4)) advancedPage.Path = reader.GetString(4);
                    if (!reader.IsDBNull(5)) advancedPage.Code = reader.GetString(5);

                    advancedPage.MarkOld();
                    advancedPagelist.Add(advancedPage);
                }
                reader.Close();
            }
            return advancedPagelist;
        }