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(); }
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(); }
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(); }
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; }
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); }
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(); }
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); }
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); }