private void DataTableToVO(Model.Vo.Cliente.Model_Vo_Cliente clienteLocal, DataTable dtClienteLocal, Int32 piRegNum) { clienteLocal.Id = Convert.ToInt32(dtClienteLocal.Rows[piRegNum]["id"]); clienteLocal.Nome = Convert.ToString(dtClienteLocal.Rows[piRegNum]["nome"]); clienteLocal.Cpf = Convert.ToString((dtClienteLocal.Rows[piRegNum]["cpf"])); clienteLocal.Email = Convert.ToString((dtClienteLocal.Rows[piRegNum]["email"])); clienteLocal.Rua = Convert.ToString((dtClienteLocal.Rows[piRegNum]["rua"])); clienteLocal.Rg = Convert.ToString((dtClienteLocal.Rows[piRegNum]["rg"])); clienteLocal.Telefone = Convert.ToString((dtClienteLocal.Rows[piRegNum]["telefone"])); clienteLocal.Bairro = Convert.ToString((dtClienteLocal.Rows[piRegNum]["bairro"])); clienteLocal.CEP = Convert.ToString((dtClienteLocal.Rows[piRegNum]["cep"])); clienteLocal.Cidade = Convert.ToString((dtClienteLocal.Rows[piRegNum]["cidade"])); clienteLocal.Complemento = Convert.ToString((dtClienteLocal.Rows[piRegNum]["complemento"])); clienteLocal.Numero = Convert.ToString((dtClienteLocal.Rows[piRegNum]["numero"])); clienteLocal.UF = Convert.ToString((dtClienteLocal.Rows[piRegNum]["uf"])); if ((dtClienteLocal.Rows[piRegNum]["Nascimento"] != DBNull.Value)) { clienteLocal.Nascimento = Convert.ToDateTime((dtClienteLocal.Rows[piRegNum]["Nascimento"])); } if ((dtClienteLocal.Rows[piRegNum]["ValorMensalidade"] != DBNull.Value)) { clienteLocal.ValorMensalidade = float.Parse(Convert.ToString(dtClienteLocal.Rows[piRegNum]["ValorMensalidade"])); } clienteLocal.Observacao = Convert.ToString((dtClienteLocal.Rows[piRegNum]["Observacao"])); if ((dtClienteLocal.Rows[piRegNum]["Ativo"] != DBNull.Value)) { clienteLocal.Ativo = Convert.ToBoolean(dtClienteLocal.Rows[piRegNum]["Ativo"]); } }
private void CarregarCliente(Int32 piNumRegistro) { try { clienteLocal = controlerClientes.CarregarCliente(piNumRegistro); txtId.Text = Convert.ToString(clienteLocal.Id); txtNome.Text = clienteLocal.Nome; txtCpf.Text = clienteLocal.Cpf; txtBairro.Text = clienteLocal.Bairro; txtCep.Text = clienteLocal.CEP; txtCidade.Text = clienteLocal.Cidade; txtComplemento.Text = clienteLocal.Complemento; txtEmail.Text = clienteLocal.Email; txtNumero.Text = clienteLocal.Numero; txtRG.Text = clienteLocal.Rg; txtEndereco.Text = clienteLocal.Rua; txtTelefone.Text = clienteLocal.Telefone; txtEstado.Text = clienteLocal.UF; txtNascimento.Text = Convert.ToString(clienteLocal.Nascimento); txtValorMensalidade.Text = Convert.ToString(clienteLocal.ValorMensalidade); chkAtivo.Checked = clienteLocal.Ativo; txtObservacao.Text = clienteLocal.Observacao; TratarInterface(); } catch (Exception ex) { throw new Exception("Erro ao carregar cliente:" + ex.Message); } }
public void Alterar(Model.Vo.Cliente.Model_Vo_Cliente pClienteLocal) { if ((Validar(pClienteLocal))) { objBoClientes.Alterar(pClienteLocal); } }
public void Incluir(Model.Vo.Cliente.Model_Vo_Cliente pClienteLocal) { if ((Validar(pClienteLocal))) { objBoClientes.Incluir(pClienteLocal); } }
private void btnIncluir_Click(object sender, EventArgs e) { clienteLocal = controlerClientes.DevolveValorInicial(); clienteLocal.RegistroNro = clienteLocal.RegistroNro + 1; PreencherCampos(clienteLocal); StatusLocal = "I"; TratarInterface(); }
private void btnIncluir_Click(object sender, EventArgs e) { clienteLocal = controlerClientes.DevolveValorInicial(); clienteLocal.RegistroNro = clienteLocal.RegistroNro + 1; PreencherCampos(clienteLocal); StatusLocal = "I"; TratarInterface(); }
public Model.Vo.Cliente.Model_Vo_Cliente GetCliente(int pIdCliente) { Model.Vo.Cliente.Model_Vo_Cliente ClienteLocal = new Model.Vo.Cliente.Model_Vo_Cliente(); dtClienteLocal = objBoClientes.GetCliente(pIdCliente); if ((dtClienteLocal.Rows.Count > 0)) { DataTableToVO(ClienteLocal, dtClienteLocal, ClienteLocal.RegistroNro); } return ClienteLocal; }
public Model.Vo.Cliente.Model_Vo_Cliente GetCliente(int pIdCliente) { Model.Vo.Cliente.Model_Vo_Cliente ClienteLocal = new Model.Vo.Cliente.Model_Vo_Cliente(); dtClienteLocal = objBoClientes.GetCliente(pIdCliente); if ((dtClienteLocal.Rows.Count > 0)) { DataTableToVO(ClienteLocal, dtClienteLocal, ClienteLocal.RegistroNro); } return(ClienteLocal); }
private void View_Desktop_CadClientes_Load(object sender, EventArgs e) { clienteLocal = new Model.Vo.Cliente.Model_Vo_Cliente(); CarregarCliente(-1); if ((AbertoPorConsulta) && (ClienteSelecionadoPorConsulta != null)) { clienteLocal = ClienteSelecionadoPorConsulta; PreencherCampos(ClienteSelecionadoPorConsulta); } }
public DataTable pesquisaExtratos(Model.Vo.Cliente.Model_Vo_Cliente pCliente) { try { DataTable tabela = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("select * from movimentacaoestoque where idclientesolicitante like '%" + pCliente.Id + "%' ", Academia.Model.Dao.Dados.Model_Dao_Dados.getStringDeConexao()); da.Fill(tabela); return(tabela); } catch (Exception ex) { //throw new Exception(ex.Message); } return(null); }
private void btnPesquisaCliente_Click(object sender, EventArgs e) { //TODO: AQUI FAZ PESQUISA POR CLIENTES CADASTRADOS View_Desktop_ConClientes consulta = new View_Desktop_ConClientes(); consulta.ShowDialog(); _clienteReserva = consulta.ClienteSelecionado; if (_clienteReserva == null) { return; } tbCliente.Text = _clienteReserva.Nome; }
public List <Model.Vo.Cliente.Model_Vo_Cliente> ListaDeClientesVO(DataTable dtClienteLocal) { List <Model.Vo.Cliente.Model_Vo_Cliente> list = new List <Model.Vo.Cliente.Model_Vo_Cliente>(); if ((dtClienteLocal != null)) { for (int i = 0; i < dtClienteLocal.Rows.Count; i++) { Model.Vo.Cliente.Model_Vo_Cliente ClienteLocal = new Model.Vo.Cliente.Model_Vo_Cliente(); DataTableToVO(ClienteLocal, dtClienteLocal, i); list.Add(ClienteLocal); } } return(list); }
public Model.Vo.Cliente.Model_Vo_Cliente CarregarCliente(Int32 piNumRegistro) { Model.Vo.Cliente.Model_Vo_Cliente clienteLocal = new Model.Vo.Cliente.Model_Vo_Cliente(); dtClienteLocal = objBoClientes.ListaDeClientes(); if (dtClienteLocal.Rows.Count > 0) { if ((piNumRegistro >= 0) && (dtClienteLocal.Rows.Count > piNumRegistro)) { clienteLocal.RegistroNro = piNumRegistro; } else { clienteLocal.RegistroNro = dtClienteLocal.Rows.Count - 1; } DataTableToVO(clienteLocal, dtClienteLocal, clienteLocal.RegistroNro); } else { clienteLocal.Id = 0; clienteLocal.Nome = String.Empty; clienteLocal.Cpf = String.Empty; clienteLocal.Email = String.Empty; clienteLocal.Rua = String.Empty; clienteLocal.Rg = String.Empty; clienteLocal.Telefone = String.Empty; clienteLocal.Bairro = String.Empty; clienteLocal.CEP = String.Empty; clienteLocal.Cidade = String.Empty; clienteLocal.Complemento = String.Empty; clienteLocal.Numero = String.Empty; clienteLocal.UF = String.Empty; clienteLocal.Nascimento = DateTime.MinValue; clienteLocal.ValorMensalidade = 0.0f; clienteLocal.Observacao = String.Empty; clienteLocal.Ativo = true; } return(clienteLocal); }
private void InicializarSauna() { if (_sauna == null) { return; } lvSaunas.SuspendLayout(); lvSaunas.Items.Clear(); List <ReservasDoHorario> reservasDoHorario = new List <ReservasDoHorario>(); foreach (Model.Vo.Agenda.Model_Vo_Agenda reserva in _reservas) { Model.Vo.Sala.Model_Vo_Sala sala = controllerSalas.GetSala(reserva.IdSala); if (sala.Tipo != Model.Vo.eTipoSala.Model_Vo_eTipoSala.Sauna) { continue; } Model.Vo.Cliente.Model_Vo_Cliente cliente = controllerCliente.GetCliente(reserva.IdCliente); ListViewItem itemSauna = new ListViewItem(cliente.Nome); itemSauna.Tag = reserva; ReservasDoHorario resevTemp = ReservasDoHorario.GetReserva(reservasDoHorario, reserva.DataHoraReserva); resevTemp.Horario = reserva.DataHoraReserva; if ((resevTemp.listReservas == null)) { resevTemp.listReservas = new List <Model.Vo.Agenda.Model_Vo_Agenda>(); } resevTemp.listReservas.Add(reserva); reservasDoHorario.Add(resevTemp); //Lista itemSauna.SubItems[0].Tag = ReservasDoHorario.GetReserva(reservasDoHorario, reserva.DataHoraReserva); lvSaunas.Items.Add(itemSauna); } lvSaunas.ResumeLayout(); }
private void PreencherCampos(Model.Vo.Cliente.Model_Vo_Cliente voCliente) { txtId.Text = Convert.ToString(voCliente.Id); txtNome.Text = voCliente.Nome; txtCpf.Text = voCliente.Cpf; txtBairro.Text = voCliente.Bairro; txtCep.Text = voCliente.CEP; txtCidade.Text = voCliente.Cidade; txtComplemento.Text = voCliente.Complemento; txtEmail.Text = voCliente.Email; txtNumero.Text = voCliente.Numero; txtRG.Text = voCliente.Rg; txtEndereco.Text = voCliente.Rua; txtTelefone.Text = voCliente.Telefone; txtEstado.Text = voCliente.UF; txtNascimento.Text = voCliente.Nascimento.ToShortDateString(); txtValorMensalidade.Text = Convert.ToString(voCliente.ValorMensalidade); chkAtivo.Checked = voCliente.Ativo; txtObservacao.Text = voCliente.Observacao; }
public Model.Vo.Cliente.Model_Vo_Cliente DevolveValorInicial() { Model.Vo.Cliente.Model_Vo_Cliente retorno = new Model.Vo.Cliente.Model_Vo_Cliente(); retorno.Nome = String.Empty; retorno.Cpf = String.Empty; retorno.Email = String.Empty; retorno.Rua = String.Empty; retorno.Rg = String.Empty; retorno.Telefone = String.Empty; retorno.Bairro = String.Empty; retorno.CEP = String.Empty; retorno.Cidade = String.Empty; retorno.Complemento = String.Empty; retorno.Numero = String.Empty; retorno.UF = String.Empty; retorno.Nascimento = DateTime.MinValue; retorno.ValorMensalidade = 0.0f; retorno.Observacao = String.Empty; retorno.Ativo = true; return(retorno); }
public Model.Vo.Cliente.Model_Vo_Cliente CarregarCliente(Int32 piNumRegistro) { Model.Vo.Cliente.Model_Vo_Cliente clienteLocal = new Model.Vo.Cliente.Model_Vo_Cliente(); dtClienteLocal = objBoClientes.ListaDeClientes(); if (dtClienteLocal.Rows.Count > 0) { if ((piNumRegistro >= 0) && (dtClienteLocal.Rows.Count > piNumRegistro)) clienteLocal.RegistroNro = piNumRegistro; else clienteLocal.RegistroNro = dtClienteLocal.Rows.Count - 1; DataTableToVO(clienteLocal, dtClienteLocal, clienteLocal.RegistroNro); } else { clienteLocal.Id = 0; clienteLocal.Nome = String.Empty; clienteLocal.Cpf = String.Empty; clienteLocal.Email = String.Empty; clienteLocal.Rua = String.Empty; clienteLocal.Rg = String.Empty; clienteLocal.Telefone = String.Empty; clienteLocal.Bairro = String.Empty; clienteLocal.CEP = String.Empty; clienteLocal.Cidade = String.Empty; clienteLocal.Complemento = String.Empty; clienteLocal.Numero = String.Empty; clienteLocal.UF = String.Empty; clienteLocal.Nascimento = DateTime.MinValue; clienteLocal.ValorMensalidade = 0.0f; clienteLocal.Observacao = String.Empty; clienteLocal.Ativo = true; } return clienteLocal; }
private void View_Desktop_CadClientes_Load(object sender, EventArgs e) { clienteLocal = new Model.Vo.Cliente.Model_Vo_Cliente(); CarregarCliente(-1); if ((AbertoPorConsulta) && (ClienteSelecionadoPorConsulta != null)) { clienteLocal = ClienteSelecionadoPorConsulta; PreencherCampos(ClienteSelecionadoPorConsulta); } }
private void InicializarListViewReservas() { lvReservas.SuspendLayout(); lvReservas.Columns.Clear(); lvReservas.Columns.Add(""); _salas.ForEach(s => lvReservas.Columns.Add(s.Nome)); for (int i = 0; i < lvReservas.Columns.Count; i++) { if ((i > 0)) { lvReservas.Columns[i].Width = 200; } } foreach (ListViewItem horaItem in lvReservas.Items) { ListViewItem.ListViewSubItem subItemHora = horaItem.SubItems[0]; horaItem.SubItems.Clear(); horaItem.Text = subItemHora.Text; for (int i = 0; i < _salas.Count; i++) { horaItem.SubItems.Add(new ListViewItem.ListViewSubItem(horaItem, " ")); } } if (_reservas == null) { return; } List <IGrouping <int, Model.Vo.Agenda.Model_Vo_Agenda> > reservasPorHorario = _reservas.GroupBy(a => a.DataHoraReserva.Hour).ToList <IGrouping <int, Model.Vo.Agenda.Model_Vo_Agenda> >(); List <ReservasDoHorario> reservasDoHorario = new List <ReservasDoHorario>(); foreach (Model.Vo.Agenda.Model_Vo_Agenda reserva in _reservas.OrderBy(x => x.Id).ThenBy(x => x.IdCliente)) { if (controllerSalas.GetSala(reserva.IdSala).Tipo == Model.Vo.eTipoSala.Model_Vo_eTipoSala.Sauna) { continue; } ListViewItem itemReserva = lvReservas.Items[reserva.DataHoraReserva.Hour]; int indexSala = -1; for (int i = 0; i < _salas.Count; i++) { if (_salas[i].Id == reserva.IdSala) { indexSala = i; break; } } if (indexSala == -1) { continue; } Model.Vo.Cliente.Model_Vo_Cliente cliente = controllerCliente.PesquisarCliente(reserva.IdCliente); if (cliente == null) { continue; } if ((itemReserva.SubItems[indexSala + 1].Text.Trim() == String.Empty) || (itemReserva.SubItems[indexSala + 1].Text == null)) { itemReserva.SubItems[indexSala + 1].Text = cliente.Nome; } else { itemReserva.SubItems[indexSala + 1].Text = itemReserva.SubItems[indexSala + 1].Text + ";" + cliente.Nome; } ReservasDoHorario resevTemp = ReservasDoHorario.GetReserva(reservasDoHorario, reserva.DataHoraReserva); resevTemp.Horario = reserva.DataHoraReserva; if ((resevTemp.listReservas == null)) { resevTemp.listReservas = new List <Model.Vo.Agenda.Model_Vo_Agenda>(); } resevTemp.listReservas.Add(reserva); reservasDoHorario.Add(resevTemp); //Lista itemReserva.SubItems[indexSala + 1].Tag = ReservasDoHorario.GetReserva(reservasDoHorario, reserva.DataHoraReserva); } lvReservas.ResumeLayout(); }
private void SelecaoAgendaReservasSauna(MouseEventArgs e, ListView listView) { cmbCliente.Items.Clear(); giClienteSelecionado = 0; cmbCliente.Items.Add("Nenhuma reserva selecionada."); btnIncProduto.Enabled = false; btnFecharConta.Enabled = false; movimentacao = new List <Model.Vo.MovimentacaoEstoque.Model_Vo_MovimentacaoEstoque>(); ListViewHitTestInfo ar = listView.HitTest(e.Location); if (ar.SubItem == null) { new View_Desktop_CadReservas(_dataExibida).ShowDialog(); InicializarDados(); } else { gbItemAgenda = ar.SubItem.Tag as ReservasDoHorario; if ((gbItemAgenda != null) && (gbItemAgenda.listReservas != null) && (gbItemAgenda.listReservas.Count > 0)) { cmbCliente.Items.Clear(); for (int i = 0; i < gbItemAgenda.listReservas.Count; i++) { string sNome = controllerCliente.PesquisarCliente(gbItemAgenda.listReservas[i].IdCliente).Nome; if ((ar.SubItem.Text.ToLower().Contains(";"))) { if (i == 0) { giClienteSelecionado = gbItemAgenda.listReservas[i].IdCliente; } } else if ((ar.SubItem.Text.ToLower().Contains(sNome.ToLower()))) { giClienteSelecionado = gbItemAgenda.listReservas[i].IdCliente; } if ((sNome == null) || (sNome.Trim() == String.Empty)) { cmbCliente.Items.Add("Cliente sem nome - Nº: " + Convert.ToString(gbItemAgenda.listReservas[i].IdCliente)); } else { cmbCliente.Items.Add(sNome + " - Nº: " + Convert.ToString(gbItemAgenda.listReservas[i].IdCliente)); } } Model.Vo.Agenda.Model_Vo_Agenda agenda = gbItemAgenda.listReservas.FirstOrDefault(x => x.IdCliente == giClienteSelecionado); giAgendaSelec = 0; if (agenda != null) { giAgendaSelec = agenda.Id; clienteSelecionado = controllerCliente.PesquisarCliente(agenda.IdCliente); cmbCliente.Text = clienteSelecionado.Nome; btnIncProduto.Enabled = true; btnFecharConta.Enabled = true; } } else { new View_Desktop_CadReservas(_dataExibida).ShowDialog(); InicializarDados(); } } CarregarItensMovimentacaoSelecionada(giAgendaSelec); }
private Boolean Validar(Model.Vo.Cliente.Model_Vo_Cliente pClienteLocal) { return(objBoClientes.Validar(pClienteLocal)); }
public List <Academia.Model.Vo.MovimentacaoEstoque.Model_Vo_MovimentacaoEstoque> pesquisaExtratos(Model.Vo.Cliente.Model_Vo_Cliente pCliente) { List <Academia.Model.Vo.MovimentacaoEstoque.Model_Vo_MovimentacaoEstoque> extratos = new List <Academia.Model.Vo.MovimentacaoEstoque.Model_Vo_MovimentacaoEstoque>(); extratos = objBoClientes.pesquisaExtratos(pCliente); return(extratos); }
public Model.Vo.Cliente.Model_Vo_Cliente PesquisarCliente(int idCliente) { Model.Vo.Cliente.Model_Vo_Cliente voClientes = objBoClientes.Pesquisar(idCliente); return(voClientes); }
private void CarregarCliente(Int32 piNumRegistro) { try { clienteLocal = controlerClientes.CarregarCliente(piNumRegistro); txtId.Text = Convert.ToString(clienteLocal.Id); txtNome.Text = clienteLocal.Nome; txtCpf.Text = clienteLocal.Cpf; txtBairro.Text = clienteLocal.Bairro; txtCep.Text = clienteLocal.CEP; txtCidade.Text = clienteLocal.Cidade; txtComplemento.Text = clienteLocal.Complemento; txtEmail.Text = clienteLocal.Email; txtNumero.Text = clienteLocal.Numero; txtRG.Text = clienteLocal.Rg; txtEndereco.Text = clienteLocal.Rua; txtTelefone.Text = clienteLocal.Telefone; txtEstado.Text = clienteLocal.UF; txtNascimento.Text = Convert.ToString(clienteLocal.Nascimento); txtValorMensalidade.Text = Convert.ToString(clienteLocal.ValorMensalidade); chkAtivo.Checked = clienteLocal.Ativo; txtObservacao.Text = clienteLocal.Observacao; TratarInterface(); } catch (Exception ex) { throw new Exception("Erro ao carregar cliente:" + ex.Message); } }
public Model.Vo.Cliente.Model_Vo_Cliente DevolveValorInicial() { Model.Vo.Cliente.Model_Vo_Cliente retorno = new Model.Vo.Cliente.Model_Vo_Cliente(); retorno.Nome = String.Empty; retorno.Cpf = String.Empty; retorno.Email = String.Empty; retorno.Rua = String.Empty; retorno.Rg = String.Empty; retorno.Telefone = String.Empty; retorno.Bairro = String.Empty; retorno.CEP = String.Empty; retorno.Cidade = String.Empty; retorno.Complemento = String.Empty; retorno.Numero = String.Empty; retorno.UF = String.Empty; retorno.Nascimento = DateTime.MinValue; retorno.ValorMensalidade = 0.0f; retorno.Observacao = String.Empty; retorno.Ativo = true; return retorno; }
public List<Model.Vo.Cliente.Model_Vo_Cliente> ListaDeClientesVO(DataTable dtClienteLocal) { List<Model.Vo.Cliente.Model_Vo_Cliente> list = new List<Model.Vo.Cliente.Model_Vo_Cliente>(); if ((dtClienteLocal != null)) { for (int i = 0; i < dtClienteLocal.Rows.Count; i++) { Model.Vo.Cliente.Model_Vo_Cliente ClienteLocal = new Model.Vo.Cliente.Model_Vo_Cliente(); DataTableToVO(ClienteLocal, dtClienteLocal, i); list.Add(ClienteLocal); } } return list; }
private void btnPesquisaCliente_Click(object sender, EventArgs e) { //TODO: AQUI FAZ PESQUISA POR CLIENTES CADASTRADOS View_Desktop_ConClientes consulta = new View_Desktop_ConClientes(); consulta.ShowDialog(); _clienteReserva = consulta.ClienteSelecionado; if (_clienteReserva == null) return; tbCliente.Text = _clienteReserva.Nome; }
public View_Desktop_ExtratoClientes(Model.Vo.Cliente.Model_Vo_Cliente pClient) { InitializeComponent(); txtNome.Text = Convert.ToString(pClient.Nome); //MessageBox.Show(Convert.ToString(pClient.Nome)); teste }
private void SelecaoAgendaReservasSauna(MouseEventArgs e, ListView listView) { cmbCliente.Items.Clear(); giClienteSelecionado = 0; cmbCliente.Items.Add("Nenhuma reserva selecionada."); btnIncProduto.Enabled = false; btnFecharConta.Enabled = false; movimentacao = new List<Model.Vo.MovimentacaoEstoque.Model_Vo_MovimentacaoEstoque>(); ListViewHitTestInfo ar = listView.HitTest(e.Location); if (ar.SubItem == null) { new View_Desktop_CadReservas(_dataExibida).ShowDialog(); InicializarDados(); } else { gbItemAgenda = ar.SubItem.Tag as ReservasDoHorario; if ((gbItemAgenda != null) && (gbItemAgenda.listReservas != null) && (gbItemAgenda.listReservas.Count > 0)) { cmbCliente.Items.Clear(); for (int i = 0; i < gbItemAgenda.listReservas.Count; i++) { string sNome = controllerCliente.PesquisarCliente(gbItemAgenda.listReservas[i].IdCliente).Nome; if ((ar.SubItem.Text.ToLower().Contains(";"))) { if (i == 0) giClienteSelecionado = gbItemAgenda.listReservas[i].IdCliente; } else if ((ar.SubItem.Text.ToLower().Contains(sNome.ToLower()))) giClienteSelecionado = gbItemAgenda.listReservas[i].IdCliente; if ((sNome == null) || (sNome.Trim() == String.Empty)) cmbCliente.Items.Add("Cliente sem nome - Nº: " + Convert.ToString(gbItemAgenda.listReservas[i].IdCliente)); else cmbCliente.Items.Add(sNome + " - Nº: " + Convert.ToString(gbItemAgenda.listReservas[i].IdCliente)); } Model.Vo.Agenda.Model_Vo_Agenda agenda = gbItemAgenda.listReservas.FirstOrDefault(x => x.IdCliente == giClienteSelecionado); giAgendaSelec = 0; if (agenda != null) { giAgendaSelec = agenda.Id; clienteSelecionado = controllerCliente.PesquisarCliente(agenda.IdCliente); cmbCliente.Text = clienteSelecionado.Nome; btnIncProduto.Enabled = true; btnFecharConta.Enabled = true; } } else { new View_Desktop_CadReservas(_dataExibida).ShowDialog(); InicializarDados(); } } CarregarItensMovimentacaoSelecionada(giAgendaSelec); }