Dear Sir,
Link button is not showing value in textbox1. please help
HTML
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" MaintainScrollPositionOnPostback="true"
AutoEventWireup="true" CodeFile="ServiceCashCollection.aspx.cs" Inherits="ServiceCashCollection" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
<title>Workshop Cash Collection Entry</title>
<%-- =================================== New ============================================= --%>
<link href="../Styles/DefineCss1.css" rel="stylesheet" />
<link href="../Style/GridViewStyleNew.css" rel="stylesheet" />
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script src="../js/jquery-1.7.2.min.js"></script>
<link type="text/css" href="../css/ui-lightness/jquery-ui-1.8.19.custom.css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery-ui-1.8.19.custom.min.js"></script>
<script src="../GridViewScrollBothSide/jquery-1.9.1.min.js"></script>
<script src="../GridViewScrollBothSide/JavaScript.js"></script>
<script src="../GridViewScrollBothSide/GridViewScrollBothSide.js"></script>
<%-- Start GridView Scroll --%>
<script type="text/javascript">
$(document).ready(function () {
$('.MyDataGridViewListOne').gridviewScroll({
width: 1090,
freezesize: 6, // Freeze Number of Columns.
height: 250,
headerrowcount: 1, //Freeze Number of Rows with Header.
arrowsize: 30,
varrowtopimg: "../GridViewScrollBothSide/ImageScroll/arrowvt.png",
varrowbottomimg: "../GridViewScrollBothSide/ImageScroll/arrowvb.png",
harrowleftimg: "../GridViewScrollBothSide/ImageScroll/arrowhl.png",
harrowrightimg: "../GridViewScrollBothSide/ImageScroll/arrowhr.png"
});
});
</script>
<script type="text/javascript">
$(document).ready(function () {
$('.MyDataGridViewListTwo').gridviewScroll({
width: 1090,
freezesize: 2, // Freeze Number of Columns.
height: 250,
headerrowcount: 1, //Freeze Number of Rows with Header.
arrowsize: 30,
varrowtopimg: "../GridViewScrollBothSide/ImageScroll/arrowvt.png",
varrowbottomimg: "../GridViewScrollBothSide/ImageScroll/arrowvb.png",
harrowleftimg: "../GridViewScrollBothSide/ImageScroll/arrowhl.png",
harrowrightimg: "../GridViewScrollBothSide/ImageScroll/arrowhr.png"
});
});
</script>
<script type="text/javascript">
$(document).ready(function () {
$('.MyDataGridViewListThree').gridviewScroll({
width: 1090,
freezesize: 6, // Freeze Number of Columns.
height: 250,
headerrowcount: 1, //Freeze Number of Rows with Header.
arrowsize: 30,
varrowtopimg: "../GridViewScrollBothSide/ImageScroll/arrowvt.png",
varrowbottomimg: "../GridViewScrollBothSide/ImageScroll/arrowvb.png",
harrowleftimg: "../GridViewScrollBothSide/ImageScroll/arrowhl.png",
harrowrightimg: "../GridViewScrollBothSide/ImageScroll/arrowhr.png"
});
});
</script>
<script type="text/javascript">
$(document).ready(function () {
$('.MyDataGridViewListFour').gridviewScroll({
width: 1090,
freezesize: 6, // Freeze Number of Columns.
height: 250,
headerrowcount: 1, //Freeze Number of Rows with Header.
arrowsize: 30,
varrowtopimg: "../GridViewScrollBothSide/ImageScroll/arrowvt.png",
varrowbottomimg: "../GridViewScrollBothSide/ImageScroll/arrowvb.png",
harrowleftimg: "../GridViewScrollBothSide/ImageScroll/arrowhl.png",
harrowrightimg: "../GridViewScrollBothSide/ImageScroll/arrowhr.png"
});
});
</script>
<%-- End GridView Scroll --%>
<%-- Start Date Picker --%>
<%--<script type="text/javascript">
$(function () {
var date = new Date();
debugger;
$("[id*=TxtLeaveDueDate]").datepicker({
showOn: 'button',
autoclose: true,
buttonImageOnly: true,
buttonImage: '../Calendar/calender.png',
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true,
readOnly: true,
minDate: "-15W",
maxDate: "+15W"
//minDate: new Date()
//yearRange: "-0:+0"
//buttonImage: 'images/calendar.png',
//yearRange: "-1:+0" // last one years
//yearRange: "-1:10" // last one years and next Ten Year
//yearRange: new Date().getFullYear().toString() + ':' + new Date().getFullYear().toString() // Only Current Year
//yearRange:'2021:' + new Date().getFullYear().toString()
});
});
</script>--%>
<%--<script type="text/javascript">
$(function () {
var date = new Date();
debugger;
$("[id*=TxtTravelDate]").datepicker({
showOn: 'button',
autoclose: true,
buttonImageOnly: true,
buttonImage: '../Calendar/calender.png',
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true,
readOnly: true,
minDate: "-15W"
//minDate: new Date()
//yearRange: "-0:+0"
//buttonImage: 'images/calendar.png',
//yearRange: "-1:+0" // last one years
//yearRange: "-1:10" // last one years and next Ten Year
//yearRange: new Date().getFullYear().toString() + ':' + new Date().getFullYear().toString() // Only Current Year
//yearRange:'2021:' + new Date().getFullYear().toString()
});
});
</script>--%>
<%--<script type="text/javascript">
$(function () {
var date = new Date();
debugger;
$("[id*=TxtReturnDate]").datepicker({
showOn: 'button',
autoclose: true,
buttonImageOnly: true,
buttonImage: '../Calendar/calender.png',
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true,
readOnly: true,
//minDate: new Date()
//yearRange: "-0:+0"
//buttonImage: 'images/calendar.png',
//yearRange: "-1:+0" // last one years
//yearRange: "-1:10" // last one years and next Ten Year
//yearRange: new Date().getFullYear().toString() + ':' + new Date().getFullYear().toString() // Only Current Year
//yearRange:'2021:' + new Date().getFullYear().toString()
});
});
</script>--%>
<%--<script type="text/javascript">
$(function () {
var date = new Date();
debugger;
$("[id*=TxtInvoiceDate]").datepicker({
showOn: 'button',
autoclose: true,
buttonImageOnly: true,
buttonImage: '../Calendar/calender.png',
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true,
readOnly: true,
yearRange: "-1:+0" // last one years
//minDate: new Date()
//yearRange: "-0:+0"
//buttonImage: 'images/calendar.png',
//yearRange: "-1:+0" // last one years
//yearRange: "-1:10" // last one years and next Ten Year
//yearRange: new Date().getFullYear().toString() + ':' + new Date().getFullYear().toString() // Only Current Year
//yearRange:'2021:' + new Date().getFullYear().toString()
});
});
</script>--%>
<%--<script type="text/javascript">
$(function () {
var date = new Date();
debugger;
$("[id*=TxtTravelDateTo]").datepicker({
showOn: 'button',
buttonImageOnly: true,
buttonImage: '../images/calendar.png',
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true,
readOnly: true,
minDate: new Date(),
maxDate: "+16W"
//yearRange: "-1:+1"
//buttonImage: 'images/calendar.png',
//yearRange: "-1:+0" // last one years
//yearRange: "-1:10" // last one years and next Ten Year
//yearRange: new Date().getFullYear().toString() + ':' + new Date().getFullYear().toString() // Only Current Year
//yearRange:'2021:' + new Date().getFullYear().toString()
});
});
</script>--%>
<%-- <script type="text/javascript">
$(function () {
debugger;
$("[id*=TxtVoucherDate]").datepicker({
showOn: 'button',
buttonImageOnly: true,
buttonImage: '../images/calendar.png',
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true,
readOnly: true,
yearRange: "-1:+0"
//buttonImage: 'images/calendar.png',
//yearRange: "-1:+0" // last one years
//yearRange: "-1:10" // last one years and next Ten Year
//yearRange: new Date().getFullYear().toString() + ':' + new Date().getFullYear().toString() // Only Current Year
//yearRange:'2021:' + new Date().getFullYear().toString()
});
});
</script>--%>
<%-- <script type="text/javascript">
$(function () {
debugger;
$("[id*=TxtInvoiceDate]").datepicker({
showOn: 'button',
buttonImageOnly: true,
buttonImage: '../images/calendar.png',
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true,
readOnly: true,
minDate: "-10W"
//yearRange: "-1:+0"
//buttonImage: 'images/calendar.png',
//yearRange: "-1:+0" // last one years
//yearRange: "-1:10" // last one years and next Ten Year
//yearRange: new Date().getFullYear().toString() + ':' + new Date().getFullYear().toString() // Only Current Year
//yearRange:'2021:' + new Date().getFullYear().toString()
});
});
</script>--%>
<%-- End Date Picker --%>
<%-- Start Confirm (Yes/No) --%>
<script type="text/javascript">
function ConfirmOne(sender) {
//var selectedText = $(sender).find("option:selected").text();
if (confirm("Do you want to process ?")) {
$("#HfResponseOne").val('Yes');
}
else {
$("#HfResponseOne").val('No');
}
}
function ConfirmTwo(sender) {
if (confirm("Do you want to process ?")) {
$("#HfResponseTwo").val('Yes');
}
else {
$("#HfResponseTwo").val('No');
}
}
function ConfirmThree(sender) {
if (confirm("Do you want to process ?")) {
$("#HfResponseThree").val('Yes');
}
else {
$("#HfResponseThree").val('No');
}
}
function ConfirmFour(sender) {
if (confirm("Do you want to process ?")) {
$("#HfResponseFour").val('Yes');
}
else {
$("#HfResponseFour").val('No');
}
}
</script>
<%-- End Confirm (Yes/No) --%>
<%-- Start Preview Pdf Image Working --%>
<script type="text/javascript">
function PreviewPdfFile1() {
pdffile = document.getElementById("UploadPdfFile1").files[0];
pdffile_url = URL.createObjectURL(pdffile);
$('#ViewerFile1').attr('src', pdffile_url);
}
</script>
<%-- End Preview Pdf Image Working --%>
<%-- start input file validation --%>
<script>
function fileValidation() {
var fileInput =
document.getElementById('UploadPdfFile1');
var filePath = fileInput.value;
// Allowing file type
var allowedExtensions =
/(\.PDF|\.pdf)$/i;
///(\.jpg|\.jpeg|\.png|\.gif)$/i;
if (!allowedExtensions.exec(filePath)) {
alert('Invalid file type');
fileInput.value = '';
return false;
}
else {
//// Image preview
//if (fileInput.files && fileInput.files[0]) {
// var reader = new FileReader();
// reader.onload = function (e) {
// document.getElementById(
// 'imagePreview').innerHTML =
// '<img src="' + e.target.result
// + '"/>';
// };
// reader.readAsDataURL(fileInput.files[0]);
}
}
</script>
<%-- End Input file validation --%>
<%-- Start Separate Loader Start --%>
<script type="text/javascript">
function showLoader1() {
document.getElementById("loader1").style.display = 'block';
}
function showLoader2() {
document.getElementById("loader2").style.display = 'block';
}
function showLoader3() {
document.getElementById("loader3").style.display = 'block';
}
function showLoader4() {
document.getElementById("loader4").style.display = 'block';
}
</script>
<%-- End Loader End --%>
<%-- Start Disable Right Click --%>
<script>
document.addEventListener("contextmenu", function (event) {
event.preventDefault();
alert('Right Click is Disabled');
}, false);
</script>
<%-- End Disable Right Click --%>
<%-- Start Disable back button in browser --%>
<script type="text/javascript">
function DisableBackButton() {
window.history.forward()
}
DisableBackButton();
window.onload = DisableBackButton;
window.onpageshow = function (evt) { if (evt.persisted) DisableBackButton() }
window.onunload = function () { void (0) }
</script>
<%-- End Disable back button in browser --%>
<%-- Start Style --%>
<style type="text/css">
table { border: 1px solid #ccc; border-collapse: collapse; }
table th { background-color: #ccc; color: #333; font-weight: bold; }
table th, table td { padding: 5px; border: 1px solid #ccc; }
.MyDataGridViewListOne { align-items: baseline; margin-left: auto; margin-right: auto; }
.MyDataGridViewListOne td { padding: 5px; }
.MyDataGridViewListOne th { padding: 5px; font-family: Arial; font-size: 12px; background-color: #fb8b03; }
.MyDataGridViewListTwo { align-items: baseline; margin-left: auto; margin-right: auto; }
.MyDataGridViewListTwo td { padding: 5px; }
.MyDataGridViewListTwo th { padding: 5px; font-family: Arial; font-size: 12px; background-color: #f4f909; }
.MyDataGridViewListThree { align-items: baseline; margin-left: auto; margin-right: auto; }
.MyDataGridViewListThree td { padding: 5px; }
.MyDataGridViewListThree th { padding: 5px; font-family: Arial; font-size: 12px; background-color: #fbc406; }
.MyDataGridViewListFour { align-items: baseline; margin-left: auto; margin-right: auto; }
.MyDataGridViewListFour td { padding: 5px; }
.MyDataGridViewListFour th { padding: 5px; font-family: Arial; font-size: 12px; background-color: #fa06c3; }
.ComboBoxStyle .ajax__combobox_itemlist li { background-color: DarkGreen; border: 1px solid YellowGreen; color: White; font-size: medium; font-family: Arial; font-size: 12px; padding-bottom: 5px; }
.bg_Entry_Color1 { background-color: #f0f5f5; }
.bg_Entry_Color2 { background-color: #e9e4f0; }
.bg_Entry_Color3 { background-color: #e3f5ec; }
.bg_Entry_Color4 { background-color: #E6E6FA; }
.bg_Entry_Color5 { background-color: #fbf8da; }
.bg_Entry_Color6 { background-color: #FFF0F5; }
.bg_Entry_Color7 { background-color: #F5F5F5; }
</style>
<%-- End Style --%>
<%-- =================================== New ============================================= --%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<%-- Start Heading --%>
<div class="container mb-0 mt-0">
<div class="row g-0 " style="background-image: linear-gradient(to right, lightblue ,lightgreen);">
<div class="col col-12 fs-3 text-center">
<asp:Label ID="Label1" runat="server" Text="Cash Collection - Service"></asp:Label>
</div>
</div>
</div>
<%-- End Heading --%>
<%-- Start Option --%>
<div class=" container mb-0 mt-0 ">
<asp:Panel ID="PnlOption" runat="server">
<div class="row g-0 text-center bg-primary">
<asp:Label ID="Label22" CssClass=" text-white fs-5 " runat="server" Text="Option Selection"></asp:Label>
</div>
<div class="row g-0">
<div class=" col-3 p-1 text-start border border-1">
<asp:Label ID="Label3" runat="server" Text="Standard Currency"></asp:Label>
</div>
<div class=" col-9 text-start border border-1 ">
<asp:Label ID="LblStdCurrencyName" runat="server" Text="" CssClass="text-danger"></asp:Label>
</div>
</div>
<div class="row g-0">
<div class=" col-3 p-1 text-start border border-1">
<asp:Label ID="Label26" runat="server" Text="Currency"></asp:Label>
</div>
<div class=" col-9 text-start border border-1 ">
<asp:DropDownList ID="DdlCurrency" CssClass="form-select text-start w-75 mydropdownlist"
AutoPostBack="true" runat="server" OnSelectedIndexChanged="DdlCurrency_SelectedIndexChanged">
</asp:DropDownList>
</div>
</div>
<div class="row g-0 ">
<div class=" col-3 p-1 text-start border border-1 ">
<asp:Label ID="Label5" runat="server" Text="Exchange Rate"></asp:Label>
</div>
<div class=" col-9 p-1 text-start Fs-14-User border border-1">
<asp:TextBox ID="TxtExchnageRate" CssClass="w-75 text-uppercase " runat="server"
AutoCompleteType="Disabled" ReadOnly="true" Enabled="false"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Required"
ForeColor="Red" Font-Size="7" SetFocusOnError="True" Display="Dynamic" ControlToValidate="TxtExchnageRate"
ValidationGroup="Save"></asp:RequiredFieldValidator>
</div>
</div>
<div class="row g-0">
<div class=" col-3 p-1 text-start border border-1">
<asp:Label ID="Label2" runat="server" Text="Invoice Category"></asp:Label>
</div>
<div class=" col-9 text-start border border-1 ">
<asp:DropDownList ID="DdlInvoiceCategory" CssClass="form-select text-start w-75 mydropdownlist"
AutoPostBack="true" runat="server" OnSelectedIndexChanged="DdlInvoiceCategory_SelectedIndexChanged">
<asp:ListItem>SELECT</asp:ListItem>
<asp:ListItem>WORKSHOP</asp:ListItem>
<asp:ListItem>COUNTER SALE</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</asp:Panel>
</div>
<%-- End Option --%>
<%-- Start Search Invoice --%>
<div class="container mb-0">
<asp:Panel ID="PnlSearch" runat="server">
<div class="row g-0 " style="background-image: linear-gradient(to right, #e6d2fa ,#e6d2fa);">
<div class="col col-1 text-center fs-5 ">
<asp:RadioButton ID="RbtnInvoice" CssClass=" btn-outline-primary Rbtn-Hover-user"
GroupName="Invoice" runat="server" Text="Invoice" OnCheckedChanged="RbtnInvoice_CheckedChanged" />
</div>
<div class="col col-2 text-center fs-5 ">
<asp:RadioButton ID="RbtnJobOrder" CssClass=" btn-outline-primary Rbtn-Hover-user "
GroupName="Invoice" runat="server" Text="Job Order" OnCheckedChanged="RbtnJobOrder_CheckedChanged" />
</div>
<div class="col col-2 text-center fs-5 ">
<asp:RadioButton ID="RbtnVehicle" CssClass=" btn-outline-primary Rbtn-Hover-user "
GroupName="Invoice" runat="server" Text="Vehicle No" OnCheckedChanged="RbtnVehicle_CheckedChanged" />
</div>
<div class="col-7 d-flex justify-content-center">
<asp:TextBox ID="TxtSearchValue" placeholder="Search Value" CssClass="form-control text-uppercase w-100 "
runat="server" AutoCompleteType="Disabled"></asp:TextBox>
<div class="h-10 align-items-center justify-content-center">
<div style="background: lightgray">
<img id="loader1" style="display: none;" src="https://www.aspsnippets.com/demos/loader.gif"
alt="" />
</div>
</div>
<asp:Button ID="BtnSearchBank" CssClass="btn btn-primary btn-outline-dark rounded-pill"
OnClientClick="showLoader1();" runat="server" Text="Search Value" OnClick="BtnSearchBank_Click" />
</div>
</div>
</asp:Panel>
</div>
<%-- End Search Invoice --%>
<%-- Start Invoice List --%>
<div class="container mb-0 mt-0 ">
<asp:Panel ID="PnlInvoiceList" runat="server">
<div class="row g-0 pt-0 " style="">
<div class="col col-12 justify-content-center">
<asp:GridView ID="GVInvoiceList" Font-Size="10px" runat="server" Style="width: 80%;
align-items: center; border-collapse: collapse;" AutoGenerateColumns="false"
CssClass="MyDataGridViewListOne" EmptyDataText="No Record Found" EmptyDataRowStyle-ForeColor="Red"
EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-BorderStyle="None" HorizontalAlign="Left"
AllowSorting="true" OnSorting="OnSorting">
<RowStyle CssClass="rows"></RowStyle>
<Columns>
<asp:TemplateField HeaderText="Sr.No" ItemStyle-Width="30" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblRowNumber" Text='<%# Container.DataItemIndex + 1 %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Select" ItemStyle-Width="60px">
<ItemTemplate>
<asp:LinkButton ID="LnkSelectInvoice" runat="server" Text="Select" OnClick="ViewInvoiceDetail" ForeColor="Blue" Font-Size="14px" Font-Bold="true"
CommandArgument='<%# Eval("InvoiceDetail") %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Select" ItemStyle-Width="60px">
<ItemTemplate>
<asp:LinkButton ID="LnkSelectInvoice" runat="server" Text="Select" CausesValidation="false"
OnClick="ViewInvoiceDetail" ForeColor="Blue" Font-Size="14px" Font-Bold="true"
CommandArgument='<%# Eval("InvoiceDetail") + ";" + Eval("RegNo") + ";" + Eval("CustomerCode") + ";" + Eval("ModelCode") + ";" + Eval("JobNoDetail") %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="InvoiceDate" HeaderText="Invoice Date" SortExpression="InvoiceDate"
ItemStyle-Wrap="False" DataFormatString="{0:dd-MMM-yyyy}"></asp:BoundField>
<asp:BoundField DataField="InvoiceDetail" HeaderText="Invoice No" SortExpression="InvoiceDetail"
ItemStyle-Wrap="False"></asp:BoundField>
<asp:BoundField DataField="JobNoDetail" HeaderText="Job/Enquiry No" SortExpression="JobNoDetail"
ItemStyle-Wrap="False"></asp:BoundField>
<asp:BoundField DataField="NetAmount" HeaderText="NetAmount" DataFormatString="{0:N2}"
ItemStyle-Wrap="False"></asp:BoundField>
<asp:BoundField DataField="Paid" HeaderText="Paid" DataFormatString="{0:N2}" ItemStyle-Wrap="False">
</asp:BoundField>
<asp:BoundField DataField="Balance" HeaderText="Balance" DataFormatString="{0:N2}"
ItemStyle-Wrap="False"></asp:BoundField>
<asp:BoundField DataField="RegNo" HeaderText="Vehicle No" SortExpression="RegNo"
ItemStyle-Wrap="False"></asp:BoundField>
<asp:BoundField DataField="CustomerName" HeaderText="Customer" SortExpression="CustomerName"
ItemStyle-Wrap="False"></asp:BoundField>
<asp:BoundField DataField="BrandName" HeaderText="Make" SortExpression="BrandName"
ItemStyle-Wrap="False"></asp:BoundField>
<asp:BoundField DataField="ModelName" HeaderText="Model" SortExpression="ModelName"
ItemStyle-Wrap="False"></asp:BoundField>
<%-- SELECT CONVERT(nvarchar(max), I.InvoiceDate, 103) As ,
I.InvoiceDetail, ISNULL(I.JobNoDetail,'NA') AS JobNoDetail,
ISNULL(I.NetAmount,0) As NetAmount, ISNULL(I.Paid,0) As Paid,
ISNULL(I.CreditNoteAmount,0) As CreditNote, ISNULL(I.DebitNoteAmount,0) As DebitNote,
ISNULL(I.Balance,0) As Balance,
(select iif(c.Title='NA',c.CustomerName,(C.Title+' ' +c.CustomerName) ) from Customer as C where c.CustomerCode=i.CustomerCode ) as CustomerName,
I.CustomerCode,
ISNULL(J.RegNo,'NA') AS RegNo, ISNULL(J.ChassisNo,'NA') AS ChassisNo, ISNULL(B.BrandName,'NA') AS BrandName,
ISNULL(J.BrandCode, 0) AS BrandCode, ISNULL(J.ModelName,'NA') AS ModelName, ISNULL(J.ModelCode, 0) AS ModelCode,
I.InvoiceCurrency --%>
<%-- <asp:BoundField DataField="StaffDoj" HeaderText="Doj" ItemStyle-Wrap="False" DataFormatString="{0:dd-MMM-yyyy}" ></asp:BoundField>
<asp:BoundField DataField="StaffMaritalStatus" HeaderText="Marital Status" ItemStyle-Wrap="False" ></asp:BoundField>
<asp:BoundField DataField="ActiveStatus" HeaderText="Active" ItemStyle-Wrap="False" ></asp:BoundField>--%>
<%-- <asp:TemplateField HeaderText="Image">
<ItemTemplate>
<asp:Image ID="Image1" runat="server" Height="15px" Width="15px" AlternateText="No Image" ImageUrl='<%# "CerpacPurchaseImageHandler.ashx?ImID="+ Eval("SrNo") %>' />
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</div>
</div>
<br />
<br />
</asp:Panel>
</div>
<%-- End Invoice List --%>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<%-- Start User Information --%>
<div class="container">
<div class="row g-0 mb-0 " style="background-color: darkkhaki">
<div class="col col-3 text-start border border-dark">
<asp:Label ID="Label38" runat="server" Text="User Name"></asp:Label>
</div>
<div class="col col-9 text-start border border-dark">
<asp:TextBox ID="TxtUserName" ReadOnly="true" CssClass="w-100 h-auto text-uppercase"
runat="server" AutoCompleteType="Disabled"></asp:TextBox>
</div>
<div class="col col-3 text-start border border-dark">
<asp:Label ID="Label39" runat="server" Text="User Id"></asp:Label>
</div>
<div class="col col-9 text-start border border-dark">
<asp:TextBox ID="TxtUserId" ReadOnly="true" CssClass="w-100 h-auto text-uppercase"
runat="server" AutoCompleteType="Disabled"></asp:TextBox>
</div>
<div class="col col-3 text-start border border-dark">
<asp:Label ID="Label41" runat="server" Text="User Email Id"></asp:Label>
</div>
<div class="col col-9 text-start border border-dark">
<asp:TextBox ID="TxtUserEmailId" ReadOnly="true" CssClass=" w-100 h-auto text-uppercase"
runat="server" AutoCompleteType="Disabled"></asp:TextBox>
</div>
</div>
</div>
<%-- End User Information --%>
</asp:Content>
Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.Net.Mail;
using System.Configuration;
using System.Net.Configuration;
using System.Net.Sockets;
using System.Net.Security;
using System.Data;
using System.Data.SqlClient;
using System.Threading.Tasks;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Globalization;
using System.IO;
using System.Drawing;
using iTextSharp.text;
using iTextSharp.text.html.simpleparser;
using iTextSharp.text.pdf;
public partial class ServiceCashCollection : System.Web.UI.Page
{
SqlConnection SqlCn;
SqlCommand SqlCm;
SqlDataReader SqlDr;
SqlDataAdapter SqlDa;
DataTable SqlDt;
ConnectionState ConState;
static string SqlQry;
static string ConPath;
// End Sql connection
static string LoginName;
static string LoginPassword;
static int LoginId;
static string LoginEmailId;
static string LoginEmailIdPassword;
static string LoginPhoneNo;
static string LoginRole;
static int FormNoFormAcess;
static int ModuleNoFormAccess;
static int LoginIdFormAccess;
// End Login
static int MainCompanyCode;
static string MainCompanyName;
static string MainCompanyNick;
static string MainCompanyType;
static string CompanyActiveStatus;
static string StdDatabaseName;
static string FullCompanyName;
static string SalesCurrencyName;
static string SalesCurrencyNameSecond;
static string ServiceCurrencyName;
static string ServiceCurrencyNameSecond;
static string CountryNameShort;
static string CountryNameFull;
static string CountryPhoneStd;
static string LessPaymentLimit;
static string CompanyTinNo;
static string CompanyRcNo;
static string CostingMethod;
// End Company Detail
static int MainBranchCode;
static string MainBranchName;
static string MainBranchPhoneNo;
static string Tax1Name;
static string Tax2Name;
static string Tax3Name;
static string TaxStandard;
static double Tax1PerSales;
static double Tax2PerSales;
static double Tax3PerSales;
static double Tax1PerService;
static double Tax2PerService;
static double Tax3PerService;
static double Tax1PerParts;
static double Tax2PerParts;
static double Tax3PerParts;
static double MaximumDiscountPercent;
static double SubletPercent;
static string Regional;
static string BranchAddress1;
static string BranchAddress2;
static string SalesCallType;
static string BranchValid;
static string MainBranchNick;
static string MainLocation;
static string DiscountPosition;
// End Branch Detail
static int CustomerCode;
static string CustomerName;
static string CustomerCodeDuplicate;
static string CustomerTitle;
static string CustomerIdentity;
static string CustomerContactPersonName;
static string CustomerContactPersonDesignation;
static string CustomerContactPersonPhoneNo;
static string CustomerFirstName;
static string CustomerMiddleName;
static string CustomerLastName;
static string CustomerType;
static string CustomerGroup;
static string CustomerGender;
static string CustomerDOB;
static string CustomerDOM;
static string CustomerAddress1;
static string CustomerAddress2;
static string CustomerCityCode;
static string CustomerZipCode;
static string CustomerPBNo;
static string CustomerStateCode;
static string CustomerCountryCode;
static string CustomerCountryName;
static string CustomerPhoneNo;
static string CustomerMobileNo;
static string CustomerEmailId;
static string CustomerActiveStatus;
static string CustomerCreditLimitStatus;
static string CustomerTaxCategory;
static string CustomerTaxID;
static string CustomerVatNo;
static string CustomerTinNo;
static Boolean CustomerFound;
// End Customer Vaiable
static string ContactPersonNameShip;
static string ContactPersonDesignationShip;
static string Address1Ship;
static string Address2Ship;
static string CityCodeShip;
static string PBNoShip;
static string GenderShip;
static string StateCodeShip;
static string MobileNoShip;
static string EmailIdShip;
static string AddressType;
// End Customer Address Vaiable
static string CurrencyNameForExchangeRate = "";
static string CurrencyType = "";
static int CurrencyCalculation = 0;
static double ExchangeRate = 0;
// End Currency
static Boolean TransactionStatus;
static string TodayDate;
static string SearchParameterString;
static int CheckedCounter;
static int LastNo;
static int TotalRowCount;
static int TotalColCount;
static string InvoiceCategory;
static string SearchMode;
static string MessageTitle;
// End Other Vaiable
static string SwalMessage;
static string SwalTitle;
static string SwalMessageType;
static string SwalServerError;
static string MessangeTitle;
// End SWAL Message
protected void Page_Load(object sender, EventArgs e)
{
ClearGridView(PnlInvoiceList);
this.Form.Enctype = "multipart/form-data";
if (Session["LoginId".Trim()] == null || Session["MainBranchCode".Trim()] == null)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "alert",
"swal('Information!', 'Session expired', 'info')", true);
Response.Redirect("https://stallionautoghana.com/LoginPage.aspx");
return;
}
else
{
if (!IsPostBack)
{
//PnlBankDetail.Visible = false;
//PnlAccountEntry.Visible = false;
//PnlSaveEntry.Visible = false;
//ClearText(PnlBankDetail);
//ClearText(PnlAccountEntry);
//ClearGridView(PnlBankAccountList);
ClearRbtn(PnlSearch);
ClearDdl(PnlOption);
DdlCurrency.SelectedIndex = 1;
DdlInvoiceCategory.SelectedIndex = 0;
GetSessionDetail();
this.GetSqlServerDate();
DateTime date = DateTime.ParseExact(TodayDate, "dd-MM-yyyy", null);
TransactionStatus = false;
this.FormAccessValidity();
if (TransactionStatus == true)
{
InvoiceCategory = "NOInvoiceCategory";
SearchMode = "NOSearchMode";
LoadCurrencyList();
LblStdCurrencyName.Text = ServiceCurrencyName;
}
else
{
MessageTitle = "Page Access Denied ";
ShowMsgAndRedirectHomePage();
}
}
// End Post Back
}
// End Session
}
// End Page Load
// ======================================== Start Common Function =====================
protected void GetSessionDetail()
{
LoginRole = (string)Session["LoginRole"];
LoginName = (string)Session["LoginName"];
LoginId = (int)Session["LoginId"];
LoginEmailId = (string)Session["LoginEmailId"];
LoginPhoneNo = (string)Session["LoginPhoneNo"];
MainCompanyCode = (int)Session["MainCompanyCode"];
MainCompanyName = (string)Session["MainCompanyName"];
MainCompanyCode = (int)Session["MainCompanyCode"];
MainCompanyName = (string)Session["MainCompanyName"];
MainCompanyNick = (string)Session["MainCompanyNick"];
MainCompanyType = (string)Session["MainCompanyType"];
CompanyActiveStatus = (string)Session["CompanyActiveStatus"];
StdDatabaseName = (string)Session["StdDatabaseName"];
FullCompanyName = (string)Session["FullCompanyName"];
SalesCurrencyName = (string)Session["SalesCurrencyName"];
SalesCurrencyNameSecond = (string)Session["SalesCurrencyNameSecond"];
ServiceCurrencyName = (string)Session["ServiceCurrencyName"];
ServiceCurrencyNameSecond = (string)Session["ServiceCurrencyNameSecond"];
CountryNameShort = (string)Session["CountryNameShort"];
CountryNameFull = (string)Session["CountryNameFull"];
CountryPhoneStd = (string)Session["CountryPhoneStd"];
LessPaymentLimit = (string)Session["LessPaymentLimit"];
CompanyTinNo = (string)Session["CompanyTinNo"];
CompanyRcNo = (string)Session["CompanyRcNo"];
CostingMethod = (string)Session["CostingMethod"];
// End Company Detail
MainBranchCode = (int)Session["MainBranchCode"];
MainBranchName = (string)Session["MainBranchName"];
MainBranchPhoneNo = (string)Session["MainBranchPhoneNo"];
Tax1Name = (string)Session["Tax1Name"];
Tax2Name = (string)Session["Tax2Name"];
Tax3Name = (string)Session["Tax3Name"];
TaxStandard = (string)Session["TaxStandard"];
Tax1PerSales = (double)Session["Tax1PerSales"];
Tax2PerSales = (double)Session["Tax2PerSales"];
Tax3PerSales = (double)Session["Tax3PerSales"];
Tax1PerService = (double)Session["Tax1PerService"];
Tax2PerService = (double)Session["Tax2PerService"];
Tax3PerService = (double)Session["Tax3PerService"];
Tax1PerParts = (double)Session["Tax1PerParts"];
Tax2PerParts = (double)Session["Tax2PerParts"];
Tax3PerParts = (double)Session["Tax3PerParts"];
MaximumDiscountPercent = (double)Session["MaximumDiscountPercent"];
SubletPercent = (double)Session["SubletPercent"];
Regional = (string)Session["Regional"];
BranchAddress1 = (string)Session["BranchAddress1"];
BranchAddress2 = (string)Session["BranchAddress2"];
SalesCallType = (string)Session["SalesCallType"];
BranchValid = (string)Session["BranchValid"];
MainBranchNick = (string)Session["MainBranchNick"];
MainLocation = (string)Session["MainLocation"];
DiscountPosition = (string)Session["DiscountPosition"];
// End Branch Detail
UserDetail();
}
// End Session Variavle
protected void UserDetail()
{
LoginRole = (string)Session["LoginRole"];
LoginName = (string)Session["LoginName"];
LoginId = (int)Session["LoginId"];
LoginEmailId = (string)Session["LoginEmailId"];
LoginPhoneNo = (string)Session["LoginPhoneNo"];
TxtUserName.Text = LoginName;
TxtUserEmailId.Text = LoginEmailId;
TxtUserId.Text = LoginId.ToString();
}
// End User Details
protected void Page_Init(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
Response.Cache.SetNoStore();
}
// Stop prevent Back button browser
// Start Show Message and redirect to home page
protected void ShowMsgAndRedirectHomePage()
{
string message = MessageTitle + " You will redirect to home page ";
string url = "Home.aspx";
string script = "window.onload = function(){ alert('";
script += message;
script += "');";
script += "window.location = '";
script += url;
script += "'; }";
ClientScript.RegisterStartupScript(this.GetType(), "Redirect", script, true);
}
// End Show Message and redirect to home page
// start message script
protected void MessageScript()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("<script type = 'text/javascript'>");
sb.Append("window.onload=function(){");
sb.Append("alert('");
sb.Append(MessageTitle);
sb.Append("')};");
sb.Append("</script>");
ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", sb.ToString());
}
// End Message Script
// Start Script With Update Panel
protected void MessageScriptWithUpdatePanel()
{
// With Panel Update
ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "alert('" + MessageTitle + "');window.location='';", true);
}
// End Script With Update Panel
// Start Get Sql Server Date
protected void GetSqlServerDate()
{
MainClass ClassOject = new MainClass(); // Create Class Object
MainClass.TodateDateClass = ClassOject.GetServerDate(); // Pass Variable into class function
TodayDate = MainClass.TodateDateClass; // Define Class variable Value into Local Variable
}
// End Sql Server Date
// Start Form Access
protected void FormAccessValidity()
{
ModuleNoFormAccess = 40;
FormNoFormAcess = 401030;
LoginIdFormAccess = int.Parse(LoginId.ToString());
TransactionStatus = false; // Local Vaiable
MainClass ClassOject = new MainClass(); // Create Class Object
MainClass.TransactionStatusClass = ClassOject.AccessFormClass(LoginIdFormAccess, FormNoFormAcess, ModuleNoFormAccess); // Pass Variable into class function
TransactionStatus = MainClass.TransactionStatusClass; // Define Class variable Value into Local Variable
}
// End Form Access
// Start connection string
protected void ConnectionStringFunction()
{
// Start Connection String From Class
MainClass ClassObj = new MainClass(); // Class Object
//<Class> <ObjectName>= new <ClassFileName>;
MainClass.ConPathClass = ClassObj.GetConnectionForClass(); //Connection path from Class
//Define Function Return Value
//<ClassName>.<Variable>=<ClassObject>.<FunctionName()>;
MainClass.ConPathClass = MainClass.ConPathClass.ToString();
ConPath = MainClass.ConPathClass.ToString();
//End Connection String From Class
try
{
SqlCn = new SqlConnection(ConPath);
SqlCn.Open();
ConState = SqlCn.State;
SqlCn.Close();
if (ConState == ConnectionState.Closed || ConState == ConnectionState.Broken)
{
TransactionStatus = false;
}
else
{
TransactionStatus = true;
}
}
// End Try
catch (Exception ex)
{
TransactionStatus = false;
MessageTitle = "Data Base Connection Error " + ex.ToString();
}
finally
{
SqlCn.Close();
}
}
//End Connection String From Class
public void SwalErrorMessageDisplay()
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "alert",
"swal('" + SwalTitle + "','" + SwalMessage + "', '" + SwalMessageType + "' )", true);
}
// End Swal Message
private void ClearText(Panel PnlId)
{
foreach (Control c in PnlId.Controls)
{
if (c is TextBox)
{
TextBox AllItem = c as TextBox;
if (AllItem != null)
{
AllItem.Text = "";
}
}
}
}
// End clear all text box
private void ClearGridView(Panel PnlId)
{
foreach (Control c in PnlId.Controls)
{
if (c is GridView)
{
GridView AllItem = c as GridView;
if (AllItem != null)
{
AllItem.DataSource = null;
AllItem.DataBind();
}
}
}
}
// End clear all GridView
private void ClearDdl(Panel PnlId)
{
foreach (Control c in PnlId.Controls)
{
if (c is DropDownList)
{
DropDownList AllItem = c as DropDownList;
if (AllItem.SelectedIndex != 0)
{
AllItem.SelectedIndex = 0;
}
}
}
}
//// End clear all DDL
private void ClearRbtn(Panel PnlId)
{
foreach (Control c in PnlId.Controls)
{
if (c is RadioButton)
{
RadioButton AllItem = c as RadioButton;
if (AllItem.Checked == true)
{
AllItem.Checked = false;
}
}
}
}
//// End clear all DDL
private string SortDirection
{
get { return ViewState["SortDirection"] != null ? ViewState["SortDirection"].ToString() : "ASC"; }
set { ViewState["SortDirection"] = value; }
}
//==================================== End Common Function -1 ==============================================//
protected void OnSorting(object sender, GridViewSortEventArgs e)
{
//this.LoadBankList(e.SortExpression);
}
// End Sort functions
protected void OnSortingBankAccount(object sender, GridViewSortEventArgs e)
{
//this.LoadCashierBalance(e.SortExpression);
}
//==================================== End Sort Function ==================================================//
protected void LoadCurrencyList()
{
DdlCurrency.Items.Clear();
DdlCurrency.DataSource = null;
DdlCurrency.DataBind();
try
{
ConnectionStringFunction(); // Function Call
SqlCn = new SqlConnection(ConPath);
SqlCn.Open();
SqlQry = "SELECT CurrencyName,CurrencyType,CurrencyCalculation from CurrencyList Where ActiveStatus='Y' Order By Currencycode ";
SqlCm = new SqlCommand(SqlQry, SqlCn);
SqlCm.CommandType = CommandType.Text;
DdlCurrency.DataSource = SqlCm.ExecuteReader();
DdlCurrency.DataTextField = "CurrencyName";
DdlCurrency.DataValueField = "CurrencyName";
DdlCurrency.DataBind();
DdlCurrency.Items.Insert(0, "SELECT");
DdlCurrency.SelectedIndex = -1;
TransactionStatus = true;
}
// End Try
catch (Exception ex)
{
MessageTitle = " Error Get Currency List " + ex.ToString();
//MessageScript();
MessageScriptWithUpdatePanel();
return;
}
// Catch
finally
{
SqlCn.Close();
}
// End Finally
}
// Load Currency
protected void DdlCurrency_SelectedIndexChanged(object sender, EventArgs e)
{
if (DdlCurrency.SelectedIndex <= 0)
{
TxtExchnageRate.Text = "0";
}
else
{
ClearRbtn(PnlSearch);
ClearText(PnlSearch);
CurrencyNameForExchangeRate = DdlCurrency.SelectedValue;
GetExchangeRate();
}
}
// End Selection currency
protected void GetExchangeRate()
{
if (DdlCurrency.SelectedIndex <= 0)
{
ExchangeRate = 0;
}
else
{
CurrencyNameForExchangeRate = DdlCurrency.SelectedValue;
if (CurrencyNameForExchangeRate == ServiceCurrencyName)
{
ExchangeRate = 1;
}
else
{
MainClass ClassObjExchangeRate = new MainClass();
MainClass.TransactionStatusClass = ClassObjExchangeRate.GetExchangeRateFromClass(CurrencyNameForExchangeRate);
ExchangeRate = MainClass.CurrencyExchangeRateClass;
}
}
TxtExchnageRate.Text = ExchangeRate.ToString("#,##0.00");
}
// End Exchange Rate
protected void DdlInvoiceCategory_SelectedIndexChanged(object sender, EventArgs e)
{
ClearText(PnlSearch);
ClearRbtn(PnlSearch);
if (DdlInvoiceCategory.SelectedIndex <= 0)
{
InvoiceCategory = "NOInvoice";
}
else
{
InvoiceCategory = DdlInvoiceCategory.SelectedValue;
}
}
// end ddl invoice category
protected void RbtnInvoice_CheckedChanged(object sender, EventArgs e)
{
if (RbtnInvoice.Checked == true)
{
//ClearRbtn(PnlSearch);
SearchMode = "INVOICE";
}
}
// end Rbtn Invoice
protected void RbtnJobOrder_CheckedChanged(object sender, EventArgs e)
{
if (RbtnJobOrder.Checked == true)
{
//ClearRbtn(PnlSearch);
SearchMode = "REPAIR ORDER";
}
}
// End Rbtn Order
protected void RbtnVehicle_CheckedChanged(object sender, EventArgs e)
{
if (RbtnVehicle.Checked == true)
{
//ClearRbtn(PnlSearch);
SearchMode = "REGNO";
}
}
// End RbtnVehicle
protected void BtnSearchBank_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
//ClearText(PnlBankDetail);
//ClearText(PnlAccountEntry);
ClearGridView(PnlInvoiceList);
//ClearGridView(PnlBankAccountList);
if (DdlCurrency.SelectedIndex <= 0)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "alert",
"swal('Warning!','Select Currency' , 'warning')", true);
return;
}
if (DdlInvoiceCategory.SelectedIndex <= 0)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "alert",
"swal('Warning!','Select Invoice Catagory' , 'warning')", true);
return;
}
if (RbtnInvoice.Checked = false && RbtnJobOrder.Checked == false && RbtnVehicle.Checked == false)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "alert",
"swal('Warning!','Select Search Option' , 'warning')", true);
return;
}
if (TxtSearchValue.Text == "")
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "alert",
"swal('Warning!','Provide search value' , 'warning')", true);
TxtSearchValue.Focus();
return;
}
InvoiceCategory = DdlInvoiceCategory.Text;
LoadInvoiceList();
}
// End Search
protected void LoadInvoiceList(string sortExpression = null)
{
ConnectionStringFunction();
SqlCn = new SqlConnection(ConPath);
SqlCn.Open();
MainClass.ProcNameClass = "InvoiceListForReceipt";
SearchParameterString = TxtSearchValue.Text.Trim();
try
{
SqlCm = new SqlCommand(MainClass.ProcNameClass, SqlCn);
SqlCm.CommandType = CommandType.StoredProcedure;
SqlCm.Parameters.AddWithValue("InvoiceCategory", InvoiceCategory);
SqlCm.Parameters.AddWithValue("SearchMode", SearchMode);
SqlCm.Parameters.AddWithValue("MainbranchCode", MainBranchCode);
SqlCm.Parameters.AddWithValue("SearchValue", SearchParameterString);
SqlDa = new SqlDataAdapter(SqlCm);
SqlDt = new DataTable();
SqlDa.Fill(SqlDt);
if (sortExpression != null)
{
DataView dv = SqlDt.AsDataView();
this.SortDirection = this.SortDirection == "ASC" ? "DESC" : "ASC";
dv.Sort = sortExpression + " " + this.SortDirection;
GVInvoiceList.DataSource = dv;
}
else
{
GVInvoiceList.DataSource = SqlDt;
}
GVInvoiceList.DataBind();
//TotalRowCount = GvPendingList.Rows.Count;
//TotalColCount = GvPendingList.Columns.Count;
//for (int i = 0; i <= TotalColumnCount - 1; i++)
//{
// GvStaffList.Columns[i].ItemStyle.Wrap = false;
//}
TransactionStatus = true;
}
// End Try
catch (Exception ex)
{
TransactionStatus = false;
}
// Catch
finally
{
SqlCn.Close();
}
// End Finally
}
// End Load Invoice
//protected void ViewInvoiceDetail(object sender, EventArgs e)
protected void ViewInvoiceDetail(object sender, System.EventArgs e)
{
LinkButton lnkRowSelection = (LinkButton)sender;
string[] arguments = lnkRowSelection.CommandArgument.Split(';');
string InvoiceDetailTmp = arguments[0];
string RegNoTmp = arguments[1];
string CustomerCodeTmp = arguments[2];
string ModelCodeTmp = arguments[3];
string RepairOrderTmp = arguments[4];
TextBox1.Text = InvoiceDetailTmp;
////StaffId = 0;
////int id = int.Parse((sender as LinkButton).CommandArgument);
//string id = (sender as LinkButton).CommandArgument;
////StaffCode = id;
//TxtStaffCode.Text = StaffCode;
//LoadCompany();
//LoadDepartment();
//LoadJobProfile();
//LoadLocation();
//GetStaffDetail();
}
// End View Detail
}
// End Class