protected void btnExportar_Click(object sender, ImageClickEventArgs e) { brReportes br = new brReportes(); string BeginDate, EndDate, Mant = ""; BeginDate = txtFechaIni.Text; EndDate = txtFechaFin.Text; foreach (GridViewRow row in gvTipoMantenimiento.Rows) { CheckBox check = row.FindControl("chkSel") as CheckBox; beTipoMant P = new beTipoMant(); string strError = string.Empty; if (check.Checked) { Mant = Mant + row.Cells[0].Text + ","; } } int lmant = Mant.Length; if (lmant > 0) { Mant = Mant.Substring(0, lmant - 1); } Exportar(BeginDate, EndDate, txtProveedor.Text.ToString(), Mant); }
private void Listar_Reporte() { brReportes br = new brReportes(); string BeginDate, EndDate, Mant = ""; BeginDate = txtFechaIni.Text; EndDate = txtFechaFin.Text; foreach (GridViewRow row in gvTipoMantenimiento.Rows) { CheckBox check = row.FindControl("chkSel") as CheckBox; beTipoMant P = new beTipoMant(); string strError = string.Empty; if (check.Checked) { Mant = Mant + row.Cells[0].Text + ","; } } int lmant = Mant.Length; if (lmant > 0) { Mant = Mant.Substring(0, lmant - 1); } List <beReportes> lbeReportes = br.ListarReporte_Estadistico_xTrabajoEntidad(BeginDate, EndDate, txtProveedor.Text.ToString(), Mant); gvReporte.DataSource = lbeReportes; gvReporte.DataBind(); }
public List <beTipoMant> ListarMantenimiento(SqlConnection con) { List <beTipoMant> lbeMantenimiento = null; SqlCommand cmd = new SqlCommand("sp_WCT_Listar_Mantenimiento", con); cmd.CommandType = CommandType.StoredProcedure; SqlDataReader drd = cmd.ExecuteReader(CommandBehavior.SingleResult); if (drd != null) { int TipoMant_ID = drd.GetOrdinal("TipoMant_ID"); int TipoMant_Des = drd.GetOrdinal("TipoMant_Des"); lbeMantenimiento = new List <beTipoMant>(); beTipoMant obeTipoMantenimiento; while (drd.Read()) { obeTipoMantenimiento = new beTipoMant(); obeTipoMantenimiento.TipoMant_ID = drd.GetInt32(TipoMant_ID); obeTipoMantenimiento.TipoMant_Des = drd.GetString(TipoMant_Des); lbeMantenimiento.Add(obeTipoMantenimiento); } drd.Close(); } return(lbeMantenimiento); }
public List <beTipoMant> Select_Ficha_TipoMant(SqlConnection con, string pID_Ficha) { List <beTipoMant> lbeMantenimiento = null; SqlCommand cmd = new SqlCommand("sp_WCT_Listar_Ficha_Mantenimiento", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter param1 = cmd.Parameters.Add("@Id_Ficha", SqlDbType.VarChar, 15); param1.Direction = ParameterDirection.Input; param1.Value = pID_Ficha; SqlDataReader drd = cmd.ExecuteReader(CommandBehavior.SingleResult); if (drd != null) { int ID_Ficha = drd.GetOrdinal("ID_Ficha"); int TipoMant_ID = drd.GetOrdinal("TipoMant_ID"); lbeMantenimiento = new List <beTipoMant>(); beTipoMant obeTipoMantenimiento; while (drd.Read()) { obeTipoMantenimiento = new beTipoMant(); obeTipoMantenimiento.ID_Ficha = drd.GetInt32(ID_Ficha); obeTipoMantenimiento.TipoMant_ID = drd.GetInt32(TipoMant_ID); lbeMantenimiento.Add(obeTipoMantenimiento); } drd.Close(); } return(lbeMantenimiento); }
protected void btnExportar_Click(object sender, ImageClickEventArgs e) { string BeginDate, EndDate, Mant = "", Check = ""; BeginDate = txtFechaIni.Text; EndDate = txtFechaFin.Text; if (chkComent.Checked == true) { Check = "1"; } foreach (GridViewRow row in gvTipoMantenimiento.Rows) { CheckBox check = row.FindControl("chkSel") as CheckBox; beTipoMant P = new beTipoMant(); string strError = string.Empty; if (check.Checked) { Mant = Mant + row.Cells[0].Text + ","; } } int lmant = Mant.Length; if (lmant > 0) { Mant = Mant.Substring(0, lmant - 1); } Exportar(BeginDate, EndDate, txtProveedor.Text.ToString(), txtTecnico.Text.ToString(), Mant, txtCsid.Text.ToString(), Check, ddlEstado.SelectedValue.ToString()); }
private void Listar_Reporte() { brReportes br = new brReportes(); string BeginDate, EndDate, Mant = "", Check = ""; BeginDate = txtFechaIni.Text; EndDate = txtFechaFin.Text; if (chkComent.Checked == true) { Check = "1"; } foreach (GridViewRow row in gvTipoMantenimiento.Rows) { CheckBox check = row.FindControl("chkSel") as CheckBox; beTipoMant P = new beTipoMant(); string strError = string.Empty; if (check.Checked) { Mant = Mant + row.Cells[0].Text + ","; } } int lmant = Mant.Length; if (lmant > 0) { Mant = Mant.Substring(0, lmant - 1); } List <beReportes> lbeReportes = br.ListarReporte_FichaPxT(BeginDate, EndDate, txtProveedor.Text.ToString(), txtTecnico.Text.ToString(), Mant, txtCsid.Text.ToString(), Check, ddlEstado.SelectedValue.ToString()); gvReporte.DataSource = lbeReportes; gvReporte.DataBind(); }
private void Listar_Supervisiones() { brSupervisiones br = new brSupervisiones(); string Pend = "", Conc = "", Aten = "", Canc = "", Env = "", Trab = "", Obs = ""; string BeginDate, EndDate, Mant = ""; BeginDate = txtFechaDesde.Text; EndDate = txtFechaHasta.Text; if (chkPendiente.Checked) { Pend = "1"; } else { Pend = "0"; } if (chkConcluida.Checked) { Conc = "1"; } else { Conc = "0"; } if (chkAtencion.Checked) { Aten = "1"; } else { Aten = "0"; } if (chkCancelada.Checked) { Canc = "1"; } else { Canc = "0"; } if (chkenviadas.Checked) { Env = "1"; } else { Env = "0"; } if (chkTrabPend.Checked) { Trab = "1"; } else { Trab = "0"; } if (chkObservaciones.Checked) { Obs = "1"; } else { Obs = "0"; } foreach (GridViewRow row in gvTipoMantenimiento.Rows) { CheckBox check = row.FindControl("chkSel") as CheckBox; beTipoMant P = new beTipoMant(); string strError = string.Empty; if (check.Checked) { Mant = Mant + row.Cells[0].Text + ","; } } int lmant = Mant.Length; if (lmant > 0) { Mant = Mant.Substring(0, lmant - 1); } List <beSupervision> lbeSupervisiones = br.ListarSupervisiones(txtCsid.Text.ToString(), txtOperador.Text.ToString(), txtProveedor.Text.ToString(), txtTecnico.Text.ToString(), Pend, Conc, Aten, Canc, BeginDate, EndDate, Mant, Obs, Trab, Env); gvSupervisiones.DataSource = lbeSupervisiones; gvSupervisiones.DataBind(); }