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 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; }
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); }