예제 #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();
 }
예제 #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();
 }
예제 #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();
 }
예제 #4
0
        public void ExcluirPlantao(m_Plantao m_plantao)
        {
            MySqlConnection conexao = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando = c_ConexaoMySql.GetComando(conexao);

            comando.CommandType = System.Data.CommandType.Text;
            comando.CommandText =
                "delete from plantao where idplantao = @idplantao;";
            comando.Parameters.Add(new MySqlParameter("@idplantao", m_plantao.idplantao));
            comando.ExecuteNonQuery();
            conexao.Clone();
        }
예제 #5
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;
 }
예제 #6
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);
 }
예제 #7
0
        public void NovoPlantao(m_Plantao m_plantao)
        {
            MySqlConnection conexao = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando = c_ConexaoMySql.GetComando(conexao);

            comando.CommandType = CommandType.Text;
            comando.CommandText = "insert into plantao(equipe,dataplantao,horainicial,horafinal,tempoporpessoa,usuariocad) values (@equipe,@dataplantao,@horainicial,@horafinal,@tempoporpessoa,@usuariocad);";

            comando.Parameters.Add(new MySqlParameter("@equipe", m_plantao.equipe));
            comando.Parameters.Add(new MySqlParameter("@dataplantao", m_plantao.dataplantao));
            comando.Parameters.Add(new MySqlParameter("@horainicial", m_plantao.horainicial));
            comando.Parameters.Add(new MySqlParameter("@horafinal", m_plantao.horafinal));
            comando.Parameters.Add(new MySqlParameter("@tempoporpessoa", m_plantao.tempoporpessoa));
            comando.Parameters.Add(new MySqlParameter("@usuariocad", m_plantao.usuariocad));
            comando.ExecuteNonQuery();
            conexao.Clone();
        }
예제 #8
0
        public TimeSpan CarregarTempoFinalPlantao(m_Plantao m_plantao)
        {
            TimeSpan        resultado = new TimeSpan(0, 0, 0);
            MySqlConnection conexao   = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando   = c_ConexaoMySql.GetComando(conexao);

            comando.CommandText = "select horafinal from plantao where idplantao = @idplantao;";
            comando.CommandType = CommandType.Text;
            comando.Parameters.Add(new MySqlParameter("@idplantao", m_plantao.idplantao));
            MySqlDataReader reader = c_ConexaoMySql.GetDataReader(comando);

            while (reader.Read())
            {
                resultado = reader.GetTimeSpan(0);
            }
            conexao.Clone();
            return(resultado);
        }
예제 #9
0
        public string CarregarNomeEquipePlantao(m_Plantao m_plantao)
        {
            string          resultado = "";
            MySqlConnection conexao   = c_ConexaoMySql.GetConexao();
            MySqlCommand    comando   = c_ConexaoMySql.GetComando(conexao);

            comando.CommandText = "select equipe from plantao where idplantao = @idplantao;";
            comando.CommandType = CommandType.Text;
            comando.Parameters.Add(new MySqlParameter("@idplantao", m_plantao.idplantao));
            MySqlDataReader reader = c_ConexaoMySql.GetDataReader(comando);

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