public static DataTable GetDashboardCompromisos(DateTime?fecha_ini, DateTime?fecha_fin, string pLstEmpleados) { DataTable dt = new DataTable(); try { DashboardCompromisosCOM Compromisos = new DashboardCompromisosCOM(); DataSet ds = Compromisos.Sps_DashBoardCompromisos(fecha_ini, fecha_fin, pLstEmpleados); dt = ds.Tables[0]; return(dt); } catch (Exception ex) { return(dt); } }
protected void btnverempleadodetalles_Click(object sender, EventArgs e) { try { DirectoryInfo dirInfo = new DirectoryInfo(Server.MapPath("~/img/users/")); string imagen = hdfuserselected.Value.ToUpper() + ".png"; if (imagen != "" && File.Exists(dirInfo.ToString().Trim() + imagen)) { DateTime localDate = DateTime.Now; string date = localDate.ToString(); date = date.Replace("/", "_"); date = date.Replace(":", "_"); date = date.Replace(" ", ""); img_employee.ImageUrl = "~/img/users/" + imagen + "?date=" + date; } else { imagen = "user.png"; DateTime localDate = DateTime.Now; string date = localDate.ToString(); date = date.Replace("/", "_"); date = date.Replace(":", "_"); date = date.Replace(" ", ""); img_employee.ImageUrl = "~/img/" + imagen + "?date=" + date; } lblnombre.Text = hdfnombre.Value; lblpuesto.Text = hdfuserselected.Value; DateTime fechaInicial = Convert.ToDateTime(hdffechainicio.Value); DateTime fechaFinal = Convert.ToDateTime(hdffechafin.Value); string User = hdfuserselected.Value; DashboardCompromisosCOM Compromiso = new DashboardCompromisosCOM(); DataSet ds = new DataSet(); ds = Compromiso.Sps_CumplimientoCompromisos(fechaInicial, fechaFinal, User); DataTable dt = new DataTable(); dt = ds.Tables[0]; repeater_compromisos_detalle.DataSource = dt; repeater_compromisos_detalle.DataBind(); modal_bdy.Visible = true; // ModalShow("#ModalEmpleado"); } catch (Exception ex) { Alert.ShowAlertError(ex.ToString(), this.Page); } }