当前位置: 首页>>代码示例>>C#>>正文


C# UpsilabEntities类代码示例

本文整理汇总了C#中UpsilabEntities的典型用法代码示例。如果您正苦于以下问题:C# UpsilabEntities类的具体用法?C# UpsilabEntities怎么用?C# UpsilabEntities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


UpsilabEntities类属于命名空间,在下文中一共展示了UpsilabEntities类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetUserProfileByIdUserProfile

 public static Upsilab.Data.Model.UserProfile GetUserProfileByIdUserProfile(Int32 idUserProfile)
 {
     using (UpsilabEntities context = new UpsilabEntities())
     {
         return context.UserProfile.Where(profile => profile.idUserProfile == idUserProfile).FirstOrDefault();
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:UserProfileBL.cs

示例2: CreateUser

        public static Upsilab.Data.Model.User CreateUser(Upsilab.Data.Model.User user, String pasword)
        {
            user.UserPassword = UserBL.Encrypt(pasword);

            using (UpsilabEntities context = new UpsilabEntities())
            {
                var _user = new Data.Model.User();
                _user.idUser = user.idUser;
                _user.idUserProfile = user.idUserProfile;
                _user.UserLogin = user.UserLogin;
                _user.UserPassword = user.UserPassword;
                _user.UserName = user.UserName;
                _user.UserFirstName = user.UserFirstName;
                _user.UserMobilePhone = user.UserMobilePhone;
                _user.UserEmail = user.UserEmail;
                _user.IsActive = user.IsActive;
                _user.IsDeleted = user.IsDeleted;
                _user.DateCreated = DateTime.Now;
                _user.IdLicenseReport = user.IdLicenseReport;
                _user.IdLicenseLab = user.IdLicenseLab;
                //context.User.AddObject(user);
                context.User.AddObject(_user);
                context.SaveChanges();
            }

            return user;
        }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:27,代码来源:UserBL_.cs

示例3: GetAnswersByIdParentQuestionAndIdCustomerProspect

        public static List<LABAnswer> GetAnswersByIdParentQuestionAndIdCustomerProspect(LABStudyModel labStudyModel)
        {
            var lstLabAnswers = new List<LABAnswer>();
            LABAnswer tempAnswer = null;

            using (UpsilabEntities db = new UpsilabEntities())
            {

                //Get all answers for the current IdLabStudy
                IList<LABAnswer> allLABAnswers = db.LABAnswer.Where(ans => ans.idLABStudy == labStudyModel.idLABStudy
                                                                    && !ans.LABQuestion.IsDeleted).ToList();

                //Get answers for each question
                foreach (LABQuestion question in labStudyModel.LABQuestions)
                {
                    tempAnswer = allLABAnswers.Where(ans => ans.idLABQuestion == question.idLABQuestion).FirstOrDefault();

                    if (tempAnswer != null)
                    {
                        lstLabAnswers.Add(tempAnswer);
                    }
                }
            }

            return lstLabAnswers;
        }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:26,代码来源:LABAnswerBL.cs

示例4: GetListByid

 public static CRMListeDiffusion GetListByid(Guid pIdList)
 {
     using (UpsilabEntities db = new UpsilabEntities())
     {
         return db.CRMListeDiffusion.Where(diff => diff.idliste == pIdList).FirstOrDefault();
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:ListeDiffusionBL.cs

示例5: GetAllCustomEnums

        public static List<CustomEnum> GetAllCustomEnums()
        {
            List<Upsilab.Data.Model.CustomEnum> returnValue = null;
            if (ConfigurationManager.ExtranetType == @"EXE")
            {
                using (UpsilabEntities context = new UpsilabEntities())
                {
                    returnValue = context.CustomEnum.ToList();
                }
            }
            else
            {
                if (!CacheManager.Exists(CustomEnumBL.CacheKey))
                {
                    using (UpsilabEntities context = new UpsilabEntities())
                    {
                        returnValue = context.CustomEnum.ToList();
                        CacheManager.Add<List<CustomEnum>>(returnValue, CustomEnumBL.CacheKey, ConfigurationManager.CacheTimeout);
                    }
                }

                if (returnValue == null)
                    CacheManager.Get<List<CustomEnum>>(CustomEnumBL.CacheKey, out returnValue);
            }


            return returnValue;
        }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:28,代码来源:CustomEnumBL.cs

示例6: GetBySignatureAndDocument

 public static SignatureTransactionStatusLog GetBySignatureAndDocument(Guid signatureTransactionId, int documentStatusId)
 {
     using (UpsilabEntities context = new UpsilabEntities())
     {
         return context.SignatureTransactionStatusLog.Where(x => x.idDocumentStatus == documentStatusId && x.idSignatureTransaction == signatureTransactionId).FirstOrDefault();
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:SignatureTransactionStatutBL.cs

示例7: GetDocumentByIdSignatureTransaction

 public static DocumentDB GetDocumentByIdSignatureTransaction(Guid idSignatureTransaction, string documentType)
 {
     using (var db = new UpsilabEntities())
     {
         return db.Document.FirstOrDefault(doc => doc.idSignatureTransaction == idSignatureTransaction && doc.DocumentType == documentType);
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:DocumentBL.cs

示例8: GetSignatory

 public static Signatory GetSignatory(Guid idTransaction, Guid idUser)
 {
     using (var context = new UpsilabEntities())
     {
         return context.Signatory.FirstOrDefault(x => x.idSignatureTransaction == idTransaction && x.idUser == idUser);
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:SignatoryBL.cs

示例9: GetSignatories

 public static List<Signatory> GetSignatories(Guid idTransaction)
 {
     using (var context = new UpsilabEntities())
     {
         return context.Signatory.Where(x => x.idSignatureTransaction == idTransaction).ToList();
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:SignatoryBL.cs

示例10: GetReferentielById

 public static ag_upsideo_referentiel GetReferentielById(int id)
 {
     using (var ctx = new UpsilabEntities())
     {
         return ctx.ag_upsideo_referentiel.FirstOrDefault(s => s.idrefsupport == id);
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:AgregReferentielBL.cs

示例11: CreateSignatory

 public static Signatory CreateSignatory(Guid idTransaction, Guid idUser, string role)
 {
     using (var context = new UpsilabEntities())
     {
         return CreateSignatory(idTransaction, idUser, role, context);
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:SignatoryBL.cs

示例12: GetReferentielByName

 public static ag_upsideo_referentiel GetReferentielByName(string name)
 {
     using (var ctx = new UpsilabEntities())
     {
         return ctx.ag_upsideo_referentiel.FirstOrDefault(s => s.nomsupport == name);
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:AgregReferentielBL.cs

示例13: GetSupportReferentielByCodeIsIn

 public static ag_upsideo_referentiel GetSupportReferentielByCodeIsIn(string codeisin)
 {
     using (var ctx = new UpsilabEntities())
     {
         return ctx.ag_upsideo_referentiel.FirstOrDefault(s => s.codeisin.Trim().ToUpper() == codeisin.Trim().ToUpper());
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:AgregReferentielBL.cs

示例14: GetUserProfileByProfileName

 public static Upsilab.Data.Model.UserProfile GetUserProfileByProfileName(string sProfileName)
 {
     using (UpsilabEntities context = new UpsilabEntities())
     {
         return context.UserProfile.Where(profile => profile.UserProfileName.Equals(sProfileName)).FirstOrDefault();
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:UserProfileBL.cs

示例15: Add

 public static SignatureTransactionStatusLog Add(Guid signatureTransactionId, int documentStatusId)
 {
     using (var context = new UpsilabEntities())
     {
         return Add(signatureTransactionId, documentStatusId, context);
     }
 }
开发者ID:tojoirinah,项目名称:Refonte-Recueil-One,代码行数:7,代码来源:SignatureTransactionStatutBL.cs


注:本文中的UpsilabEntities类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。