Esempio n. 1
0
            public List <ErrorMessage> GetAllErrorMessage()
            {
                CDS20AzureSQL dbEntity = new CDS20AzureSQL();
                var           L2Enty   = from c in dbEntity.ErrorMessage.AsNoTracking()
                                         select c;

                return(L2Enty.ToList <ErrorMessage>());
            }
Esempio n. 2
0
            public EventRuleCatalog GetById(int Id)
            {
                CDS20AzureSQL dbEntity = new CDS20AzureSQL();
                var           L2Enty   = from c in dbEntity.EventRuleCatalog.AsNoTracking()
                                         where c.Id == Id
                                         select c;

                return(L2Enty.FirstOrDefault());
            }
Esempio n. 3
0
            public Company GetById(int Id)
            {
                CDS20AzureSQL dbEntity = new CDS20AzureSQL();
                var           L2Enty   = from c in dbEntity.Company.AsNoTracking()
                                         where c.Id == Id
                                         select c;

                return(L2Enty.FirstOrDefault());
            }
Esempio n. 4
0
            public OperationTask GetByid(int Id)
            {
                CDS20AzureSQL dbEntity = new CDS20AzureSQL();
                var           L2Enty   = from c in dbEntity.OperationTask.AsNoTracking()
                                         where c.Id == Id && c.DeletedFlag == false
                                         select c;

                return(L2Enty.FirstOrDefault());
            }
Esempio n. 5
0
            public List <MessageCatalog> GetAllMasterByCompanyId(int companyId)
            {
                CDS20AzureSQL dbEntity = new CDS20AzureSQL();
                var           L2Enty   = from c in dbEntity.MessageCatalog.AsNoTracking()
                                         where c.CompanyID == companyId && c.ChildMessageFlag == false
                                         select c;

                return(L2Enty.ToList <MessageCatalog>());
            }
Esempio n. 6
0
            public List <Application> GetActionApplicationById(int Id)
            {
                CDS20AzureSQL dbEntity = new CDS20AzureSQL();
                var           appList  = from eventAction in dbEntity.EventInAction
                                         join app in dbEntity.Application on eventAction.ApplicationId equals app.Id
                                         where eventAction.EventRuleCatalogId == Id
                                         select app;

                return(appList.ToList <Application>());
            }
Esempio n. 7
0
            public CompanyInSubscriptionPlan GetActiveSubscriptionPlanByCompanyId(int Id)
            {
                CDS20AzureSQL dbEntity = new CDS20AzureSQL();
                DateTime      DTNow    = DateTime.UtcNow;
                var           L2Enty   = from c in dbEntity.CompanyInSubscriptionPlan
                                         where c.CompanyID == Id && DTNow >= c.StartDate && c.ExpiredDate >= DTNow
                                         select c;

                return(L2Enty.FirstOrDefault());
            }
Esempio n. 8
0
            public void Update(OperationTask operationTask)
            {
                CDS20AzureSQL dbEntity = new CDS20AzureSQL();

                operationTask.UpdatedAt = DateTime.Parse(DateTime.UtcNow.ToString());
                dbEntity.OperationTask.Attach(operationTask);
                dbEntity.Entry(operationTask).State = System.Data.Entity.EntityState.Modified;

                dbEntity.SaveChanges();
            }
Esempio n. 9
0
            public List <MessageElement> GetElementsById(int Id)
            {
                CDS20AzureSQL dbEntity = new CDS20AzureSQL();
                var           L2Enty   = from element in dbEntity.MessageElement.AsNoTracking()
                                         join catalog in dbEntity.MessageCatalog.AsNoTracking() on element.MessageCatalogID equals catalog.Id
                                         where catalog.Id == Id && element.MessageCatalogID == Id
                                         select element;

                return(L2Enty.ToList <MessageElement>());
            }
Esempio n. 10
0
 private static void loadSystemConfig()
 {
     if (cdsConfig.Count == 0)
     {
         CDS20AzureSQL dbEntity = new CDS20AzureSQL();
         var           L2Enty   = from c in dbEntity.SystemConfiguration
                                  select c;
         var cdsConfigList = L2Enty.ToList <SystemConfiguration>();
         if (cdsConfigList != null)
         {
             foreach (var c in cdsConfigList)
             {
                 cdsConfig.Add(c.Key, c.Value);
             }
         }
     }
 }