protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dtTable = new DataTable(); BSNLYR.bsnssDept emp = new BSNLYR.bsnssDept(); dtTable = emp.consultarTodos(); GridView1.DataSource = dtTable; GridView1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dtTable = new DataTable(); BSNLYR.bsnssDept emp = new BSNLYR.bsnssDept(); dtTable = emp.consultarTodos(); GridView1.DataSource = dtTable; GridView1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dtTable = new DataTable(); BSNLYR.bsnssDept emp2 = new BSNLYR.bsnssDept(); dtTable = emp2.consultarDept(); txtDept.DataSource = dtTable; txtDept.DataTextField = "Departamentos"; txtDept.DataValueField = "Departamentos"; txtDept.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BSNLYR.bsnssDept emp = new BSNLYR.bsnssDept(); emp.consultarID(int.Parse(Request["id"])); TextBox1.Text = emp.dept_nombre; if (String.IsNullOrEmpty(emp.dept_gerente_id) == true) { Label1.Text = "SIN GERENTE"; TextBox2.Text = ""; } else { Label1.Text = emp.dept_gerente; TextBox2.Text = int.Parse(emp.dept_gerente_id).ToString(); } Label2.Text = int.Parse(emp.dept_id).ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BSNLYR.bsnssDept emp = new BSNLYR.bsnssDept(); emp.consultarID(int.Parse(Request["id"])); TextBox1.Text = emp.dept_nombre; if (String.IsNullOrEmpty(emp.dept_gerente_id) == true) { Label1.Text = "SIN GERENTE"; TextBox2.Text = ""; } else { Label1.Text = emp.dept_gerente; TextBox2.Text = int.Parse(emp.dept_gerente_id).ToString(); } Label2.Text = int.Parse(emp.dept_id).ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dtTable = new DataTable(); BSNLYR.bsnssDept emp2 = new BSNLYR.bsnssDept(); dtTable = emp2.consultarDept(); txtDept.DataSource = dtTable; txtDept.DataTextField = "Departamentos"; txtDept.DataValueField = "Departamentos"; txtDept.DataBind(); BSNLYR.bsnssEmployee emp = new BSNLYR.bsnssEmployee(); emp.selectEmployee(Request["id"], 7); txtNombre.Text = emp.emp_nombre; txtApellido.Text = emp.emp_apellido; txtCedula.Text = emp.emp_cedula; txtExtension.Text = emp.emp_ext; txtFlota.Text = emp.emp_flota; txtDept.SelectedValue = emp.dept_id; lbCod.Text = int.Parse(emp.emp_id).ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dtTable = new DataTable(); BSNLYR.bsnssDept emp2 = new BSNLYR.bsnssDept(); dtTable = emp2.consultarDept(); txtDept.DataSource = dtTable; txtDept.DataTextField = "Departamentos"; txtDept.DataValueField = "Departamentos"; txtDept.DataBind(); BSNLYR.bsnssEmployee emp = new BSNLYR.bsnssEmployee(); emp.selectEmployee(Request["id"], 7); txtNombre.Text = emp.emp_nombre; txtApellido.Text = emp.emp_apellido; txtCedula.Text = emp.emp_cedula; txtExtension.Text = emp.emp_ext; txtFlota.Text = emp.emp_flota; txtDept.SelectedValue = emp.dept_id; lbCod.Text = int.Parse(emp.emp_id).ToString(); } }
protected void Button3_Click(object sender, EventArgs e) { BSNLYR.bsnssDept objEd = new BSNLYR.bsnssDept(); objEd.eliminarDept(int.Parse(Label2.Text)); Response.Redirect("Departamentos.aspx"); }
protected void Button2_Click(object sender, EventArgs e) { BSNLYR.bsnssDept objEd = new BSNLYR.bsnssDept(); objEd.actualizarDept(int.Parse(Label2.Text), TextBox1.Text, int.Parse(TextBox2.Text)); Response.Redirect("Departamentos.aspx"); }
protected void Button2_Click(object sender, EventArgs e) { BSNLYR.bsnssDept emp = new BSNLYR.bsnssDept(); emp.registrarDept(TextBox1.Text, int.Parse(TextBox2.Text)); Response.Redirect("Departamentos.aspx"); }
protected void Button3_Click(object sender, EventArgs e) { BSNLYR.bsnssDept objEd = new BSNLYR.bsnssDept(); objEd.eliminarDept(int.Parse(Label2.Text)); Response.Redirect("Departamentos.aspx"); }
protected void Button2_Click(object sender, EventArgs e) { BSNLYR.bsnssDept objEd = new BSNLYR.bsnssDept(); objEd.actualizarDept(int.Parse(Label2.Text), TextBox1.Text, int.Parse(TextBox2.Text)); Response.Redirect("Departamentos.aspx"); }
protected void Button2_Click(object sender, EventArgs e) { BSNLYR.bsnssDept emp = new BSNLYR.bsnssDept(); emp.registrarDept(TextBox1.Text, int.Parse(TextBox2.Text)); Response.Redirect("Departamentos.aspx"); }