public static ApplicationSettingsItem GetByCode(entitiesEvolveCentralConsole ctx, string code)
        {
            var item = new ApplicationSettingsItem();

            item = (from i in ctx.ApplicationSettingsItems where i.Code == code select i).FirstOrDefault();
            return(item);
        }
        public static List <ApplicationSettingsItem> GetAll(entitiesEvolveCentralConsole ctx)
        {
            var items = new List <ApplicationSettingsItem>();

            items = (from i in ctx.ApplicationSettingsItems select i).ToList();
            return(items);
        }
Exemplo n.º 3
0
        public static SyncLogCrmEvolutionItem GetById(entitiesEvolveCentralConsole ctx, int id)
        {
            var item = new SyncLogCrmEvolutionItem();

            item = (from i in ctx.SyncLogCrmEvolutionItems where i.Id == id orderby i.CreateDate descending select i).FirstOrDefault();
            return(item);
        }
Exemplo n.º 4
0
        public static ServiceCrmEvolutionItem  GetByCode(entitiesEvolveCentralConsole ctx, string servicecode)
        {
            var item = new ServiceCrmEvolutionItem();

            item = (from i in ctx.ServiceCrmEvolutionItems where i.Code == servicecode where i.IsActive == true select i).FirstOrDefault();
            return(item);
        }
Exemplo n.º 5
0
        public static List <ServiceCrmEvolutionDetailItem> GetByServiceID(entitiesEvolveCentralConsole ctx, int id)
        {
            var item = new List <ServiceCrmEvolutionDetailItem>();

            item = (from i in ctx.ServiceCrmEvolutionDetailItems where i.ServiceCrmEvolutionId == id where i.IsActive == true orderby i.Sequence ascending select i).ToList();
            return(item);
        }
Exemplo n.º 6
0
        public static bool Save(entitiesEvolveCentralConsole ctx, SyncLogCrmEvolutionItem item)
        {
            try
            {
                if (item.Id == 0)
                {
                    ctx.SyncLogCrmEvolutionItems.Add(item);
                }

                ctx.SaveChanges();
            }
            catch (Exception ex)
            {
                return(false);
            }
            return(true);
        }