Пример #1
0
 public void AddTradeFinance(Entity.ProxyCreditGuaranteeInquiry entity)
 {
     //CacheHelper.ClearCache();
     using (var context = new Xrm.XrmServiceContext("Xrm"))
     {
         new_creditguaranteerequest payload = CRMProxyService.Entity.ObjectConverter.CreateFromProxy(entity);
         context.AddObject(payload);
         context.SaveChanges();
     }
 }
 public IEnumerable<Entity.ProxyCreditGuaranteeInquiry> GetAllTradeFinanace()
 {
     CacheHelper.ClearCache();
     IEnumerable<ProxyCreditGuaranteeInquiry> list = new List<ProxyCreditGuaranteeInquiry>();
     using (Xrm.XrmServiceContext context = new Xrm.XrmServiceContext("Xrm"))
     {
         list = CRMProxyService.Entity.ObjectConverter.ConvertToProxyCreditGuaranteeInquiry(context.new_creditguaranteerequestSet.ToList());
     }
     return list;
 }
 public void AddTradeFinance(Entity.ProxyCreditGuaranteeInquiry entity)
 {
     //CacheHelper.ClearCache();
     using (var context = new Xrm.XrmServiceContext("Xrm"))
     {
         new_creditguaranteerequest payload = CRMProxyService.Entity.ObjectConverter.CreateFromProxy(entity);
         context.AddObject(payload);
         context.SaveChanges();
     }
 }
Пример #4
0
        public IEnumerable <Entity.ProxyCreditGuaranteeInquiry> GetAllTradeFinanace()
        {
            CacheHelper.ClearCache();
            IEnumerable <ProxyCreditGuaranteeInquiry> list = new List <ProxyCreditGuaranteeInquiry>();

            using (Xrm.XrmServiceContext context = new Xrm.XrmServiceContext("Xrm"))
            {
                list = CRMProxyService.Entity.ObjectConverter.ConvertToProxyCreditGuaranteeInquiry(context.new_creditguaranteerequestSet.ToList());
            }
            return(list);
        }
 public Entity.ProxyCreditGuaranteeInquiry GetOneTradeFinance(Guid id)
 {
     CacheHelper.ClearCache();
     ProxyCreditGuaranteeInquiry covenant = null;
     AccountService acctService = new AccountService();
     using (Xrm.XrmServiceContext context = new Xrm.XrmServiceContext("Xrm"))
     {
         var c = context.new_creditguaranteerequestSet.Where(i => i.Id == id).FirstOrDefault();
         if (c != null)
         {
             covenant = CRMProxyService.Entity.ObjectConverter.SingleConvertToProxyCreditGuaranteeInquiry(c);
         }
     }
     return covenant;
 }
Пример #6
0
        public Entity.ProxyCreditGuaranteeInquiry GetOneTradeFinance(Guid id)
        {
            CacheHelper.ClearCache();
            ProxyCreditGuaranteeInquiry covenant = null;
            AccountService acctService           = new AccountService();

            using (Xrm.XrmServiceContext context = new Xrm.XrmServiceContext("Xrm"))
            {
                var c = context.new_creditguaranteerequestSet.Where(i => i.Id == id).FirstOrDefault();
                if (c != null)
                {
                    covenant = CRMProxyService.Entity.ObjectConverter.SingleConvertToProxyCreditGuaranteeInquiry(c);
                }
            }
            return(covenant);
        }