Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 6

<%@ Page Title="Production Report" Language="C#"

MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="ProductionReport.aspx.cs" Inherits="ProductionReport" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="Server">
<script type="text/javascript" src="assets/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.quicksearch.js"></script>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
</asp:ScriptManager>
<div class="panel-body">
<!-- Breadcrumb 3 -->
<ol class="breadcrumb bc-3">
<li><a href="Dashboard.aspx">Dashboard</a></li>
<li><a href="ProductionReport.aspx">Production</a></li>
</ol>
<h2>Production Report</h2>
</div>
<asp:HiddenField runat="server" ID="getGridData" />
<div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-primary" data-collapsed="0">
<div class="panel-heading">
<div class="panel-title">
Production Report
</div>
<div class="panel-options">
<a href="#sample-modal" data-toggle="modal" data-
target="" class="bg">
<i class="entypo-cog"></i></a>
<a href="#" data-rel="collapse"><i class="entypo-down-
open"></i></a>
<a href="#" data-rel="reload"><i class="entypo-arrows-
ccw"></i></a>
<a href="#" data-rel="close"><i class="entypo-
cancel"></i></a>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<label for="field-1" class="col-sm-4 control-
label">From and To Date</label>
<div class="col-sm-5">
<div class="input-group minimal">
<span class="input-group-addon"><i class="fa
fa-calendar"></i></span>
<asp:TextBox ID="txt_ProductionReport"
runat="server" class="form-control daterange add-ranges"
AutoComplete="off"></asp:TextBox>
</div>
</div>
<asp:RequiredFieldValidator ID="rfv_ProductionReport"
runat="server" ControlToValidate="txt_ProductionReport" ForeColor="Red"
Text="***"></asp:RequiredFieldValidator>
</div>
<br />
<div class="form-group">
<label for="field-1" runat="server" class="col-sm-4
control-label">
Project</label>
<div class=" col-sm-5">
<div class="input-group minimal">
<span class="input-group-addon"><i class="fa
fa-folder-open"></i></span>
<asp:DropDownList ID="ddl_Project"
CausesValidation="true" class="form-control" runat="server" AutoPostBack="true"
OnSelectedIndexChanged="ddl_Project_SelectedIndexChanged">
</asp:DropDownList>
<asp:HiddenField ID="hdn_ProjectID"
runat="server" />
</div>
</div>
</div>
<br />
<br />
<div class="form-group">
<label for="field-1" class="col-sm-4 control-label">
Employee Name
</label>
<div class=" col-sm-5">
<div class="input-group minimal">
<span class="input-group-addon"><i class="fa
fa-user"></i></span>
<asp:Label ID="lbl_CurrentEmployeeID"
Style="cursor: not-allowed;" class="form-control"
runat="server" AutoComplete="off"
ReadOnly />
<asp:DropDownList ID="ddl_EmployeeID"
Visible="true" CausesValidation="true" class="form-control"
runat="server" AutoPostBack="true"
OnSelectedIndexChanged="ddl_EmployeeID_SelectedIndexChanged">
</asp:DropDownList>
<asp:HiddenField ID="hdn_UserID" runat="server"
/>
</div>
</div>
</div>

<br />
<br />
<br />
<div class="form-group">
<div class="col-sm-offset-5 col-sm-4">
<div class="col-lg-4">
<asp:Button Text="Report" ID="btn_Report"
CssClass="btn btn-green" runat="server" OnClick="btn_Report_Click"/>
</div>
<div class="col-lg-4">
<asp:Button ID="btn_back" runat="server"
Text="Back" CssClass="btn btn-primary" OnClick="btn_back_Click"/>
</div>
<div class="col-lg-4">
<asp:Button Text="Clear" ID="btn_Clear"
CssClass="btn btn-gold" Visible="True" runat="server" OnClick="btn_Clear_Click" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<asp:Panel ID="pnl_grdreport" runat="server" Visible="false">
<div class="panel panel-primary" data-collapsed="0">
<div class="panel-heading">
<div class="panel-title">
Production Report Table
</div>
<div class="panel-options">
<a href="#sample-modal" data-toggle="modal" data-target=""
class="bg">
<i class="entypo-cog"></i></a>
<a href="#" data-rel="collapse"><i class="entypo-down-
open"></i></a>
<a href="#" data-rel="reload"><i class="entypo-arrows-
ccw"></i></a>
<a href="#" data-rel="close"><i class="entypo-cancel"></i></a>
</div>
</div>
<div class="panel-body">
<%--<div class="form-group">
<script type="text/javascript">
jQuery(document).ready(function ($) {
//data value, header column
var rawJSONStr = $('#<%=getGridData.ClientID
%>').val();
//console.log(rawJSONStr);
var conJSONS = JSON.parse(rawJSONStr);
//console.log(conJSONS);

for (var iElm = 0; iElm < conJSONS.length; iElm++) {


$("#userDetails").find('tbody').append('<tr><td>'
+ parseFloat(iElm + 1)
+ '</td><td>' + conJSONS[iElm].alloted_to
+ '</td><td>' + conJSONS[iElm].ProjectIDName
+ '</td><td>' + conJSONS[iElm].Date
+ '</td><td>' + conJSONS[iElm].task_name
+ '</td><td>' +
conJSONS[iElm].TaskcompletdPersentage
+ '</td><td>' + conJSONS[iElm].StartTime
+ '</td><td>' + conJSONS[iElm].EndTime
+ '</td><td>' + conJSONS[iElm].TotalBreakTime
+ '</td><td>' +
conJSONS[iElm].TotalProductiontime
+ '</td><td>' +
conJSONS[iElm].CompletedRemarks);
}
var $table3 = jQuery("#userDetails");

//var table3 = $table3.DataTable({


// "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50,
"All"]]
//});
var table3 = $table3.DataTable({
// dom: 'Bfrtip',
// buttons: [
//'copyHtml5',
//'excelHtml5',
//'pdfHtml5'
// ]
dom: 'Bfrtip',
buttons: [
'copy', 'excel', 'pdf', 'csv'
]

});

// Initalize Select Dropdown after DataTables is


created

$table3.closest('.dataTables_wrapper').find('select').select2({
minimumResultsForSearch: -1
});

// Setup - add a text input to each footer cell


$('#userDetails tfoot th').each(function () {
var title = $('#userDetails thead th').eq($
(this).index()).text();
$(this).html('<input type="text" class="form-
control" placeholder="Search ' + title + '" />');
});

// Apply the search


table3.columns().every(function () {
var that = this;

$('input', this.footer()).on('keyup change',


function () {
if (that.search() !== this.value) {
that
.search(this.value)
.draw();
}
});
});
});
</script>

<table class="table table-bordered datatable" id="userDetails">


<thead>
<tr class="replace-inputs">
<th class="center">SI.No.</th>
<th class="center">Employee_Name</th>
<th class="center">Project ID-Name</th>
<th class="center">Date</th>
<th class="center">Task Name</th>
<%-- <th class="center">Task Description</th>--%>
<%--<th class="center">Percentage</th>
<th class="center">Start Time</th>
<th class="center">End Time</th>
<th class="center">Break Time</th>
<th class="center">Time Taken</th>
<th class="center">Remarks</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<th class="center">SI.No.</th>
<th class="center">Employee_Name</th>
<th class="center">Project ID-Name</th>
<th class="center">Date</th>
<th class="center">Task Name</th>
<%-- <th class="center">Task Description</th>
<th class="center">Percentage</th>
<th class="center">Start Time</th>
<th class="center">End Time</th>
<th class="center">Break Time</th>
<th class="center">Time Taken</th>
<th class="center">Remarks</th>
</tr>
</tfoot>
</table>
</div>--%>

<asp:gridview id="grd_production_rpt" runat="server"


AutoGenerateColumns="false" class="table table-bordered datatable"
ShowHeaderWhenEmpty="true" HeaderStyle-Font-Bold="true">
<columns>
<asp:templatefield headertext="sno" ItemStyle-
HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-
Width="20px">
<itemtemplate>
<%#Container.DataItemIndex+ 1%>
</itemtemplate>
</asp:templatefield>
<asp:BoundField DataField="alloted_to"
HeaderText="Employee_Name" ItemStyle-HorizontalAlign="Center" HeaderStyle-
HorizontalAlign="Center" />
<asp:BoundField DataField="ProjectIDName"
HeaderText="Project ID-Name" ItemStyle-HorizontalAlign="Center" HeaderStyle-
HorizontalAlign="Center"/>
<asp:BoundField DataField="Date" HeaderText="Date"
ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"/>
<asp:BoundField DataField="task_name" HeaderText="Task
Name" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"/>
<asp:BoundField DataField="TaskcompletdPersentage"
HeaderText="Percentage" ItemStyle-HorizontalAlign="Center" HeaderStyle-
HorizontalAlign="Center"/>
<asp:BoundField DataField="StartTime" HeaderText="Start
Time" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"/>
<asp:BoundField DataField="EndTime" HeaderText="End Time"
ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"/>
<asp:BoundField DataField="TotalBreakTime"
HeaderText="Break Time" ItemStyle-HorizontalAlign="Center" HeaderStyle-
HorizontalAlign="Center"/>
<asp:BoundField DataField="TotalProductiontime"
HeaderText="Time Taken" ItemStyle-HorizontalAlign="Center" HeaderStyle-
HorizontalAlign="Center"/>
<asp:BoundField DataField="CompletedRemarks"
HeaderText="Remarks" ItemStyle-HorizontalAlign="Center" HeaderStyle-
HorizontalAlign="Center"/>
</columns>
</asp:gridview>
</div>

</div>
</asp:Panel>
<script type="text/javascript">
$(function () {
// Setup - add a text input to each footer cell
$("#ContentPlaceHolder1_grd_production_rpt").prepend($
("<thead></thead><tfoot></tfoot>").append($
("#ContentPlaceHolder1_grd_production_rpt").find("tr:first")));
$("#ContentPlaceHolder1_grd_production_rpt").DataTable({
dom: 'Bfrtip',
buttons: [
'copy','excel', 'pdf', 'print'
]
});
});
</script>
</asp:Content>

You might also like