private void SelectDataGrid() { if (_currentRowGrid == -1) { return; } int id = (int)dgvSearch.Rows[_currentRowGrid].Cells[0].Value; QueryResponse <Reservation> response = _reservationBLL.GetById(id); if (!response.Success) { MessageBox.Show(response.Message); } reservation = response.Data; QueryResponse <Room> responseRoom = _roomBLL.GetById(reservation.RoomID); if (!responseRoom.Success) { MessageBox.Show(responseRoom.Message); } room = responseRoom.Data; QueryResponse <Client> responseClient = _clientBLL.GetById(reservation.ClientID); if (!responseClient.Success) { MessageBox.Show(responseClient.Message); } client = responseClient.Data; this.Close(); }
// GET: Clients/Details/5 public ActionResult Details(int id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Client client = clientBLL.GetById(id); if (client == null) { return(HttpNotFound()); } return(View(client)); }
private void show_client() { System.Console.WriteLine("Enter client id"); IClient client = null; while (client == null) { string line = System.Console.ReadLine(); try { client = clientBLL.GetById(int.Parse(line)); } catch (Exception e) { System.Console.WriteLine(e.Message); } if (client != null) { string res = "client : " + client.GetName() + "(" + client.GetClientId() + ")" + "\nBirthday :" + client.GetBirthday().ToShortDateString(); list_subscription(client); System.Console.WriteLine(res); this.client(); } } }
// GET: Client/Details/5 public ActionResult Details(int id) { try { Client client = clientBusiness.GetById(id); if (client == null) { return(HttpNotFound()); } return(View(ClientModel.ToModel(client))); } catch (Exception ex) { Log.Error(ex.Message, ex); return(View()); } }
private void SelectCheckIn() { QueryResponse <Client> responseClient = _clientBLL.GetById(_checkIn.ClientID); QueryResponse <Room> responseRoom = _roomBLL.GetById(_checkIn.RoomID); lblName.Text = "Nome: " + responseClient.Data.Name; lblCPF.Text = "CPF: " + responseClient.Data.CPF.InsertMaskCPF(); lblDateCheckIn.Text = "Data CheckIn: " + _checkIn.EntryDate.ToString("dd/MM/yyyy"); lblRoomFloor.Text = "Andar: " + responseRoom.Data.RoomFloor; lblRoomNumber.Text = "NĂºmero do quarto: " + responseRoom.Data.Number; }
private void InsertCheckInGrid(List <CheckIn> checkIns) { foreach (var item in checkIns) { QueryResponse <Room> responseRoom = _roomBLL.GetById(item.RoomID); if (!responseRoom.Success) { MessageBox.Show(responseRoom.Message); return; } QueryResponse <Client> responseClient = _clientBLL.GetById(item.ClientID); if (!responseClient.Success) { MessageBox.Show(responseClient.Message); return; } _checkInsGrid.Add(CreateCheckInGrid(responseClient.Data, responseRoom.Data, item)); } }
private void SelectCheckIn() { QueryResponse <Client> responseClient = _clientBLL.GetById(_checkIn.ClientID); QueryResponse <Room> responseRoom = _roomBLL.GetById(_checkIn.RoomID); lblNome.Text += responseClient.Data.Name; lblCPF.Text += responseClient.Data.CPF.InsertMaskCPF(); lblPhone.Text += responseClient.Data.Phone1; lblRoomPrice.Text += _checkIn.RoomPrice.ToString(); lblRoomType.Text += responseRoom.Data.RoomType.ToString(); lblNumber.Text += responseRoom.Data.Number; lblTotalValueInsert.Text = _checkOutBLL.CalculateTotalValue(_checkIn, DateTime.Now).ToString(); }