示例#1
0
 public v_VisitasStand(int Permissao, string UsuarioCad)
 {
     InitializeComponent();
     this.m_atendimento = new m_Atendimento();
     this.c_atendimento = new c_Atendimento();
     _Permissao         = Permissao;
     _UsuarioCad        = UsuarioCad;
 }
示例#2
0
 public v_InformarData(int CodigoAtendimento, string UsuarioCad)//Para informar Data da compra
 {
     InitializeComponent();
     this.c_atendimento          = new c_Atendimento();
     this.m_atendimento          = new m_Atendimento();
     m_atendimento.idatendimento = CodigoAtendimento;
     m_atendimento.usuariocad    = UsuarioCad;
 }
示例#3
0
        //Construtor para registrar novo Atendimento.
        public v_NovoAtendimento()
        {
            this.m_atendimento  = new m_Atendimento();
            this.c_atendimento  = new c_Atendimento();
            this.c_loteamento   = new c_Loteamento();
            this.c_corretor     = new c_Corretor();
            this.c_cidadeEstado = new c_CidadeEstado();

            InitializeComponent();
        }
示例#4
0
        public void ExcluirAtendimento(m_Atendimento m_atendimento)
        {
            MySqlConnection conexao = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando = c_ConexaoMySql.GetComando(conexao);

            comando.CommandType = CommandType.Text;
            comando.CommandText = "delete from atendimento where idatendimento = @idatendimento;";
            comando.Parameters.Add(new MySqlParameter("@idatendimento", m_atendimento.idatendimento));
            comando.ExecuteNonQuery();
            conexao.Clone();
        }
示例#5
0
        public v_NovoAtendimento(string UsuarioCad)
        {
            this.m_atendimento  = new m_Atendimento();
            this.c_atendimento  = new c_Atendimento();
            this.c_loteamento   = new c_Loteamento();
            this.c_corretor     = new c_Corretor();
            this.c_cidadeEstado = new c_CidadeEstado();

            InitializeComponent();
            _usuarioCad = UsuarioCad;
        }
示例#6
0
        public void AlterarAtendimentoParaDesistiu(m_Atendimento m_atendimento)
        {
            MySqlConnection conexao = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando = c_ConexaoMySql.GetComando(conexao);

            comando.CommandType = CommandType.Text;
            comando.CommandText = "update atendimento set comprou = @comprou,usuariocad = @usuariocad where idatendimento = @idatendimento;";
            comando.Parameters.Add(new MySqlParameter("@idatendimento", m_atendimento.idatendimento));
            comando.Parameters.Add(new MySqlParameter("@comprou", m_atendimento.comprou));
            comando.Parameters.Add(new MySqlParameter("@usuariocad", m_atendimento.usuariocad));
            comando.ExecuteNonQuery();
            conexao.Clone();
        }
示例#7
0
        public DataTable CarregarAtendimentos(m_Atendimento m_atendimento)
        {
            MySqlConnection conexao = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando = c_ConexaoMySql.GetComando(conexao);

            comando.CommandText = "select * from atendimento where idatendimento = @idatendimento;";
            comando.CommandType = CommandType.Text;
            comando.Parameters.Add(new MySqlParameter("@idatendimento", m_atendimento.idatendimento));
            MySqlDataReader reader    = c_ConexaoMySql.GetDataReader(comando);
            DataTable       dataTable = new DataTable();

            dataTable.Load(reader);
            conexao.Clone();
            return(dataTable);
        }
示例#8
0
        public void AlterarAtendimento(m_Atendimento m_atendimento)
        {
            MySqlConnection conexao = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando = c_ConexaoMySql.GetComando(conexao);

            comando.CommandType = CommandType.Text;
            comando.CommandText = "update atendimento set nomeCliente = @nomecliente,telefone = @telefone,cidadeuf = @cidadeuf,atendimentoAnterior = @atendimentoanterior,identificador = @identificador,localizou = @localizou,corretorAtual = @corretoratual,dataAtendimento = @dataatendimento,empreendimento = @empreendimento, usuariocad = @usuariocad where idatendimento = @idatendimento;";
            comando.Parameters.Add(new MySqlParameter("@idatendimento", m_atendimento.idatendimento));
            comando.Parameters.Add(new MySqlParameter("@nomecliente", m_atendimento.nomeCliente));
            comando.Parameters.Add(new MySqlParameter("@telefone", m_atendimento.telefone));
            comando.Parameters.Add(new MySqlParameter("@cidadeuf", m_atendimento.cidadeUF));
            comando.Parameters.Add(new MySqlParameter("@atendimentoanterior", m_atendimento.atendimentoAnterior));
            comando.Parameters.Add(new MySqlParameter("@identificador", m_atendimento.identificador));
            comando.Parameters.Add(new MySqlParameter("@localizou", m_atendimento.localizou));
            comando.Parameters.Add(new MySqlParameter("@corretoratual", m_atendimento.corretorAtual));
            comando.Parameters.Add(new MySqlParameter("@empreendimento", m_atendimento.empreendimento));
            comando.Parameters.Add(new MySqlParameter("@dataatendimento", m_atendimento.dataAtendimento));
            comando.Parameters.Add(new MySqlParameter("@usuariocad", m_atendimento.usuariocad));
            comando.ExecuteNonQuery();
            conexao.Clone();
        }
示例#9
0
        public void NovoAtendimento(m_Atendimento m_atendimento)
        {
            MySqlConnection conexao = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando = c_ConexaoMySql.GetComando(conexao);

            comando.CommandType = CommandType.Text;
            comando.CommandText = "insert into atendimento(nomecliente,telefone,cidadeuf,atendimentoanterior,identificador,localizou,comprou,corretoratual,dataatendimento,empreendimento,usuariocad) " +
                                  "values(@nomecliente, @telefone, @cidadeuf, @atendimentoanterior, @identificador, @localizou, @comprou, @corretoratual, @dataatendimento,@empreendimento,@usuariocad); ";
            comando.Parameters.Add(new MySqlParameter("@nomecliente", m_atendimento.nomeCliente));
            comando.Parameters.Add(new MySqlParameter("@telefone", m_atendimento.telefone));
            comando.Parameters.Add(new MySqlParameter("@cidadeuf", m_atendimento.cidadeUF));
            comando.Parameters.Add(new MySqlParameter("@atendimentoanterior", m_atendimento.atendimentoAnterior));
            comando.Parameters.Add(new MySqlParameter("@identificador", m_atendimento.identificador));
            comando.Parameters.Add(new MySqlParameter("@localizou", m_atendimento.localizou));
            comando.Parameters.Add(new MySqlParameter("@comprou", m_atendimento.comprou));
            comando.Parameters.Add(new MySqlParameter("@corretoratual", m_atendimento.corretorAtual));
            comando.Parameters.Add(new MySqlParameter("@empreendimento", m_atendimento.empreendimento));
            comando.Parameters.Add(new MySqlParameter("@dataatendimento", m_atendimento.dataAtendimento));
            comando.Parameters.Add(new MySqlParameter("@usuariocad", m_atendimento.usuariocad));
            comando.ExecuteNonQuery();
            conexao.Clone();
        }
示例#10
0
        //Construtor para alterar Atendimento
        public v_NovoAtendimento(int CodigoAtendimento, string NomeCliente, string Telefone, string CidadeEstado, string CorretorAtual,
                                 string CorretorAtdAnterior, string Empreendimento, string Identificador, string Localizou, DateTime DataCadastroAtend, string UsuarioCad, bool Alterar)
        {
            this.m_atendimento  = new m_Atendimento();
            this.c_atendimento  = new c_Atendimento();
            this.c_loteamento   = new c_Loteamento();
            this.c_corretor     = new c_Corretor();
            this.c_cidadeEstado = new c_CidadeEstado();
            InitializeComponent();
            _usuarioCad = UsuarioCad;
            //Montar alteração...
            m_atendimento.idatendimento = CodigoAtendimento;
            txtNomeCliente.Text         = NomeCliente;
            txtTelefoneCliente.Text     = Telefone;
            if (Identificador != string.Empty)
            {
                txtQD.Text = Identificador.Substring(3, 3);
                txtLT.Text = Identificador.Substring(10, 3);
            }
            else
            {
                txtQD.Text = string.Empty;
                txtLT.Text = string.Empty;
            }
            lookUpEditCorretorAtual.EditValue    = CorretorAtual;
            lookUpEditCorretorAnterior.EditValue = CorretorAtdAnterior;
            lookUpEditEmpreendimento.EditValue   = Empreendimento;
            if (CidadeEstado == null)
            {
                lookUpEditCiddeUF.EditValue = "";
            }
            else
            {
                lookUpEditCiddeUF.EditValue = CidadeEstado;
            }
            m_atendimento.cidadeUF = CidadeEstado;
            if (Localizou == "Televisão")
            {
                rbtTelevisao.Checked = true;
            }
            else if (Localizou == "Rádio")
            {
                rbtRadio.Checked = true;
            }
            else if (Localizou == "Internet")
            {
                rbtInternet.Checked = true;
            }
            else if (Localizou == "Carro Som")
            {
                rbtCarroSom.Checked = true;
            }
            else if (Localizou == "Fôlder")
            {
                rbtFolder.Checked = true;
            }
            else if (Localizou == "Outdoor")
            {
                rbtOutdoor.Checked = true;
            }
            else if (Localizou == "Indicação")
            {
                rbtIndicacao.Checked = true;
            }
            else
            {
                txtOutros.Text = Localizou;
            }

            dtpDataCadastro.Value = DataCadastroAtend;
            AlterarAtend          = Alterar;
        }
示例#11
0
 public v_VisitasStand()
 {
     InitializeComponent();
     this.m_atendimento = new m_Atendimento();
     this.c_atendimento = new c_Atendimento();
 }
示例#12
0
 public v_InformarData()
 {
     InitializeComponent();
     this.c_atendimento = new c_Atendimento();
     this.m_atendimento = new m_Atendimento();
 }