public async Task <IEnumerable <ClientJoinCarpetWashingModel> > ActiveOrdersWashingCarpets() { var client = await _clientInfo.ClientInfoAll(); var orderCarpet = await _orderCarpet.GetTableAllInclude(); return(JoinTableClientToCarpetWashing(client, orderCarpet)); }
public async Task <IEnumerable <CarJoinClientModelBll> > JoinServicesClientCar() { var client = Mapper.Map <IEnumerable <ClientInfoBll> >(await _clientInfo.ClientInfoAll()); var car = Mapper.Map <IEnumerable <ClientsOfCarWashBll> >(await _clientsOfCarWash.GetAll()); var resultJoin = (from t1 in client join t2 in car on t1.Id equals t2.IdInfoClient where t2.arxiv == true select new CarJoinClientModelBll() { idCar = t2.id, idClien = t1.Id, IdClientsGroups = t2.ClientsGroups.Name, Surname = t1.Surname, Name = t1.Name, PatronymicName = t1.PatronymicName, phone = t1.Phone, DateRegistration = t1.DateRegistration, Email = t1.Email, discont = t2.discont, carMarkName = t2.car_mark.name, carModelName = t2.car_model.name, carBodyName = t2.CarBody.Name, NumberCar = t2.NumberCar }); return(resultJoin.AsEnumerable()); }
public async Task <ActionResult> ClientInfo(int idPaymentState) { if (idPaymentState == 2) { var resultBll = Mapper.Map <IEnumerable <ClientInfoView> >(await _clientInfo.ClientInfoAll()); return(View(resultBll.Where(x => x.Phone != null))); } else { return(RedirectToAction("Client", "ClientsOfCarWashViews", new RouteValueDictionary(new { idPaymentState = 1 }))); } }
public async Task <IEnumerable <ActiveOrderModel> > ActiveOrders() { var client = await _clientInfo.ClientInfoAll(); var orderColorActive = await _orderServices.OrderColor(); List <ActiveOrderModel> activeOrders = new List <ActiveOrderModel>(); foreach (var item in orderColorActive) { activeOrders.Add(new ActiveOrderModel { IdOrder = item.Id, StatusOrder = item.StatusOrder1.StatusOrder1, PaymentState = item.PaymentState1.PaymentState1, OrderDate = item.OrderDate, ClosingData = item.ClosingData, DiscountPrice = item.DiscountPrice, Id = ClientId(item) }); } var joinTable = (from t1 in client join t2 in activeOrders on t1.Id equals t2.Id select new ActiveOrderModel() { Id = t1.Id, Name = $"{t1.Surname } {t1.Name} {t1.PatronymicName}", Phone = t1.Phone, IdOrder = t2.IdOrder, StatusOrder = t2.StatusOrder, PaymentState = t2.PaymentState, OrderDate = t2.OrderDate, ClosingData = t2.ClosingData, DiscountPrice = t2.DiscountPrice, }); return(joinTable); }
public async Task <ActionResult> CustomerСhoice(int services) { ViewBag.TypeServises = services; return(View(Mapper.Map <IEnumerable <ClientInfoView> >(await _clientInfo.ClientInfoAll()))); }