private void ROL_019_Rpt_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { lbl_fecha.Text = DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss"); lbl_empresa.Text = empresa; lbl_usuario.Text = usuario; int IdEmpresa = string.IsNullOrEmpty(p_IdEmpresa.Value.ToString()) ? 0 : Convert.ToInt32(p_IdEmpresa.Value); int IdSucursal = string.IsNullOrEmpty(p_IdSucursal.Value.ToString())? 0 : Convert.ToInt32(p_IdSucursal.Value); int IdNominaTipoLiqui = string.IsNullOrEmpty(p_IdNominaTipoLiqui.Value.ToString()) ? 0 : Convert.ToInt32(p_IdNominaTipoLiqui.Value); DateTime fecha_ini = p_fecha_ini.Value == null ? DateTime.Now : Convert.ToDateTime(p_fecha_ini.Value); DateTime fecha_fin = p_fecha_fin.Value == null ? DateTime.Now : Convert.ToDateTime(p_fecha_fin.Value); ROL_019_Bus bus_rpt = new ROL_019_Bus(); List <ROL_019_Info> lst_rpt = bus_rpt.get_list(IdEmpresa, IdSucursal, IdNominaTipoLiqui, fecha_ini, fecha_fin); this.DataSource = lst_rpt; }
public ActionResult PivotGridROL_019(int?IdEmpresa, DateTime?fecha_ini, DateTime?fecha_fin, decimal?IdEmpleado) { List <ROL_019_Info> lista = new List <ROL_019_Info>(); IdEmpresa = Convert.ToInt32(SessionFixed.IdEmpresa); fecha_ini = Convert.ToDateTime(Session["fecha_ini"]); fecha_fin = Convert.ToDateTime(Session["fecha_fin"]); if (IdEmpleado == null) { IdEmpleado = 0; } ROL_019_Bus bus = new ROL_019_Bus(); lista = bus.get_list(Convert.ToInt32(IdEmpresa), Convert.ToDecimal(IdEmpleado), Convert.ToDateTime(fecha_ini), Convert.ToDateTime(fecha_fin)); return(PartialView("_PivotGridROL_019", lista)); }