Exemplo n.º 1
0
 public async Task <Select2Result> GetCompanyContact(Select2ResultInput input)
 {
     using (_unitOfWorkManager.Current.SetTenantId(_session.TenantId))
     {
         Select2Result sr      = new Select2Result();
         var           contact = (from c in _NewContactRepository.GetAll() where c.CompanyId == input.Id select c).ToArray();
         if (contact.Length > 0)
         {
             var contactarray = (from c in contact select new datadto {
                 Id = c.Id, Name = c.Name
             }).ToArray();
             sr.select2data = contactarray;
         }
         return(sr);
     }
 }
Exemplo n.º 2
0
 public async Task <Select4Result> GetproductPriceLevel(Select2ResultInput input)
 {
     using (_unitOfWorkManager.Current.SetTenantId(_session.TenantId))
     {
         Select4Result sr      = new Select4Result();
         var           contact = (from c in _PriceLevelProductRepository.GetAll() where c.ProductId == input.Id select c).ToArray();
         if (contact.Length > 0)
         {
             var contactarray = (from c in contact select new datadto4 {
                 Id = c.Id, Name = c.PriceLevels.PriceLevelName, Price = c.Price
             }).ToArray();
             sr.select4data = contactarray;
         }
         return(sr);
     }
 }
Exemplo n.º 3
0
 public async Task <Select2Result> GetMileStoneMileStatus(Select2ResultInput input)
 {
     using (_unitOfWorkManager.Current.SetTenantId(_session.TenantId))
     {
         Select2Result sr = new Select2Result();
         var           milestonestatus = (from c in _MileStoneStatusDetailRepository.GetAll() where c.MileStoneId == input.Id select c);
         if (milestonestatus.Count() > 0)
         {
             var milestonestatusarray = (from c in milestonestatus select new datadto {
                 Id = c.MileStoneStatusId
             }).ToArray();
             foreach (var lis in milestonestatusarray)
             {
                 lis.Name = (from r in _MileStoneStatusRepository.GetAll() where r.Id == lis.Id select r.Name).FirstOrDefault();
             }
             sr.select2data = milestonestatusarray;
         }
         return(sr);
     }
 }