Guest User

Untitled

a guest
May 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. public partial class ConsultarEvidencia : System.Web.UI.Page
  2. {
  3. private int conta = 0;
  4. public string Inicio="";
  5. public string Fin = "";
  6.  
  7. protected void Page_Load(object sender, EventArgs e)
  8. {
  9.  
  10.  
  11. }
  12. public void btnOk_T_Onclick(object sender, EventArgs e)
  13. {
  14. DataTable data = new DataTable();
  15. HistoryBI historyBi=new HistoryBI();
  16.  
  17. Inicio = dtInicio.Text;
  18. Fin = dtFin.Text;
  19.  
  20. data = historyBi.ConsultarEvidencia(Inicio,Fin);
  21.  
  22.  
  23. //DirectoryInfo d = new DirectoryInfo(@"C:UsersNed-DesignDocumentsprojectsNederaV4AdministratorsTemp");//Assuming Test is your Folder
  24. //FileInfo[] Files = d.GetFiles("*.png"); //Getting Text files
  25.  
  26. System.Web.UI.HtmlControls.HtmlGenericControl createI = new System.Web.UI.HtmlControls.HtmlGenericControl("i");
  27. createI.ID = "createI";
  28. string str ="";
  29.  
  30.  
  31.  
  32. foreach (DataRow dtRow in data.Rows)
  33. {
  34.  
  35. TableRow row = new TableRow();
  36.  
  37. for (int i=0;i<dtRow.ItemArray.Length;i++)
  38. {
  39. TableCell cell1 = new TableCell();
  40. cell1.Text = dtRow[i].ToString();
  41.  
  42. row.Cells.Add(cell1);
  43.  
  44. }
  45.  
  46. tabla.Rows.Add(row);
  47.  
  48. }
  49.  
  50.  
  51.  
  52. }
  53.  
  54.  
  55. }
  56.  
  57. $(document).ready(function () {
  58.  
  59.  
  60. $("[id$='dtInicio'],[id$='dtFin']").datepicker($.datepicker.regional["<%= Session["Lang"] %>"]);
  61.  
  62.  
  63. $('#MainContent_tabla').DataTable({
  64. dom: 'Blfrtip',
  65. buttons: [
  66. 'excelHtml5',
  67. 'pdfHtml5'
  68. ],
  69. columns: [
  70. { title: "Id del Usuario" },
  71. { title: "Nombre" },
  72. { title: "Lectura de QR" },
  73. { title: "Toma de evidencia" },
  74. { title: "Diferencia" },
  75. {title: "Placas"},
  76. { title: "Imagen", "mRender": function (data, type, full) {
  77. return '<center><a class="fa fa-picture-o" aria-hidden="true" style="font-size:24px;cursor:pointer;" href=/Temp/'+full[6]+'></a></center>';
  78. }
  79. }
  80. ],
  81. "language": {
  82. "lengthMenu": "Mostrar _MENU_ Registros por pagina",
  83. "zeroRecords": "No hay ningun registro que coincida",
  84. "info": "Mostrando pagina _PAGE_ of _PAGES_",
  85. "infoEmpty": "No hay registros disponibles",
  86. "infoFiltered": "(filtered from _MAX_ total records)",
  87. "search": "Buscar Palabra:",
  88. "paginate": {
  89. "previous": "Siguiente",
  90. "next": "Anterior"
  91. }
  92. },
  93. "processing": true,
  94. "serverSide": true,
  95. "ajax": "ConsultarEvidencia.aspx.cs",
  96. "deferLoading": 57
  97.  
  98. });
  99. });
Add Comment
Please, Sign In to add comment