コード例 #1
0
 public EditApplicationViewModel(Entities.Application applicaiton)
 {
     ApplicationId = applicaiton.Id;
     Code          = applicaiton.Code;
     Description   = applicaiton.Description;
     AddIndexes(applicaiton.IndexDefinitions);
 }
コード例 #2
0
 public Application(Entities.Application app, bool withInformations)
     : this(app)
 {
     if (withInformations)
     {
         this.Informations = app.Informations;
     }
 }
コード例 #3
0
 public Application(Entities.Application app)
 {
     this.Code   = app.Code;
     this.Name   = app.Name;
     this.Status = app.Status;
     this.RefreshTokenLifeTimeInMinutes = app.RefreshTokenLifeTimeInMinutes;
     this.MemberType = app.MemberType;
     this.AuthType   = app.AuthType;
 }
コード例 #4
0
 public ApplicationViewModel(Entities.Application applicaiton)
 {
     ApplicationId     = applicaiton.Id;
     Code              = applicaiton.Code;
     Description       = applicaiton.Description;
     AddIndexViewModel = new AddIndexViewModel(applicaiton.Id);
     foreach (Entities.IndexDefinition indexDefinition in applicaiton.IndexDefinitions)
     {
         var ivm = new IndexViewModel(indexDefinition);
         AddIndexViewModel.AddIndex(ivm);
     }
 }
コード例 #5
0
        public virtual Entities.Setting GetSettingByKey(string key, Entities.Application application)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("Key", key);
            parameters.Add("Application", application.Id);
            Marvin.Actions.GenericSelect <Entities.Setting> facade = new Marvin.Actions.GenericSelect <Entities.Setting>(parameters);
            if (!facade.DoAction())
            {
                throw facade.Exception;
            }
            return(facade.Result);
        }
コード例 #6
0
 public long CreateOrUpdateApplication(Entities.Application application)
 {
     try
     {
         UserBC ApplicationBC = new UserBC();
         ApplicationBC.CreateOrUpdateApplication(application);
         return(application.Id);
     }
     catch (Exception ex)
     {
         throw;
     }
     finally { }
 }
コード例 #7
0
        public Entities.Application GetApplication(string applicationname)
        {
            using (MessagingEntities db = new MessagingEntities())
            {
                var application = db.Applications.Where(a => a.Name == applicationname).FirstOrDefault();
                if (application != null)
                {
                    var messagingApplication = new Entities.Application
                    {
                        Id          = application.Id,
                        Name        = application.Name,
                        QueueTypeID = application.QueueTypeId
                    };

                    return(messagingApplication);
                }
            }

            return(null);
        }