Ejemplo n.º 1
0
 public v_ControlePlatao()
 {
     InitializeComponent();
     this.c_plantao         = new c_Plantao();
     this.m_plantao         = new m_Plantao();
     this.c_corretorPlantao = new c_CorretorPlantao();
     this.m_corretorPlantao = new m_CorretorPlantao();
 }
Ejemplo n.º 2
0
 public v_ControlePlatao(string UsuarioCad)
 {
     InitializeComponent();
     _UsuarioCad            = UsuarioCad;
     this.c_plantao         = new c_Plantao();
     this.m_plantao         = new m_Plantao();
     this.c_corretorPlantao = new c_CorretorPlantao();
     this.m_corretorPlantao = new m_CorretorPlantao();
 }
Ejemplo n.º 3
0
 public v_VisaoAtendimentoPlantao()
 {
     InitializeComponent();
     this.m_tempoAtendimento = new m_TempoAtendimento();
     this.c_tempoAtendimento = new c_TempoAtendimento();
     this.m_corretorPlantao  = new m_CorretorPlantao();
     this.c_corretorPlantao  = new c_CorretorPlantao();
     this.m_plantao          = new m_Plantao();
     this.c_plantao          = new c_Plantao();
 }
Ejemplo n.º 4
0
 public v_NovoPlantao(string UsuarioCad)
 {
     InitializeComponent();
     this.c_corretor         = new c_Corretor();
     this.m_corretor         = new m_Corretor();
     this.m_plantao          = new m_Plantao();
     this.c_plantao          = new c_Plantao();
     this.m_tempoAtendimento = new m_TempoAtendimento();
     this.c_tempoAtendimento = new c_TempoAtendimento();
     this.m_corretorPlantao  = new m_CorretorPlantao();
     this.c_corretorPlantao  = new c_CorretorPlantao();
     _UsuarioCad             = UsuarioCad;
 }
Ejemplo n.º 5
0
 public v_VisaoAtendimentoPlantao(int CodigoPlantao)
 {
     InitializeComponent();
     this.m_tempoAtendimento = new m_TempoAtendimento();
     this.c_tempoAtendimento = new c_TempoAtendimento();
     this.m_corretorPlantao  = new m_CorretorPlantao();
     this.c_corretorPlantao  = new c_CorretorPlantao();
     this.m_plantao          = new m_Plantao();
     this.c_plantao          = new c_Plantao();
     m_corretorPlantao.fk_plantao_corretorplantao   = CodigoPlantao;
     m_tempoAtendimento.fk_plantao_tempoatendimento = CodigoPlantao;
     m_plantao.idplantao = CodigoPlantao;
     gbxCorretores.Text  = gbxCorretores.Text + " - Equipe " + c_plantao.CarregarNomeEquipePlantao(m_plantao);
 }
Ejemplo n.º 6
0
        public void NovoCorretorPlantao(m_CorretorPlantao m_corretorPlantao)
        {
            MySqlConnection conexao = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando = c_ConexaoMySql.GetComando(conexao);

            comando.CommandType = System.Data.CommandType.Text;
            comando.CommandText =
                "insert into corretorplantao(posicao,nomecorretor,fk_plantao_corretorplantao) values(@posicao,@nomecorretor,@fk_plantao_corretorplantao);";
            comando.Parameters.Add(new MySqlParameter("@nomecorretor", m_corretorPlantao.nomecorretor));
            comando.Parameters.Add(new MySqlParameter("@posicao", m_corretorPlantao.posicao));
            comando.Parameters.Add(new MySqlParameter("@fk_plantao_corretorplantao", m_corretorPlantao.fk_plantao_corretorplantao));

            comando.ExecuteNonQuery();
            conexao.Clone();
        }
Ejemplo n.º 7
0
        public DataTable CarregarCorretoresPlantaoID(m_CorretorPlantao m_corretorPlantao)
        {
            MySqlConnection conexao = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando = c_ConexaoMySql.GetComando(conexao);

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

            dataTable.Load(reader);
            conexao.Clone();
            return(dataTable);
        }
Ejemplo n.º 8
0
        public int SomarTotalPosicoesCorretoresPlantao(m_CorretorPlantao m_corretorPlantao)
        {
            int resultado = 0;

            MySqlConnection conexao = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando = c_ConexaoMySql.GetComando(conexao);

            comando.CommandText =
                "select count(posicao) from corretorplantao where fk_plantao_corretorplantao = @fk_plantao_corretorplantao;";
            comando.CommandType = CommandType.Text;
            comando.Parameters.Add(new MySqlParameter("@fk_plantao_corretorplantao", m_corretorPlantao.fk_plantao_corretorplantao));
            MySqlDataReader reader = c_ConexaoMySql.GetDataReader(comando);

            while (reader.Read())
            {
                resultado = reader.GetInt32(0);
            }
            conexao.Clone();
            return(resultado);
        }