Click here to Skip to main content
14,773,598 members
Home » Discussions » ASP.NET
   

ASP.NET

 
GeneralRe: Ajax error handling logic Pin
Nathan Minier1-Sep-16 9:25
professionalNathan Minier1-Sep-16 9:25 
Questionerror message on master page Pin
classy_dog27-Aug-16 5:03
Memberclassy_dog27-Aug-16 5:03 
AnswerRe: error message on master page Pin
jkirkerx29-Aug-16 11:40
professionaljkirkerx29-Aug-16 11:40 
Questionajax call to shared (static) mehtod Pin
classy_dog27-Aug-16 4:45
Memberclassy_dog27-Aug-16 4:45 
AnswerRe: ajax call to shared (static) mehtod Pin
jkirkerx29-Aug-16 11:15
professionaljkirkerx29-Aug-16 11:15 
Questionasp.net javascript issue Pin
Member 1178145525-Aug-16 6:36
MemberMember 1178145525-Aug-16 6:36 
AnswerRe: asp.net javascript issue Pin
jkirkerx25-Aug-16 10:13
professionaljkirkerx25-Aug-16 10:13 
GeneralRe: asp.net javascript issue Pin
Member 1178145525-Aug-16 19:00
MemberMember 1178145525-Aug-16 19:00 
Issue Description:

1.Allowing to save the WO Request even though need by date is less than the Requested Date

2.If Need by Date is less then Requested Date should not allow to save Work Order Request instead should load an alert message "Need by date should not be less then Requested or Current Date”

3.show message if u again try to change request date after setting need by date





aspx page

<%@ Page Language="C#" MasterPageFile="~/Essential/CommonHeader.master" AutoEventWireup="true"
CodeFile="EQPHiredWorkOrderRequest.aspx.cs" Inherits="Equipment_EQPHiredWorkOrderRequest"
Title="Hired WorkOrder Request" StylesheetTheme="Default" Theme="Default" %>

<%@ Register Assembly="Infragistics35.WebUI.UltraWebTab.v10.3, Version=10.3.20103.2134, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.UltraWebTab" TagPrefix="igtab" %>
<%@ Register Assembly="Infragistics35.WebUI.Misc.v10.3, Version=10.3.20103.2134, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>
<%@ Register Assembly="Infragistics35.WebUI.WebDataInput.v10.3, Version=10.3.20103.2134, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.WebDataInput" TagPrefix="igtxt" %>
<%@ Register Namespace="Infragistics.WebUI.WebSchedule" Assembly="Infragistics35.WebUI.WebDateChooser.v10.3, Version=10.3.20103.2134, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
TagPrefix="igsch" %>
<%@ Register Src="~/UserControls/CommonDropdown.ascx" TagName="CommonDropdown" TagPrefix="uc1" %>
<%@ Register Src="../UserControls/uctrlstatusbar.ascx" TagName="uctrlstatusbar" TagPrefix="uc4" %>
<%@ Register Assembly="Infragistics35.WebUI.UltraWebGrid.v10.3, Version=10.3.20103.2134, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<%@ Register Src="~/UserControls/PagingControler.ascx" TagName="PagingControler"
TagPrefix="uc3" %>
<asp:content id="Content1" contentplaceholderid="CommonHeader" runat="Server">















$(function() {
onload();
});
function onload() {
if (document.getElementById('hdnWORequestNo') != null) {
var value = document.getElementById('hdnWORequestNo').value;
var ErrorMsg = document.getElementById('hdnDocumentSerialNoMessage').value;

if (value == "0") {
ShowMessage(ErrorMsg);
}
}
}

function CheckHeaderCheckBoxTC(HeaderChkObj, ItemCheckBoxKey) {
var hdnGridID = document.getElementById("hdnuwgItem").value;
GridName = hdnGridID;
CheckAllCheckBoxInCell(HeaderChkObj.checked, GridName, ItemCheckBoxKey);
}

function CheckAllCheckBoxInCell(_CheckStatus, _GridName, _KeyValue) {
var _InstanceValue = 0;
var count = 0;
//get the object of the grid
var _grid = igtbl_getGridById(_GridName);
//getting the grid bands
var oBands = _grid.Bands;
var oBand = oBands[0];
//getting the index of the columns in the row by passing the key
var _colIndex = oBand.getColumnFromKey(_KeyValue).Index;
//iteratin tru the row and getting the cell with the key
for (_Index = 0; _Index < _grid.Rows.length; _Index++) {
//getting the cell object
var _CellObj = GetCellByKey(_GridName, _grid.Rows.getRow(_Index).Id, _KeyValue);
//getting the checkbox with the object or tag name.
var _CheckBoxElement = _CellObj.Element.getElementsByTagName("input")[0];
//changing the status
_CheckBoxElement.checked = _CheckStatus;
if (_CheckBoxElement.checked == true)
{ count++; }

}
}


var OpenItemPOPUP = function() {
$("#divItemSearchPOPUP").dialog({
resizable: false,
modal: true,
height: 200,
width: 650,
closeOnEscape: true,
title: document.getElementById('hdnItemMsg').value
});
$("#divItemSearchPOPUP").parent().appendTo(jQuery("form:first"));
}

function CloseItemPOPUP() {
$("#divItemSearchPOPUP").dialog("close");
}


function ValidateRequestedDate(selectedDate) {

// var gridName = document.getElementById("hdnuwgWORequestDetails").value;
// var _grid = igtbl_getGridById(gridName);
var fromDate = "";
var ToDate = "";
// var GridDate = "";
var today = new Date();
ToDate = selectedDate.getValue().format('dd/MM/yyyy');
fromDate = today.format("dd/MM/yyyy");
if (fromDate != "") {
if (ValidateDates(fromDate, ToDate)) {
ShowMessage("Request Date Should Not Be Lesser Than Today's Date");
selectedDate.setValue();
}
}
}

function ValidateDates(fromDate, ToDate) {
// debugger;
var flag = false;
var fromDatestr = fromDate;
var dt1 = fromDatestr.substring(0, 2);
var mon1 = fromDatestr.substring(3, 5);
var yr1 = fromDatestr.substring(6, 10);

var ToDatestr = ToDate;
var temp2 = "";
var dt2 = ToDatestr.substring(0, 2);
var mon2 = ToDatestr.substring(3, 5);
var yr2 = ToDatestr.substring(6, 10);
if (yr1 <= yr2) {
if (yr1 == yr2 && mon1 > mon2) {
flag = true;
}
else if (yr1 == yr2 && mon1 == mon2 && dt1 > dt2) {
flag = true;
}
}
else {
flag = true;
}
return flag;
}

//for checking date in the grid

function ValidateReturnDate(FromDate) {
// debugger;
var fromDate = "";
var ToDate = "";
var hdnwdcAgreementTill = igdrp_getComboById(document.getElementById("hdnwdcReqstDate").value);
ToDate = FromDate.getValue().format('dd/MM/yyyy');
if (hdnwdcAgreementTill.getValue() != "") {
fromDate = hdnwdcAgreementTill.getValue().format('dd/MM/yyyy');
if (fromDate != "") {
if (ValidateDates(fromDate, ToDate)) {
ShowMessage("Need by date should not be less than Requested date");
FromDate.setValue();
}
}
}
}

function GetToDate(selectedDate) {
//debugger;
var hdnwdcAgreementFrom = igdrp_getComboById(document.getElementById("hdnwdcAgreementFrom").value);

ToDate = selectedDate.getValue().format('dd/MM/yyyy');
if (hdnwdcAgreementFrom.getValue() != "") {
fromDate = hdnwdcAgreementFrom.getValue().format('dd/MM/yyyy');
if (fromDate != "") {
if (ValidateDates(fromDate, ToDate)) {
ShowMessage("Receipt Till Date Should Be Greater Than Receipt From Date");
selectedDate.setValue();
}
}
}
}

// end checking date in the grid







// function UwgItems_AfterCellUpdateHandler(gridName, CellId) {
// //debugger;
// var hdnIsFinalBill = document.getElementById("hdnIsFinalBill").value;

// var hdnAdvanceDeducted = document.getElementById(document.getElementById("hdnAdvanceDeducted").value).innerText;
// var _GrossAmt = document.getElementById(document.getElementById("hdnGrossamount").value).innerText;

// var _gridId = igtbl_getGridById(gridName);
// var activeRow = _gridId.getActiveRow();


// var TotalCurrentAdvanceAmt = 0;
// for (_Index = 0; _Index < _gridId.Rows.length; _Index++) {

// var mainrowid = _gridId.Rows.getRow(_Index).Id;
// var _CurrentAdvanceAmt = GetCellByKey(gridName, mainrowid, "KeycurrentAdvanceAmount").getValue();


// var _TotalRequestAmt = GetCellByKey(gridName, mainrowid, "KeyAdvanceRequestAmount").getValue();
// var _CurrentAdvanceAmt = GetCellByKey(gridName, mainrowid, "KeycurrentAdvanceAmount").getValue();
// var _AdvanceDeductedPrev = GetCellByKey(gridName, mainrowid, "KeyAdvanceDeducted").getValue();
// var _AdvanceBalance = GetCellByKey(gridName, mainrowid, "KeyAdvanceBalance").getValue();
// var TotalAdvanceDeducted = _CurrentAdvanceAmt + _AdvanceDeductedPrev;

// var _BalanceAdvanceAmt = 0;
// if (document.getElementById(hdnIsFinalBill).checked) {
// var CurrentAdvanceAmt4Dedt = _TotalRequestAmt - _AdvanceDeductedPrev;
// GetCellByKey(gridName, mainrowid, "KeycurrentAdvanceAmount").setValue(CurrentAdvanceAmt4Dedt);
// //activeRow.getCellFromKey("KeycurrentAdvanceAmount").setValue(CurrentAdvanceAmt4Dedt);
// }
// else {
// if (TotalAdvanceDeducted < _TotalRequestAmt) {
// _BalanceAdvanceAmt = _TotalRequestAmt - TotalAdvanceDeducted;
// }
// else {
// var CurrentAdvanceAmt4Dedt = _TotalRequestAmt - _AdvanceDeductedPrev;
// GetCellByKey(gridName, mainrowid, "KeycurrentAdvanceAmount").setValue(CurrentAdvanceAmt4Dedt);
// //activeRow.getCellFromKey("KeycurrentAdvanceAmount").setValue(CurrentAdvanceAmt4Dedt);
// }
// }
// GetCellByKey(gridName, mainrowid, "KeyAdvanceBalance").setValue(_BalanceAdvanceAmt);
// //activeRow.getCellFromKey("KeyAdvanceBalance").setValue(_BalanceAdvanceAmt);


// TotalCurrentAdvanceAmt = TotalCurrentAdvanceAmt + _CurrentAdvanceAmt;

// }
// // hdnAdvanceDeducted=TotalCurrentAdvanceAmt;
// document.getElementById(document.getElementById("hdnAdvanceDeducted").value).innerText = TotalCurrentAdvanceAmt;

// document.getElementById(document.getElementById("hdnNetAmount").value).innerText = _GrossAmt - TotalCurrentAdvanceAmt;
// // document.getElementById(document.getElementById("hdnNetPayableAmount").value).innerText = _GrossAmt - TotalCurrentAdvanceAmt;
// }

function SaveValidations(oButton, oEvent) {
debugger;
// var gridIDBillEntry = document.getElementById("hdnuwgWORequestDetails").value;
var gridID = document.getElementById("hdnuwgWORequestDetails").value;
var hdnCddReqstdBy = document.getElementById(document.getElementById("hdnCddReqstdBy").value).value;
var RequestedDate = document.getElementById("hdnwdcReqstDate").value;
var _grid = igtbl_getGridById(gridID);
// var _gridBillEntry = igtbl_getGridById(gridIDBillEntry);
var _cntgrid = 0;
// var _cntgridAssetDetails = 0;

_cntgrid = _grid.Rows.length;
// _cntgridBillEntry = _gridBillEntry.Rows.length;

if (_cntgrid <= 0) {
ShowMessage("Please Add Assets");
oEvent.cancel = true;
}

var RequestedBy = document.getElementById("hdnRequestedBy").value;
if (RequestedBy == "true") {

if (hdnCddReqstdBy == "0") {
ShowMessage("Please Select Requestedby");
oEvent.cancel = true;
return;
}
}
// if (_cntgridBillEntry <= 0) {
// ShowMessage("Please Enter Bill Details");
// oEvent.cancel = true;
// }

// debugger;
for (_Index = 0; _Index < _grid.Rows.length; _Index++) {

var mainrowid = _grid.Rows.getRow(_Index).Id;
var AssetQty = GetCellByKey(gridID, mainrowid, "KeyAssetQty").getValue();
var AssetUOM = GetCellByKey(gridID, mainrowid, "KeyAssetUOM").getValue();
var UsageQty = GetCellByKey(gridID, mainrowid, "KeyUsageQty").getValue();
var UsageUOM = GetCellByKey(gridID, mainrowid, "KeyUsageUOM").getValue();
var NeedByDate = GetCellByKey(gridID, mainrowid, "KeyNeedByDate").getValue();

if (AssetQty <= 0) {
ShowMessage("Please enter Asset Qty");
oEvent.cancel = true;
break;
}
if (UsageQty <= 0) {
ShowMessage("Please enter Usage Qty");
oEvent.cancel = true;
break;
}

if (AssetUOM == 0) {
ShowMessage("Please Select Asset Unit");
oEvent.cancel = true;
break;
}
if (UsageUOM == 0) {
ShowMessage("Please Select Usage Unit");
oEvent.cancel = true;
break;
}
if (NeedByDate == null || NeedByDate == "") {
ShowMessage("Please Select NeedByDate");
oEvent.cancel = true;
break;
}

}

}


function OpenSubmitPopUpWDW() {
$("#divSubmit").dialog({

resizable: false,
modal: true,
height: 300,
width: 400,
title: 'Hired Work Order Request Submit'

});
$("#divSubmit").parent().appendTo(jQuery("form:first"));
}

function SubmitPopUpClosed_Clicked() {
$("#divSubmit").dialog("close");
}

function OpenApprovePopUpWDW() {
$("#divApprove").dialog({

resizable: false,
modal: true,
height: 300,
width: 400,
title: 'Hired Work Order Request Approve'

});
$("#divApprove").parent().appendTo(jQuery("form:first"));
}

function ApprovePopUpClosed_Clicked() {
$("#divApprove").dialog("close");
}

function OpenRevokePopUpWDW() {
$("#divRevoke").dialog({

resizable: false,
modal: true,
height: 300,
width: 400,
title: 'Hired Work Order Request Revoke'

});
$("#divRevoke").parent().appendTo(jQuery("form:first"));
}

function RevokePopUpClosed_Clicked() {
$("#divRevoke").dialog("close");
}

function ValidateLoadBtn(oButton, oEvent) {
//debugger;
var hdnwdcReqstDate = document.getElementById(document.getElementById("hdnwdcReqstDate").value).value;

var hdncddProject = document.getElementById(document.getElementById("hdncddProject").value).value;
// var cddProject = document.getElementById("hdncddProject").value;
// var Project = document.getElementById(cddProject).value;

var hdnCddReqstdBy = document.getElementById(document.getElementById("hdnCddReqstdBy").value).value;

// var hdnCddReqstdBy = document.getElementById("hdnCddReqstdBy").value;
// var ReqstdBy = document.getElementById(hdnCddReqstdBy).value;


if (hdncddProject == "0") {
ShowMessage("Please Select Project");
oEvent.cancel = true;
return;
}
var RequestedBy = document.getElementById("hdnRequestedBy").value;
if (RequestedBy == "true") {

if (hdnCddReqstdBy == "0") {
ShowMessage("Please Select Requestedby");
oEvent.cancel = true;
return;
}
}
if (hdnwdcReqstDate == "NaN" || hdnwdcReqstDate == "") {
ShowMessage("Please Enter Request Date");
oEvent.cancel = true;
return;
}
}




// function CalculateAdvanceDeductedForFinalBill() {
// debugger;
// var gridID = document.getElementById("hdnuwgAdvanceDetails").value;
// var _grid = igtbl_getGridById(gridID);
// UwgItems_AfterCellUpdateHandler(gridID, 0);

// }




<%-- --%>
<asp:label id="lbl_EQPHiredWorkOrderRequest" runat="server" skinid="LabelPageSubHeader"
="" text="<%$ Resources:EQPWebResource,lbl_EQPHiredWorkOrderRequest%>">
<asp:label id="lbl_BillNo" runat="server" text="<%$ Resources:EQPWebResource,lbl_RequestNo%>">
*
<igmisc:webasyncrefreshpanel id="warptxtRequestNo" runat="server">
<%--<igtxt:webnumericedit id="txtRequestNo" datamode="Text" maxlength="150" width="70px"
="" enabled="false" runat="server">
--%>
<asp:textbox id="txtRequestNo" runat="server" width="200px" height="18px" enabled="false">

<asp:label id="lblRentDate" runat="server" text="<%$ Resources:EQPWebResource,lbl_RequestedDate%>">
*
<igmisc:webasyncrefreshpanel id="WarpwdcReqstDate" runat="server">
<igsch:webdatechooser id="wdcReqstDate" runat="server">
<clientsideevents valuechanged="ValidateRequestedDate">


<asp:label id="Label2" runat="server" text="<%$ Resources:EQPWebResource,lbl_Project%>">
*

<uc1:commondropdown id="cddProject" runat="server" enableajax="true" enableautopostback="true"
="" tabindex="3" onselectedindexchanged="CddProject_SelectedIndexChanged">

<asp:label id="Label3" runat="server" text="<%$ Resources:EQPWebResource,lbl_ItemType%>">
*
<igmisc:webasyncrefreshpanel id="WarpItemType" runat="server" width="100%">
<asp:radiobuttonlist id="rbItemType" runat="server" repeatdirection="Horizontal"
="" autopostback="true" onselectedindexchanged="rbItemType_SelectedIndexChanged">


<asp:label id="Label113" runat="server" text="<%$ Resources:EQPWebResource,lbl_ReqBy%>">
<%-- *--%>
<uc1:commondropdown id="CddReqstdBy" runat="server" enableajax="true" enableautopostback="true"
="" onselectedindexchanged="cddReqstBySelectedIndexChanged">
<asp:label id="Label1" runat="server" text="<%$ Resources:EQPWebResource,lbl_Designation%>">

<igmisc:webasyncrefreshpanel id="WarpDesignation" runat="server">
<asp:label id="lbl_Designation" runat="server">

<asp:label id="Label4" runat="server" text="<%$ Resources:EQPWebResource,lbl_Remarks%>">
<%-- *--%>
<igmisc:webasyncrefreshpanel id="warptxtRemarks" runat="server">
<asp:textbox id="txtRemarks" runat="server" textmode="MultiLine" width="200px" height="30px">

<%--<asp:label id="Label4" runat="server" text="<%$ Resources:EQPWebResource,lbl_Remarks%>">--%>
<%-- *--%>
<%-- <igmisc:webasyncrefreshpanel id="warptxtRemarks" runat="server">
<asp:textbox id="txtRemarks" runat="server" textmode="MultiLine" width="200px" height="30px">
--%>
<igmisc:webasyncrefreshpanel id="warpwibAddAsset" runat="server" valign="top">
<igtxt:webimagebutton id="wibAddAsset" runat="server" causesvalidation="true" text="<%$ Resources:EQPWebResource,btn_AddAsset%>"
="" accesskey="S" imagedirectory="" imagetextspacing="1" visible="true" onclick="btnAddAsset_Click">
<clientsideevents click="ValidateLoadBtn">
<appearance>
<buttonstyle width="10%">





<igtxt:webnumericedit id="txtAssetQty" datamode="Decimal" maxlength="150" mindecimalplaces="Two"
="" runat="server">

<igtxt:webnumericedit id="txtUsageQty" datamode="Decimal" maxlength="150" mindecimalplaces="Two"
="" runat="server">

<igsch:webdatechooser id="wdcNeedByDate" runat="server">
<clientsideevents valuechanged="ValidateReturnDate">

<igmisc:webasyncrefreshpanel id="warpuwgWORequestDetails" runat="server">
<igtbl:ultrawebgrid id="uwgWORequestDetails" runat="server" enableappstyling="True" oninitializerow="uwgWORequestDetails_InitializeRow"
="" stylesetname="QUltraWebGridForSearchPage" width="100%">
<bands>
<igtbl:ultragridband>
<columns>
<igtbl:ultragridcolumn basecolumnname="EQPHiredWorkOrderRequestDetailsID" key="KeyId" hidden="true">
<headerstyle horizontalalign="Center">

<rowlayoutcolumninfo originx="0">


<rowlayoutcolumninfo originx="0">

<cellstyle horizontalalign="Center">


<igtbl:ultragridcolumn basecolumnname="EQPHiredWorkOrderRequestID" key="KeyEQPHiredWorkOrderRequestID"
="" hidden="true">
<headerstyle horizontalalign="Center">

<rowlayoutcolumninfo originx="0">


<rowlayoutcolumninfo originx="0">

<cellstyle horizontalalign="Center">


<igtbl:ultragridcolumn basecolumnname="COMItemDefinitionID" key="KeyCOMItemDefinitionID"
="" hidden="true">
<headerstyle horizontalalign="Center">

<rowlayoutcolumninfo originx="0">


<rowlayoutcolumninfo originx="0">

<cellstyle horizontalalign="Center">


<igtbl:ultragridcolumn basecolumnname="SlNo" key="KeySerialNo" hidden="false" width="5%">
<headerstyle horizontalalign="Center">

<rowlayoutcolumninfo originx="2">


<rowlayoutcolumninfo originx="2">

<headerstyle horizontalalign="Left">
<cellstyle horizontalalign="Left">


<igtbl:ultragridcolumn basecolumnname="COMItemDefinition" key="KeyCOMItemDefinition"
="" width="40%" allowupdate="No" isbound="true" hidden="false">

<rowlayoutcolumninfo originx="2">


<rowlayoutcolumninfo originx="2">

<headerstyle horizontalalign="Left">
<cellstyle horizontalalign="Left">



<igtbl:templatedcolumn basecolumnname="AssetQty" key="KeyAssetQty" hidden="false" allowupdate="Yes"
="" width="10%" type="Custom" editorcontrolid="txtAssetQty">

<rowlayoutcolumninfo originx="2">


<rowlayoutcolumninfo originx="2">

<cellstyle horizontalalign="Right">

<headerstyle horizontalalign="Right">

<igtbl:templatedcolumn basecolumnname="AssetUOM" key="KeyAssetUOM" hidden="false" allowupdate="No"
="" width="10%" type="Custom" datatype="Int">
<headerstyle horizontalalign="Left">

<rowlayoutcolumninfo originx="2">


<rowlayoutcolumninfo originx="2">

<celltemplate>
<asp:dropdownlist id="ddlAssetUOM" runat="server" autopostback="false" width="100px">


<headerstyle horizontalalign="Left">

<igtbl:templatedcolumn basecolumnname="UsageQty" key="KeyUsageQty" hidden="false" allowupdate="Yes"
="" width="10%" type="Custom" editorcontrolid="txtUsageQty">
<headerstyle horizontalalign="Right">

<rowlayoutcolumninfo originx="2">


<rowlayoutcolumninfo originx="2">

<cellstyle horizontalalign="Right">


<igtbl:templatedcolumn basecolumnname="UsageUOM" key="KeyUsageUOM" hidden="false" allowupdate="No"
="" width="10%" type="Custom" datatype="Int">
<headerstyle horizontalalign="Left">

<rowlayoutcolumninfo originx="2">


<rowlayoutcolumninfo originx="2">

<celltemplate>
<asp:dropdownlist id="ddlUsageUOM" runat="server" autopostback="false" width="100px">


<headerstyle horizontalalign="Left">

<igtbl:ultragridcolumn width="15%" basecolumnname="NeedByDate" key="KeyNeedByDate"
="" hidden="False" allowupdate="Yes" editorcontrolid="wdcNeedByDate" isbound="true" datatype="System.DateTime" format="dd/MM/yyyy" type="Custom">
<headerstyle horizontalalign="Left">

<rowlayoutcolumninfo originx="2">

<cellstyle horizontalalign="Left">




<displaylayout allowcolsizingdefault="Free" allowsortingdefault="Yes" allowupdatedefault="Yes"
="" allowaddnewdefault="Yes" bordercollapsedefault="Separate" cellclickactiondefault="Edit" colfootersvisibledefault="Yes" colheadersvisibledefault="Yes" rowheightdefault="24px" rowselectorsdefault="No" selecttypecelldefault="Extended" selecttypecoldefault="Single" version="4.00" tablelayout="fixed" scrollbar="Always" scrollbarview="Both" autogeneratecolumns="false" stationarymargins="HeaderAndFooter" viewtype="OutlookGroupBy" headerclickactiondefault="SortSingle" xmlloadondemandtype="Accumulative" allowcolumnmovingdefault="OnServer">
<framestyle width="100%" height="250px">

<headerstyledefault horizontalalign="Center" font-bold="true">

<selectedheaderstyledefault backgroundimage="./column_selected_bg.jpg">

<rowstyledefault font-names="Verdana" font-size="8pt">

<footerstyledefault horizontalalign="Right">
<activationobject bordercolor="" borderwidth="">

<%-- <clientsideevents aftercellupdatehandler="UwgItems_AfterCellUpdateHandler">--%>






<igmisc:webasyncrefreshpanel runat="server" id="warpbtnSave">
<quadra:quadrawebimagebutton id="wibSave" causesvalidation="true" runat="server"
="" text="<%$ Resources:EQPWebResource,btnSave%>" accesskey="S" aclactionenum="_Home_Equipment_HiredEquipment_WorkOrderRequest_Save" onclick="BTNSave_Click">
<clientsideevents click="SaveValidations">


<igmisc:webasyncrefreshpanel id="warpDelete" runat="server">
<quadra:quadrawebimagebutton id="wibDelete" text="<%$ Resources:SCTWebResources,btn_Delete%>"
="" runat="server" aclactionenum="_Home_Equipment_HiredEquipment_WorkOrderRequest_Delete" causesvalidation="false" accesskey="E" onclick="wibDelete_Click">


<quadra:quadrawebimagebutton id="wibCancel" causesvalidation="false" runat="server"
="" text="<%$Resources:EQPWebResource,btnCancel%>" accesskey="C" onclick="BTNCancel_Click">

<igmisc:webasyncrefreshpanel runat="server" id="WARPwibSubmit">
<quadra:quadrawebimagebutton id="wibSubmit" causesvalidation="true" runat="server"
="" text="<%$ Resources:EQPWebResource,lbl_Submit%>" accesskey="S" aclactionenum="_Home_Equipment_EQPHiredWORequest_Submit">
<clientsideevents click="OpenSubmitPopUpWDW();">


<igmisc:webasyncrefreshpanel id="warpApprove" runat="server">
<quadra:quadrawebimagebutton id="wibAppReject" text="<%$ Resources:SCTWebResources,btn_ApproveReject%>"
="" runat="server" causesvalidation="false" aclactionenum="_Home_Equipment_EQPHiredWORequest_Approve" accesskey="P">
<%-- OnClick="wibApproveRej_Click"--%>
<appearance>
<buttonstyle width="100PX">


<clientsideevents click="OpenApprovePopUpWDW();">


<igmisc:webasyncrefreshpanel runat="server" id="WARPwibRevoke">
<quadra:quadrawebimagebutton id="wibRevoke" causesvalidation="true" runat="server"
="" onclick="wibRevokeValidate_Click" text="<%$ Resources:SCTWebResources,btn_Revoke%>" aclactionenum="_Home_Equipment_EQPHiredWORequest_Revoke" accesskey="R">
<%-- <clientsideevents click="OpenRevokePopUpWDW();">--%>



<uc4:uctrlstatusbar id="uctrlstatusbar1" runat="server">



<%--popup region--%>



<asp:label id="Label5" runat="server" text="<%$ Resources:PURWebResources,lblItemCategory%>">

<uc1:commondropdown id="cddlMaterialCategory" runat="server" tabindex="8" enableajax="true"
="" enableautopostback="true" dropdownwidth="120px">
<asp:label id="lblitemGroup" runat="server" text="<%$ Resources:PURWebResources,lblItemGroup%>">

<uc1:commondropdown id="cddItemGroup" runat="server" dropdownwidth="120px">
<asp:label id="lblSearchBy" runat="server" text="<%$ Resources:PURWebResources,Item_Definition_Code%>">

<igmisc:webasyncrefreshpanel id="warpTxtSearch" runat="server">
<asp:textbox id="txtSearch" runat="server" width="120px">




<igmisc:webasyncrefreshpanel id="warpSearch" runat="server">
<igtxt:webimagebutton id="wibSearch" text="<%$ Resources:CommonWebResources,Lbl_Search%>"
="" runat="server" causesvalidation="false" onclick="wib_ITEMPOPUP_Search_Click" accesskey="E">


<igmisc:webasyncrefreshpanel id="warpClear" runat="server">
<igtxt:webimagebutton id="wibClear" accesskey="L" onclick="wib_ITEMPOPUP_Clear_Click"
="" text="<%$ Resources:CommonWebResources,Lbl_Clear%>" runat="server">



<uc3:pagingcontroler id="PagingControler1" runat="server">
<igmisc:webasyncrefreshpanel id="warpItemGrid" runat="server">
<igtbl:ultrawebgrid id="uwgItem" runat="server" height="175px" width="100%" stylesetname="QUltraWebGridForSearchPage">
<bands>
<igtbl:ultragridband>
<columns>
<igtbl:templatedcolumn width="5%" key="KeyItemCheckBox" hidden="false">
<headertemplate>
<asp:checkbox id="chkHeader" runat="server" onclick="CheckHeaderCheckBoxTC(this,'KeyItemCheckBox');">

<celltemplate>
<asp:checkbox id="chkSelect" runat="server">

<headerstyle horizontalalign="Center">
<cellstyle horizontalalign="Center">


<igtbl:ultragridcolumn basecolumnname="COMItemCategoryID" hidden="True" isbound="True" width="1%"
="" key="KeyCOMItemCategoryID" allowupdate="No">

<rowlayoutcolumninfo originx="1">


<rowlayoutcolumninfo originx="1">


<%-- <igtbl:ultragridcolumn basecolumnname="IsInspectionRequired" hidden="True" isbound="True"
="" key="KeyIsInspectionRequired" allowupdate="No" width="0%">

<rowlayoutcolumninfo originx="1">


<rowlayoutcolumninfo originx="1">

--%>
<igtbl:ultragridcolumn basecolumnname="ItemCategoryName" isbound="True" key="KeyItemCategoryName"
="" allowupdate="No" width="15%">

<rowlayoutcolumninfo originx="3">

<cellstyle wrap="true" horizontalalign="Left">


<rowlayoutcolumninfo originx="3">


<igtbl:ultragridcolumn basecolumnname="COMItemGroupID" hidden="True" isbound="True"
="" key="KeyCOMItemGroupID" allowupdate="No" width="1%">

<rowlayoutcolumninfo originx="1">


<rowlayoutcolumninfo originx="1">


<igtbl:ultragridcolumn basecolumnname="UsageUOMID" hidden="True" isbound="True" width="5%"
="" key="KeyUsageUOMID" allowupdate="No">

<rowlayoutcolumninfo originx="1">


<rowlayoutcolumninfo originx="1">


<igtbl:ultragridcolumn basecolumnname="UOM" hidden="True" isbound="True" width="5%"
="" key="KeyUOM" allowupdate="No">

<rowlayoutcolumninfo originx="1">


<rowlayoutcolumninfo originx="1">


<igtbl:ultragridcolumn basecolumnname="ItemGroup" isbound="True" key="KeyItemGroup"
="" allowupdate="No" width="10%">

<rowlayoutcolumninfo originx="3">

<cellstyle wrap="true" horizontalalign="Left">


<rowlayoutcolumninfo originx="3">


<igtbl:ultragridcolumn basecolumnname="COMItemDefinitionID" hidden="True" isbound="True"
="" key="KeyCOMItemDefinitionID" allowupdate="No">

<rowlayoutcolumninfo originx="1">


<rowlayoutcolumninfo originx="1">


<igtbl:ultragridcolumn basecolumnname="ItemCode" isbound="True" key="KeyItemCode"
="" allowupdate="No" width="10%">

<rowlayoutcolumninfo originx="2">

<cellstyle wrap="true">


<rowlayoutcolumninfo originx="2">


<igtbl:ultragridcolumn basecolumnname="ItemDescription" isbound="True" key="KeyItemDescription"
="" allowupdate="No" width="30%">

<rowlayoutcolumninfo originx="3">

<cellstyle wrap="true" horizontalalign="Left">


<rowlayoutcolumninfo originx="3">


<igtbl:ultragridcolumn basecolumnname="COMUOMID" hidden="True" width="5%" isbound="True" key="KeyCOMItemUnitID">

<rowlayoutcolumninfo originx="4">


<rowlayoutcolumninfo originx="4">


<igtbl:ultragridcolumn hidden="false" allowupdate="No" isbound="true" key="KeyItemUnit"
="" basecolumnname="UsageUOM" width="10%" type="Custom">

<rowlayoutcolumninfo originx="5">


<rowlayoutcolumninfo originx="5">


<igtbl:ultragridcolumn basecolumnname="UsageRate" isbound="True" width="10%" format="0.00" datatype="Decimal"
="" key="keyRate">

<rowlayoutcolumninfo originx="4">


<rowlayoutcolumninfo originx="4">

<cellstyle horizontalalign="Right">


<%-- <igtbl:ultragridcolumn allowupdate="No" width="5%" basecolumnname="AvailableQuantity"
="" key="KeyAvailableQuantity" isbound="true" hidden="true">
<headerstyle horizontalalign="Center">
<cellstyle horizontalalign="Right">


<rowlayoutcolumninfo originx="6">


<rowlayoutcolumninfo originx="6">

--%>

<addnewrow view="NotSet" visible="NotSet">



<displaylayout allowcolsizingdefault="Free" allowsortingdefault="Yes" allowupdatedefault="Yes"
="" bordercollapsedefault="Separate" cellclickactiondefault="Edit" colfootersvisibledefault="NotSet" name="uwgItem" rowheightdefault="24px" rowselectorsdefault="No" selecttypecelldefault="extended" selecttypecoldefault="Single" version="4.00" stationarymargins="Header">
<framestyle width="100%" height="175px">

<headerstyledefault horizontalalign="Center" font-bold="true">

<selectedheaderstyledefault backgroundimage="">

<rowstyledefault font-names="Verdana" font-size="8pt">

<activationobject bordercolor="" borderwidth="">





<igmisc:webasyncrefreshpanel id="warpAdd" runat="server">
<igtxt:webimagebutton id="wibAdd" text="<%$ Resources:PURWebResources,WBS_Add%>"
="" runat="server" causesvalidation="false" onclick="wib_ITEMPOPUP_Add_Click">


<igmisc:webasyncrefreshpanel id="WarpFinsh" runat="server">
<igtxt:webimagebutton id="WibPOPUPFinish" text="Finish" runat="server" causesvalidation="false"
="" onclick="wib_ITEMPOPUP_Finsh_Click">




<asp:hiddenfield id="hdnDraggedItem" runat="server">

<%--End--%>
<%--




<igmisc:webasyncrefreshpanel id="warpuwgTimeSheetDetailsForPopup" runat="server">
<igtbl:ultrawebgrid id="uwgTimeSheetDetailsForPopup" runat="server" enableappstyling="True"
="" stylesetname="QUltraWebGridForSearchPage" width="100%">
<bands>
<igtbl:ultragridband>
<columns>
<igtbl:ultragridcolumn basecolumnname="Id" key="KeyId" hidden="true">
<headerstyle horizontalalign="Center">

<rowlayoutcolumninfo originx="0">


<rowlayoutcolumninfo originx="0">

<cellstyle horizontalalign="Center">


<igtbl:templatedcolumn width="5%" key="KeyCheckBox" hidden="False">
<headerstyle horizontalalign="Center">
<headertemplate>
<asp:checkbox id="chkHeader" runat="server" onclick="CheckHeaderCheckBoxTC(this,'KeyCheckBox');">

<celltemplate>
<asp:checkbox id="chkCell" runat="server">

<cellstyle horizontalalign="Center">

<igtbl:ultragridcolumn basecolumnname="TimeSheetNo" width="15%" key="KeyTimeSheetNo"
="" allowupdate="No" isbound="true" hidden="false">
<headerstyle horizontalalign="Left">

<rowlayoutcolumninfo originx="2">


<rowlayoutcolumninfo originx="2">

<cellstyle horizontalalign="Left">





<displaylayout allowcolsizingdefault="Free" allowsortingdefault="Yes" allowupdatedefault="Yes"
="" bordercollapsedefault="Separate" cellclickactiondefault="Edit" colfootersvisibledefault="NotSet" name="uwgItem" rowheightdefault="24px" rowselectorsdefault="No" selecttypecelldefault="extended" selecttypecoldefault="Single" version="4.00">
<framestyle width="100%" height="250px">

<headerstyledefault horizontalalign="Center" font-bold="true">

<selectedheaderstyledefault backgroundimage="./column_selected_bg.jpg">

<rowstyledefault font-names="Verdana" font-size="8pt">

<activationobject bordercolor="" borderwidth="">





<igmisc:webasyncrefreshpanel runat="server" id="WarpwibAddToGrid">
<quadra:quadrawebimagebutton id="btnAddToGrid" causesvalidation="true" runat="server"
="" onclick="BtnPopUpAddClick" text="<%$ Resources:EQPWebResource,AddEquipment%>" accesskey="S">
<clientsideevents click="ValidateAddPopupBtn">




--%>



<asp:label id="lblRemark" text="<%$ Resources:HRMSWebResource, lbl_Remarks%>" runat="server">
<igmisc:webasyncrefreshpanel id="warpTERemark" runat="server">
<igtxt:webtextedit id="txtDialogSubmitRemarks" runat="server" height="40px" width="250px">
<clientsideevents valuechange="txtDialogSubmitRemarksChanged">




<igmisc:webasyncrefreshpanel id="WarpSubmitPopupMPR" runat="server">
<igtxt:webimagebutton id="wibSubmitMPR" text="<%$ Resources:HRMSWebResource, lbl_Submit%>"
="" runat="server" causesvalidation="false" accesskey="T" onclick="wibSubmit_Click">
<clientsideevents click="SubmitPopUpClosed_Clicked">








<asp:label id="Label15" text="<%$ Resources:HRMSWebResource, lbl_Remarks%>" runat="server">
<igmisc:webasyncrefreshpanel id="WebAsyncRefreshPanel6" runat="server">
<igtxt:webtextedit id="WebTextEdit1" runat="server" height="40px" width="250px">
<clientsideevents valuechange="txtDialogApproveRemarksChanged">




<igmisc:webasyncrefreshpanel id="WarpApprovePopupMPR" runat="server">
<igtxt:webimagebutton id="wibApproveMPR" text="<%$ Resources:HRMSWebResource, lbl_Approve%>"
="" runat="server" causesvalidation="false" accesskey="T" onclick="wibApprove_Click">
<clientsideevents click="ApprovePopUpClosed_Clicked();">


<igmisc:webasyncrefreshpanel id="warpRejectInPopUp" runat="server">
<igtxt:webimagebutton id="wibReject" text="<%$ Resources:SCTWebResources, btn_TenderReject%>"
="" runat="server" accesskey="R" causesvalidation="false" onclick="wibReject_Click">
<clientsideevents click="ApprovePopUpClosed_Clicked();">








<asp:label id="Label13" text="<%$ Resources:HRMSWebResource, lbl_Remarks%>" runat="server">
<igmisc:webasyncrefreshpanel id="WebAsyncRefreshPanel7" runat="server">
<igtxt:webtextedit id="WebTextEdit2" runat="server" height="40px" width="250px">
<clientsideevents valuechange="txtDialogRevokeRemarksChanged">




<igmisc:webasyncrefreshpanel id="WarpRevokePopupMPR" runat="server">
<igtxt:webimagebutton id="wibRevokeMPR" text="<%$ Resources:HRMSWebResource, lbl_Revoke%>"
="" runat="server" causesvalidation="false" accesskey="T" onclick="wibRevoke_Click">
<clientsideevents click="RevokePopUpClosed_Clicked();">








aspx cs page

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using Quadra.Suite.Common;
using Quadra.Suite.Equipment;
using Quadra.Suite.Base;
using Infragistics.WebUI.UltraWebGrid;
using System.ServiceModel;
using Quadra.Suite.Base.Exception;
using Quadra.Suite.Web.Util;
using Quadra.Web.UI.Controls;
using Infragistics.WebUI.Shared;
using Infragistics.WebUI.WebDataInput;
using System.Text;
using Quadra.Suite.Message;
using Quadra.Suite.Purchase.PurchaseRequest;
using Quadra.Suite.Common.COMDocumentSerialNo;
using Infragistics.WebUI.WebSchedule;
using Quadra.Suite.HRMS;
using Quadra.Suite.HRA;


public partial class Equipment_EQPHiredWorkOrderRequest : EQPBasePage
{
protected void Page_Load(object sender, EventArgs e)
{
# region RegisterHiddenField
Page.RegisterHiddenField("hdnItemMsg", GetLocalizedMessage(PURWebMessageKEYS.ITEM_SEARCH.ToString()));
Page.RegisterHiddenField("hdnuwgItem", uwgItem.ClientID);
Page.RegisterHiddenField("hdnuwgWORequestDetails", uwgWORequestDetails.ClientID);
Page.RegisterHiddenField("hdnDocumentSerialNoMessage", ((String)GetGlobalResourceObject("EQPWebResource", "DocumentSerialNoMessage")));
Page.RegisterHiddenField("hdnwdcReqstDate", wdcReqstDate.ClientID);
Page.RegisterHiddenField("hdncddProject", cddProject.DropDown.ClientID);
Page.RegisterHiddenField("hdnCddReqstdBy", CddReqstdBy.DropDown.ClientID);
#endregion RegisterHiddenField


# region RefreshTargets

cddProject.DropDownWARP.AddRefreshTarget(CddReqstdBy.DropDownWARP);
cddProject.DropDownWARP.AddRefreshTarget(warptxtRequestNo);
CddReqstdBy.DropDownWARP.AddRefreshTarget(WarpDesignation);
#region RefreshControls for Popup

warpwibAddAsset.AddRefreshTarget(warpItemGrid);
warpwibAddAsset.AddRefreshTarget(warpTxtSearch);
warpwibAddAsset.AddRefreshTarget(cddlMaterialCategory.DropDownWARP);

PagingControler1.PagingControlerWARP.AddRefreshTarget(warpItemGrid);
PagingControler1.AttachedGrid = uwgItem;
PagingControler1.AttachedGridWARP = warpItemGrid;
PagingControler1.NextOnClick += new UserControls_PagingControler.ClickHandler(PagingControler1_NextOnClick);
PagingControler1.PreviousOnClick += new UserControls_PagingControler.ClickHandler(PagingControler1_PreviousOnClick);
PagingControler1.RecordSizeSelectedIndexChanged += new UserControls_PagingControler.ClickHandler(PagingControler1_RecordSizeSelectedIndexChanged);
PagingControler1.PageSelectedIndexChanged += new UserControls_PagingControler.ClickHandler(PagingControler1_PageSelectedIndexChanged);
cddlMaterialCategory.SelectedIndexChanged += new UserControls_CommonDropdown.ClickHandler(cddlMaterialCategory_SelectedIndexChanged);
warpSearch.AddRefreshTarget(warpItemGrid);
cddlMaterialCategory.DropDownWARP.AddRefreshTarget(cddItemGroup.DropDownWARP);
warpClear.AddRefreshTarget(warpTxtSearch);
warpClear.AddRefreshTarget(warpItemGrid);
warpClear.AddRefreshTarget(PagingControler1.PagingControlerWARP);
warpClear.AddRefreshTarget(cddItemGroup.DropDownWARP);
warpClear.AddRefreshTarget(cddlMaterialCategory.DropDownWARP);
warpAdd.AddRefreshTarget(warpuwgWORequestDetails);

# endregion RefreshControls for Popup


#region submit Refresh
WarpSubmitPopupMPR.AddRefreshTarget(warpbtnSave);
WarpSubmitPopupMPR.AddRefreshTarget(warpApprove);
WarpSubmitPopupMPR.AddRefreshTarget(WARPwibRevoke);
WarpSubmitPopupMPR.AddRefreshTarget(WARPwibSubmit);
warpApprove.AddRefreshTarget(warpDelete);
WarpSubmitPopupMPR.AddRefreshTarget(CddReqstdBy.DropDownWARP);
WarpSubmitPopupMPR.AddRefreshTarget(cddProject.DropDownWARP);
#endregion
#region Approve refresh
WarpApprovePopupMPR.AddRefreshTarget(warpbtnSave);
WarpApprovePopupMPR.AddRefreshTarget(warpApprove);
WarpApprovePopupMPR.AddRefreshTarget(WARPwibRevoke);
WarpApprovePopupMPR.AddRefreshTarget(WARPwibSubmit);
WarpApprovePopupMPR.AddRefreshTarget(warpDelete);
WarpApprovePopupMPR.AddRefreshTarget(cddProject.DropDownWARP);
WarpApprovePopupMPR.AddRefreshTarget(CddReqstdBy.DropDownWARP);
#endregion
#region Reject refresh
warpRejectInPopUp.AddRefreshTarget(WARPwibSubmit);
warpRejectInPopUp.AddRefreshTarget(warpbtnSave);
warpRejectInPopUp.AddRefreshTarget(warpDelete);
warpRejectInPopUp.AddRefreshTarget(warpApprove);
warpRejectInPopUp.AddRefreshTarget(warpDelete);
#endregion
#region Revoke refresh
WarpRevokePopupMPR.AddRefreshTarget(warpbtnSave);
WarpRevokePopupMPR.AddRefreshTarget(warpApprove);
WarpRevokePopupMPR.AddRefreshTarget(WARPwibRevoke);
WarpRevokePopupMPR.AddRefreshTarget(WARPwibSubmit);
WarpRevokePopupMPR.AddRefreshTarget(warpDelete);
WarpRevokePopupMPR.AddRefreshTarget(CddReqstdBy.DropDownWARP);
WarpRevokePopupMPR.AddRefreshTarget(cddProject.DropDownWARP);
#endregion
#region Save Refresh
warpbtnSave.AddRefreshTarget(warpbtnSave);
warpbtnSave.AddRefreshTarget(warpApprove);
warpbtnSave.AddRefreshTarget(WARPwibSubmit);
warpbtnSave.AddRefreshTarget(warpwibAddAsset);
warpbtnSave.AddRefreshTarget(warpDelete);
warpbtnSave.AddRefreshTarget(warptxtRequestNo);
#endregion
#region Delete refresh
warpDelete.AddRefreshTarget(WARPwibSubmit);
warpDelete.AddRefreshTarget(warpbtnSave);
warpDelete.AddRefreshTarget(warpDelete);
warpDelete.AddRefreshTarget(warpApprove);
warpDelete.AddRefreshTarget(WARPwibRevoke);
#endregion
#endregion RefreshTargets

if (!IsPostBack)
{
LoadProjects();
LoadEmployee(Convert.ToInt16("0"));
//Int32 LookupID = GetCOMLookupIdForItemType();
FillItemType();
LoadMaterialCategory(Convert.ToInt32(rbItemType.SelectedItem.Value));//Loads Category
Int32 IndexId = Convert.ToInt32(Request.QueryString["INDEX_ID"]);

IList<fixassetconfigurationdto> _FIXAssetConfigurationDTOList = new List<fixassetconfigurationdto>();
IFIXAssetDepreciationService _IFIXAssetDepreciationService = serviceUtil.GetServiceProxy<ifixassetdepreciationservice>();
_FIXAssetConfigurationDTOList = _IFIXAssetDepreciationService.LoadFixAssetConfigurationDetails(0, LOGIN_DETAILS.LoginCompanyID);
if (_FIXAssetConfigurationDTOList.Count > 0)
{
if (_FIXAssetConfigurationDTOList[0].RequestedByMandatory == 16)
{
Page.RegisterHiddenField("hdnRequestedBy", "true");
}
else if (_FIXAssetConfigurationDTOList[0].RequestedByMandatory == 17)
{
Page.RegisterHiddenField("hdnRequestedBy", "false");
}
}
else
{
Page.RegisterHiddenField("hdnRequestedBy", "false");
}
if (IndexId != 0)
{

ViewState["EQPHiredWorkOrderRequestID"] = Convert.ToString(IndexId);
LoadHiredWorkOrderRequestDetails(IndexId);

}
else
{
ViewState["EQPHiredWorkOrderRequestID"] = "0";
string WORequestNo = GetWORequestNo();
Page.RegisterHiddenField("hdnWORequestNo", WORequestNo.ToString());
SetButtons(new EQPHiredWorkOrderRequestDTO());
}

}
}

# region Load controls

private void LoadProjects() //COMProjectCommonInWO_Equipment_ProjectMapped2User
{
Dictionary<string, object=""> filterParameters = new Dictionary<string, object="">();
filterParameters.Add("CompID", Convert.ToInt16(LOGIN_DETAILS.LoginCompanyID));
filterParameters.Add("SysUserID", Convert.ToInt16(LOGIN_DETAILS.LoginUserID));
filterParameters.Add("FromRequest", true);
cddProject.MenuDropDownEnum = MenuDropDownEnum.COMProjectCommonInWO;
cddProject.ModuleEnum = ModuleEnum.Equipment;
cddProject.PageEnum = PageEnum.ProjectMapped2User;
cddProject.FilterParameters = filterParameters;

cddProject.LoadData();
}


private void LoadEmployee(Int16 COMProjectID) //HRAFirstName_Equipment_EQPEmployee
{
Dictionary<string, object=""> filterParameters = new Dictionary<string, object="">();
filterParameters.Add("COMCompanyID", Convert.ToInt16(LOGIN_DETAILS.LoginCompanyID));
filterParameters.Add("COMProjectID", Convert.ToInt16(COMProjectID));
CddReqstdBy.MenuDropDownEnum = MenuDropDownEnum.HRAFirstName;
CddReqstdBy.ModuleEnum = ModuleEnum.Equipment;
CddReqstdBy.PageEnum = PageEnum.EQPEmployee;
CddReqstdBy.FilterParameters = filterParameters;
CddReqstdBy.LoadData();
}

private void LoadMaterialCategory(Int32 LookupID)
{
Int16 SYSUserID = 0;
Int16 COMCompanyID = 0;
Dictionary<string, object=""> FilterCriteriasForGroup = new Dictionary<string, object="">();
FilterCriteriasForGroup.Add("ItemTypeID", LookupID);
FilterCriteriasForGroup.Add("SYSUserID", SYSUserID);
FilterCriteriasForGroup.Add("COMCompanyID", COMCompanyID);
cddlMaterialCategory.FilterParameters = FilterCriteriasForGroup;
cddlMaterialCategory.PageEnum = PageEnum.Common;
cddlMaterialCategory.ModuleEnum = ModuleEnum.Common;
cddlMaterialCategory.MenuDropDownEnum = MenuDropDownEnum.COMItemGroupLinkedWithUser;
cddlMaterialCategory.LoadData();
}

private void LoadMaterialGroup()
{
Dictionary<string, object=""> FilterCriteriasForGroup = new Dictionary<string, object="">();
FilterCriteriasForGroup.Add("ItemCatID", Convert.ToInt16(cddlMaterialCategory.SelectedValue));
cddItemGroup.FilterParameters = FilterCriteriasForGroup;
cddItemGroup.PageEnum = PageEnum.CommonItemDefinition;
cddItemGroup.ModuleEnum = ModuleEnum.Common;
cddItemGroup.MenuDropDownEnum = MenuDropDownEnum.cddItemGroupPOP;
cddItemGroup.LoadData();
}

# endregion Load controls


# region SelectedIndexChanged

protected void CddProject_SelectedIndexChanged(object sender, EventArgs e)
{
if (cddProject.SelectedValue != "")
{
GetWORequestNo();

}
}


protected void ddlAssetUOM_SelectedIndexChange(object sender, EventArgs e)
{
//DropDownList Bi = (DropDownList)sender;
//CellItem cc = (CellItem)Bi.NamingContainer;
//UltraGridRow row = cc.Cell.Row;
//Int32 UOMID = Convert.ToInt32(row.Cells.FromKey("KeyUoM").Value);
//if (UOMID != 0)
// row.Cells.FromKey("KeyUOMID").Value = row.Cells.FromKey("KeyUoM").Value;
}


protected void ddlUsageUOM_SelectedIndexChange(object sender, EventArgs e)
{


}

void cddlMaterialCategory_SelectedIndexChanged(object sender, EventArgs e)
{
LoadMaterialGroup();
}

void PagingControler1_PageSelectedIndexChanged(object sender, EventArgs e)
{
FillItemDetailsPOPUP();
}

void PagingControler1_RecordSizeSelectedIndexChanged(object sender, EventArgs e)
{
FillItemDetailsPOPUP();
}

//Displays Designation to label when Employee is selected
protected void cddReqstBySelectedIndexChanged(object sender, EventArgs e)
{
Int32 employee = Convert.ToInt32(CddReqstdBy.SelectedValue);
String p = "";
IHRMSHRActivityService _IHRMSHRActivityService = serviceUtil.GetServiceProxy<ihrmshractivityservice>();
HRAEmployeeDefinitionDTO _HRAEmployeeDefinitionDTO = _IHRMSHRActivityService.LoadHRAEmployeeById(employee, p);
lbl_Designation.Text = _HRAEmployeeDefinitionDTO.Designation;
}
protected void rbItemType_SelectedIndexChanged(object sender, EventArgs e)
{
Int32 LookupID=Convert.ToInt32(rbItemType.SelectedItem.Value);
LoadMaterialCategory(LookupID);
}

# endregion SelectedIndexChanged


# region ClickEvents
protected void BTNSave_Click(object sender, EventArgs e)
{
EQPHiredWorkOrderRequestDTO _EQPHiredWorkOrderRequestDTO = new EQPHiredWorkOrderRequestDTO();
_EQPHiredWorkOrderRequestDTO = GetHiredWorkOrderRequest();
DefaultResponseDTO _DefaultResponseDTO = new DefaultResponseDTO();

try
{
if (ValidateSave())
{
_DefaultResponseDTO = serviceUtil.GetServiceProxy<ieqpequipmentservice>().SaveEQPHiredWorkOrderRequest(_EQPHiredWorkOrderRequestDTO);

ShowQBox(_DefaultResponseDTO.MessageList);

if (_DefaultResponseDTO.KeyId > 0)
{
ViewState["EQPHiredWorkOrderRequestID"] = _DefaultResponseDTO.KeyId;
LoadHiredWorkOrderRequestDetails(Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]));

}
}
}
catch (FaultException<businessfault> fe)
{
BusinessFault bf = (BusinessFault)fe.Detail;
MessageList messageList = bf.MessageList;
ShowQBox(messageList);
}

}

protected void wibDelete_Click(object sender, EventArgs e)
{
if (ViewState["EQPHiredWorkOrderRequestID"] != null)
{
try
{
IEQPEquipmentService _IEQPEquipmentService = serviceUtil.GetServiceProxy<ieqpequipmentservice>();
DefaultResponseDTO _DefaultResponseDTO = _IEQPEquipmentService.DeleteHiredWORequest(Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]));
if (_DefaultResponseDTO.KeyId != 0)
{
ViewState["EQPHiredWorkOrderRequestID"] = _DefaultResponseDTO.KeyId;
LoadHiredWorkOrderRequestDetails(Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]));

}
ShowQBox(_DefaultResponseDTO.MessageList);


}
catch (FaultException<businessfault> fe)
{
BusinessFault bf = (BusinessFault)fe.Detail;
MessageList messageList = bf.MessageList;
ShowQBox(bf.MessageList);

}
}
}

protected void BTNCancel_Click(object sender, EventArgs e)
{
String NewButtonURL = "../Equipment/Equipment.aspx?REDIRECT_URL=EQPHiredWorkOrderRequestSearch.aspx";
Response.Write("");
Response.Write("parent.location.href='" + NewButtonURL + "';");
Response.Write("");
Response.End();
}

protected void btnAddAsset_Click(object sender, EventArgs e)
{
String jsCodeItem = "OpenItemPOPUP();";
CallBackManager.AddScriptBlock(this, null, jsCodeItem);
//LoadAssets();
}

public void wibSubmit_Click(object sender, EventArgs e)
{
IEQPEquipmentService _IEQPEquipmentService = serviceUtil.GetServiceProxy<ieqpequipmentservice>();
IList MessageList = new MessageList();
try
{
IList<eqphiredworkorderrequestdto> _EQPHiredWorkOrderRequestDTOList = new List<eqphiredworkorderrequestdto>();
_EQPHiredWorkOrderRequestDTOList.Add(GetHiredWorkOrderRequest());


if (_EQPHiredWorkOrderRequestDTOList != null)
{
EQPHiredWorkOrderRequestTransitionableDTO _EQPHiredWorkOrderRequestTransitionableDTO = new EQPHiredWorkOrderRequestTransitionableDTO();
_EQPHiredWorkOrderRequestTransitionableDTO.DomainElementActionEnum = DomainElementActionEnum.Submit;
_EQPHiredWorkOrderRequestTransitionableDTO.DomainElementEnum = DomainElementEnum.EQPHiredWORequest;
_EQPHiredWorkOrderRequestTransitionableDTO.EQPHiredWorkOrderRequestDTOList = _EQPHiredWorkOrderRequestDTOList;

using (OperationContextScope Scope = new OperationContextScope((IContextChannel)_IEQPEquipmentService))
{
MessageHeaderUtil.AddCustomHeader(Session);
IList _MessageList = _IEQPEquipmentService.SubmitEQPHiredWORequest(_EQPHiredWorkOrderRequestTransitionableDTO);
foreach (MessageInfo _MessageInfo in _MessageList)
{
MessageList.Add(_MessageInfo);

}
}
//ScreenLock();
ShowQBox(MessageList);
if (Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]) > 0)
LoadHiredWorkOrderRequestDetails(Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]));
}
}


catch (FaultException<businessfault> fe)
{
BusinessFault bf = (BusinessFault)fe.Detail;
MessageList messagelist = bf.MessageList;
ShowQBox(messagelist);
}
}

public void wibApprove_Click(object sender, EventArgs e)
{
IEQPEquipmentService _IEQPEquipmentService = serviceUtil.GetServiceProxy<ieqpequipmentservice>();
IList MessageList = new MessageList();

try
{
IList<eqphiredworkorderrequestdto> _EQPHiredWorkOrderRequestDTOList = new List<eqphiredworkorderrequestdto>();
_EQPHiredWorkOrderRequestDTOList.Add(GetHiredWorkOrderRequest());


if (_EQPHiredWorkOrderRequestDTOList != null)
{
EQPHiredWorkOrderRequestTransitionableDTO _EQPHiredWorkOrderRequestTransitionableDTO = new EQPHiredWorkOrderRequestTransitionableDTO();
_EQPHiredWorkOrderRequestTransitionableDTO.DomainElementActionEnum = DomainElementActionEnum.Approve;
_EQPHiredWorkOrderRequestTransitionableDTO.DomainElementEnum = DomainElementEnum.EQPHiredWORequest;
_EQPHiredWorkOrderRequestTransitionableDTO.EQPHiredWorkOrderRequestDTOList = _EQPHiredWorkOrderRequestDTOList;

using (OperationContextScope Scope = new OperationContextScope((IContextChannel)_IEQPEquipmentService))
{
MessageHeaderUtil.AddCustomHeader(Session);
IList _MessageList = _IEQPEquipmentService.ApproveEQPHiredWORequest(_EQPHiredWorkOrderRequestTransitionableDTO);
foreach (MessageInfo _MessageInfo in _MessageList)
{
MessageList.Add(_MessageInfo);

}
}
//ScreenLock();
if (Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]) > 0)
LoadHiredWorkOrderRequestDetails(Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]));
ShowQBox(MessageList);
}
}
catch (FaultException<businessfault> fe)
{
BusinessFault bf = (BusinessFault)fe.Detail;
MessageList messagelist = bf.MessageList;
ShowQBox(messagelist);
}

}

public void wibRevokeValidate_Click(object sender, EventArgs e)
{


//if (IsMaxBillNoForHiredWorkOrder())
//{
string jscode = "OpenRevokePopUpWDW();";
CallBackManager.AddScriptBlock(this, null, jscode);
//}
//else
//{
// MessageList messageList = new MessageList();
// //string msg = "Last Bill Entry can only be Revoked";
// messageList.Add(new MessageInfo(EQPWebMessageKEYS.REVOK_ONLYLAST_BILL, AlertMessageTypeEnum.Info));
// ShowQBox(messageList);

// wibSave.Enabled = false;
// wibSubmit.Enabled = false;

//}

}

public void wibRevoke_Click(object sender, EventArgs e)
{
IEQPEquipmentService _IEQPEquipmentService = serviceUtil.GetServiceProxy<ieqpequipmentservice>();
IList MessageList = new MessageList();

try
{
IList<eqphiredworkorderrequestdto> _EQPHiredWorkOrderRequestDTOList = new List<eqphiredworkorderrequestdto>();
_EQPHiredWorkOrderRequestDTOList.Add(GetHiredWorkOrderRequest());

Boolean _WODone = false;
_WODone = serviceUtil.GetServiceProxy<ieqpequipmentservice>().CheckIfWOExists4WORequest(Convert.ToInt32(_EQPHiredWorkOrderRequestDTOList.First().Id));
if (!_WODone)
{
if (_EQPHiredWorkOrderRequestDTOList != null)
{
EQPHiredWorkOrderRequestTransitionableDTO _EQPHiredWorkOrderRequestTransitionableDTO = new EQPHiredWorkOrderRequestTransitionableDTO();
_EQPHiredWorkOrderRequestTransitionableDTO.DomainElementActionEnum = DomainElementActionEnum.Revoke;
_EQPHiredWorkOrderRequestTransitionableDTO.DomainElementEnum = DomainElementEnum.EQPHiredWORequest;
_EQPHiredWorkOrderRequestTransitionableDTO.EQPHiredWorkOrderRequestDTOList = _EQPHiredWorkOrderRequestDTOList;


using (OperationContextScope Scope = new OperationContextScope((IContextChannel)_IEQPEquipmentService))
{
MessageHeaderUtil.AddCustomHeader(Session);
IList _MessageList = _IEQPEquipmentService.RevokeEQPHiredWORequest(_EQPHiredWorkOrderRequestTransitionableDTO);
foreach (MessageInfo _MessageInfo in _MessageList)
{
MessageList.Add(_MessageInfo);

}
}
//ScreenLock();
if (Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]) > 0)
LoadHiredWorkOrderRequestDetails(Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]));
ShowQBox(MessageList);
}
}
else
{
MessageList m = new MessageList();
m.Add(new MessageInfo(EquipmentKEYS.WorkOrder_Done_For_Request, AlertMessageTypeEnum.Info));
ShowQBox(m);


}
}
catch (FaultException<businessfault> fe)
{
BusinessFault bf = (BusinessFault)fe.Detail;
MessageList messagelist = bf.MessageList;
ShowQBox(messagelist);
}

}
public void wibReject_Click(object sender, EventArgs e)
{

IEQPEquipmentService _IEQPEquipmentService = serviceUtil.GetServiceProxy<ieqpequipmentservice>();
IList MessageList = new MessageList();

try
{

IList<eqphiredworkorderrequestdto> _EQPHiredWorkOrderRequestDTOList = new List<eqphiredworkorderrequestdto>();
_EQPHiredWorkOrderRequestDTOList.Add(GetHiredWorkOrderRequest());

_EQPHiredWorkOrderRequestDTOList.ToList().ForEach(dto => { dto.IsActionReject = true; });
if (_EQPHiredWorkOrderRequestDTOList != null)
{

EQPHiredWorkOrderRequestTransitionableDTO _EQPHiredWorkOrderRequestTransitionableDTO = new EQPHiredWorkOrderRequestTransitionableDTO();
_EQPHiredWorkOrderRequestTransitionableDTO.DomainElementActionEnum = DomainElementActionEnum.Approve;
_EQPHiredWorkOrderRequestTransitionableDTO.DomainElementEnum = DomainElementEnum.EQPHiredWORequest;
_EQPHiredWorkOrderRequestTransitionableDTO.EQPHiredWorkOrderRequestDTOList = _EQPHiredWorkOrderRequestDTOList;

using (OperationContextScope Scope = new OperationContextScope((IContextChannel)_IEQPEquipmentService))
{
MessageHeaderUtil.AddCustomHeader(Session);
IList _MessageList = _IEQPEquipmentService.ApproveEQPHiredWORequest(_EQPHiredWorkOrderRequestTransitionableDTO);
foreach (MessageInfo _MessageInfo in _MessageList)
{
MessageList.Add(_MessageInfo);

}
}
//ScreenLock();
if (Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]) > 0)
LoadHiredWorkOrderRequestDetails(Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]));
ShowQBox(MessageList);
}
}
catch (FaultException<businessfault> fe)
{
BusinessFault bf = (BusinessFault)fe.Detail;
MessageList messagelist = bf.MessageList;
ShowQBox(messagelist);
}
}

void PagingControler1_PreviousOnClick(object sender, EventArgs e)
{
FillItemDetailsPOPUP();
}

void PagingControler1_NextOnClick(object sender, EventArgs e)
{
FillItemDetailsPOPUP();
}

protected void wib_ITEMPOPUP_Search_Click(object sender, ButtonEventArgs e)
{
FillItemDetailsPOPUP();
String jsCodeItem = "OpenItemPOPUP();";
CallBackManager.AddScriptBlock(this, null, jsCodeItem);
}

protected void wib_ITEMPOPUP_Clear_Click(object sender, ButtonEventArgs e)
{
//ClearControls();
FillItemDetailsPOPUP();
}

protected void wib_ITEMPOPUP_Add_Click(object sender, ButtonEventArgs e)
{

AddToGrid();
}

protected void wib_ITEMPOPUP_Finsh_Click(object sender, ButtonEventArgs e)
{
String jsCodeItem = "CloseItemPOPUP();";
CallBackManager.AddScriptBlock(this, null, jsCodeItem);
}

protected void uwgWORequestDetails_InitializeRow(object sender, RowEventArgs e)
{
UltraGridRow row = e.Row;
FillddlUoM(row);
EQPHiredWorkOrderRequestDetailsDTO _EQPHiredWorkOrderRequestDetailsDTO = (EQPHiredWorkOrderRequestDetailsDTO)e.Data;
//if (Convert.ToDecimal(row.Cells.FromKey("KeyAssetUOMID").Value) != 0)
if (_EQPHiredWorkOrderRequestDetailsDTO.AssetUOMID>0)
{
DropDownList ddlAssetUOM = (DropDownList)GetRowObject(row, "ddlAssetUOM", "KeyAssetUOM");
ddlAssetUOM.SelectedValue = Convert.ToString(_EQPHiredWorkOrderRequestDetailsDTO.AssetUOMID);//Convert.ToString(row.Cells.FromKey("KeyAssetUOMID").Value);
}
if (_EQPHiredWorkOrderRequestDetailsDTO.UsageUOMID> 0)
{
DropDownList ddlUsageUOM = (DropDownList)GetRowObject(row, "ddlUsageUOM", "KeyUsageUOM");
ddlUsageUOM.SelectedValue = Convert.ToString(_EQPHiredWorkOrderRequestDetailsDTO.UsageUOMID);
}
//if (Convert.ToDateTime(row.Cells.FromKey("KeyNeedByDate").Value) != DateTime.MinValue)
//{
// WebDateChooser wdcNeedByDate = (WebDateChooser)GetRowObject(row, "wdcNeedByDate", "KeyNeedByDate");
// wdcNeedByDate.Value = Convert.ToString(row.Cells.FromKey("KeyNeedByDate").Value);
//}

}



# endregion ClickEvents


# region Private Methods

private void LoadAssets()
{
FillItemDetailsPOPUP();

}

private void FillItemDetailsPOPUP()
{
//PURRequestDetailsDTO _PURRequestDetailsDTO = (PURRequestDetailsDTO)Session["PurRequestDetails"];
uwgItem.ResetRows();
Quadra.Suite.Common.Item.ItemDefinitionDTO _ItemDefinitionDTO = new Quadra.Suite.Common.Item.ItemDefinitionDTO();
_ItemDefinitionDTO.ItemDescription = txtSearch.Text;
if (cddItemGroup.SelectedValue != "0" && cddItemGroup.SelectedValue != null)
{
_ItemDefinitionDTO.COMItemGroupID = Convert.ToInt16(cddItemGroup.SelectedValue);
}
if (cddlMaterialCategory.SelectedValue != "0" && cddlMaterialCategory.SelectedValue != null)
{
_ItemDefinitionDTO.COMItemCategoryID = Convert.ToInt16(cddlMaterialCategory.SelectedValue);
}
_ItemDefinitionDTO.PageNumber = PagingControler1.PageNumber;
_ItemDefinitionDTO.PageSize = PagingControler1.PageSize;
_ItemDefinitionDTO.SortExpression = PagingControler1.SortExpression;
_ItemDefinitionDTO.ItemType =Convert.ToString(rbItemType.SelectedItem.Text);
_ItemDefinitionDTO.COMCompanyID= Convert.ToInt16(LOGIN_DETAILS.LoginCompanyID);
//_ItemDefinitionDTO.COMProjectID = _PURRequestDetailsDTO.COMProjectID;
//_ItemDefinitionDTO.COMSubProjectID = _PURRequestDetailsDTO.comsubprojectID;
//_ItemDefinitionDTO.ItemType = LookUpDataEnum.Capital.ToString();
//if (wdcTrDate.Value != null)
// _ItemDefinitionDTO.RequestedDate = Convert.ToDateTime(wdcTrDate.Value);
//else

_ItemDefinitionDTO.RequestedDate = DateTime.Now.Date;
_ItemDefinitionDTO.BudgetCheckingConfigVal = "";
IPaginable _PaginableResponseDTO = serviceUtil.GetServiceProxy<ipurrequestservice>().GetItemDetailsForPagingForcapital(_ItemDefinitionDTO);
List<quadra.suite.common.item.itemdefinitiondto> _ItemDefinitionDTOList = (List<quadra.suite.common.item.itemdefinitiondto>)_PaginableResponseDTO.ReturnList;
if (_ItemDefinitionDTOList.Count != 0)
{
uwgItem.DataSource = _ItemDefinitionDTOList;
uwgItem.DataBind();
PagingControler1.TotalPageCount = _PaginableResponseDTO.RecordCount;
PagingControler1.Execute();
}
}


private Int32 GetCOMLookupIdForItemType()
{
Int32 LookupId = 0;
ICOMWBSService _ICOMWBSService = serviceUtil.GetServiceProxy<icomwbsservice>();

LookupId = _ICOMWBSService.GetComLookUpIDByCategoryAndLookUpData(LookUpCategoryEnum.ItemType, LookUpDataEnum.Capital);
return LookupId;
}

protected void AddToGrid()
{

# region Add Popup to main grid

IList<eqphiredworkorderrequestdetailsdto> EQPHiredWorkOrderRequestDetailsDTOList = new List<eqphiredworkorderrequestdetailsdto>();


// String FIXAssetCategory = Convert.ToString(EquipmentCategory.SelectedText);
// Int32 FIXAssetCategoryId = Convert.ToInt32(EquipmentCategory.SelectedValue);

foreach (UltraGridRow row in uwgWORequestDetails.Rows)
{
//FillddlUoM(row);
EQPHiredWorkOrderRequestDetailsDTO _EQPHiredWorkOrderRequestDetailsDTO = new EQPHiredWorkOrderRequestDetailsDTO();
_EQPHiredWorkOrderRequestDetailsDTO.EQPHiredWorkOrderRequestDetailsID = Convert.ToInt32(row.Cells.FromKey("KeyId").Value);
_EQPHiredWorkOrderRequestDetailsDTO.EQPHiredWorkOrderRequestID = Convert.ToInt32(row.Cells.FromKey("KeyEQPHiredWorkOrderRequestID").Value);
_EQPHiredWorkOrderRequestDetailsDTO.COMItemDefinitionID = Convert.ToInt32(row.Cells.FromKey("KeyCOMItemDefinitionID").Value);
_EQPHiredWorkOrderRequestDetailsDTO.COMItemDefinition = Convert.ToString(row.Cells.FromKey("KeyCOMItemDefinition").Value);
DropDownList ddlAssetUOM = (DropDownList)GetRowObject(row, "ddlAssetUOM", "KeyAssetUOM");
DropDownList ddlUsageUOM = (DropDownList)GetRowObject(row, "ddlUsageUOM", "KeyUsageUOM");
_EQPHiredWorkOrderRequestDetailsDTO.AssetUOMID = Convert.ToInt16(ddlAssetUOM.SelectedValue);
_EQPHiredWorkOrderRequestDetailsDTO.UsageUOMID = Convert.ToInt16(ddlUsageUOM.SelectedValue);
_EQPHiredWorkOrderRequestDetailsDTO.AssetQty = Convert.ToDecimal(row.Cells.FromKey("KeyAssetQty").Value);
_EQPHiredWorkOrderRequestDetailsDTO.UsageQty = Convert.ToDecimal(row.Cells.FromKey("KeyUsageQty").Value);
_EQPHiredWorkOrderRequestDetailsDTO.NeedByDate = Convert.ToDateTime(row.Cells.FromKey("KeyNeedByDate").Value);

EQPHiredWorkOrderRequestDetailsDTOList.Add(_EQPHiredWorkOrderRequestDetailsDTO);


}


//Commented for itemsearch


foreach (UltraGridRow row1 in uwgItem.Rows)
{
int cnt = 0;
CheckBox ChkItems = (CheckBox)GetRowObject(row1, "chkSelect", "KeyItemCheckBox");

EQPHiredWorkOrderRequestDetailsDTO _EQPHiredWorkOrderRequestDetailsDTO = new EQPHiredWorkOrderRequestDetailsDTO();
if (ChkItems.Checked == true)
{
_EQPHiredWorkOrderRequestDetailsDTO.COMItemDefinitionID = Convert.ToInt32(row1.Cells.FromKey("KeyCOMItemDefinitionID").Value);
_EQPHiredWorkOrderRequestDetailsDTO.COMItemDefinition = Convert.ToString(row1.Cells.FromKey("KeyItemDescription").Value);
if (Convert.ToInt16(row1.Cells.FromKey("KeyUsageUOMID").Value) != 0)
{
_EQPHiredWorkOrderRequestDetailsDTO.UsageUOMID = Convert.ToInt16(row1.Cells.FromKey("KeyUsageUOMID").Value);
_EQPHiredWorkOrderRequestDetailsDTO.UsageUOM = Convert.ToString(row1.Cells.FromKey("KeyItemUnit").Value);
}
if (Convert.ToDecimal(row1.Cells.FromKey("KeyCOMItemUnitID").Value) != 0)
{
_EQPHiredWorkOrderRequestDetailsDTO.AssetUOMID = Convert.ToInt16(row1.Cells.FromKey("KeyCOMItemUnitID").Value);
_EQPHiredWorkOrderRequestDetailsDTO.AssetUOM = Convert.ToString(row1.Cells.FromKey("KeyUOM").Value);
}


if (uwgWORequestDetails.Rows.Count > 0)
{
foreach (UltraGridRow row2 in uwgWORequestDetails.Rows)
{
if (Convert.ToInt32(row2.Cells.FromKey("KeyCOMItemDefinitionID").Value) == _EQPHiredWorkOrderRequestDetailsDTO.COMItemDefinitionID)
{
cnt++;
break;
}
}
SetRownumbersWORequest();
}


if (cnt < 1)
{
EQPHiredWorkOrderRequestDetailsDTOList.Add(_EQPHiredWorkOrderRequestDetailsDTO);

}


}


}


if (EQPHiredWorkOrderRequestDetailsDTOList.Count > 0)
{
uwgWORequestDetails.DataSource = EQPHiredWorkOrderRequestDetailsDTOList;
uwgWORequestDetails.DataBind();

SetRownumbersWORequest();
}
//foreach (UltraGridRow row in uwgWORequestDetails.Rows)
//{
// //if (Convert.ToDecimal(row.Cells.FromKey("KeyTax").Value) != 0)
// //{
// // CheckBox chkSelect = (CheckBox)GetRowObject(row, "chkSelect", "KeyCheckBox");
// // chkSelect.Checked = false;
// // chkSelect.Enabled = false;
// //}


// if (Convert.ToDecimal(row.Cells.FromKey("KeyAssetUOMID").Value) != 0)
// {
// DropDownList ddlAssetUOM = (DropDownList)GetRowObject(row, "ddlAssetUOM", "KeyAssetUOM");
// ddlAssetUOM.SelectedValue = Convert.ToString(row.Cells.FromKey("KeyAssetUOMID").Value);
// }
// if (Convert.ToDecimal(row.Cells.FromKey("KeyUsageUOMID").Value) != 0)
// {
// DropDownList ddlUsageUOM = (DropDownList)GetRowObject(row, "ddlUsageUOM", "KeyUsageUOM");
// ddlUsageUOM.SelectedValue = Convert.ToString(row.Cells.FromKey("KeyUsageUOMID").Value);
// }

//}

# endregion Add Popup to main grid

}

private IList<combosearchresultdto> getMenuPopulatorSearchResultList(MenuDropDownEnum _MenuDropDownEnum, ModuleEnum _ModuleEnum, PageEnum _PageEnum, Dictionary<string, object=""> FilterParameters)
{
Dictionary<string, object=""> requestParams = new Dictionary<string, object="">();
MenuPopulatorRequestDTO menuPopulatorRequestDTO = new MenuPopulatorRequestDTO();
menuPopulatorRequestDTO.MenuDropDownEnum = _MenuDropDownEnum;
menuPopulatorRequestDTO.ModuleEnum = _ModuleEnum;
menuPopulatorRequestDTO.PageEnum = _PageEnum;

if (FilterParameters != null)
{
foreach (KeyValuePair<string, object=""> pair in FilterParameters)
{
menuPopulatorRequestDTO.addAddtionalData(pair.Key.ToString(), pair.Value);
}
}

//directly calling service
IMenuPopulatorService MenuPopulatorServiceProxy =
serviceUtil.GetServiceProxy<imenupopulatorservice>("MenuPopulatorServiceEndpoint");
IList<combosearchresultdto> resultList =
(IList<combosearchresultdto>)MenuPopulatorServiceProxy.LoadMenuDropDownData(menuPopulatorRequestDTO);

return resultList;
}

private void FillddlUoM(UltraGridRow row)
{
ValueList vl = new ValueList(true);

IList<combosearchresultdto> resultDTOList =
getMenuPopulatorSearchResultList(MenuDropDownEnum.EquipmentMetrics, ModuleEnum.Equipment,
PageEnum.EquipmentMetrics, null);

//UltraGridRow row = e.Row;
DropDownList _ddlAssetUOMID = (DropDownList)GetRowObject(row, "ddlAssetUOM", "KeyAssetUOM");
FillDropDown(_ddlAssetUOMID, resultDTOList);
DropDownList ddlUsageUOMID = (DropDownList)GetRowObject(row, "ddlUsageUOM", "KeyUsageUOM");
FillDropDown(ddlUsageUOMID, resultDTOList);

}

private void FillDropDown(DropDownList _DropDownList, IList<combosearchresultdto> resultDTOList)
{

_DropDownList.DataSource = resultDTOList;
_DropDownList.DataTextField = "ColumnValue";
_DropDownList.DataValueField = "ID";
_DropDownList.DataBind();
ListItem li = new ListItem(" ", "0");
_DropDownList.Items.Insert(0, li);
for (int i = 0; i < _DropDownList.Items.Count; i++)
{
_DropDownList.Items[i].Attributes.Add("title", _DropDownList.Items[i].Text);
}
}

private void SetRownumbersWORequest()
{
int i = 1;

foreach (UltraGridRow row in uwgWORequestDetails.Rows)
{
row.Cells.FromKey("KeySerialNo").Value = i;
i++;
}
}


private EQPHiredWorkOrderRequestDTO GetHiredWorkOrderRequest()
{
EQPHiredWorkOrderRequestDTO _EQPHiredWorkOrderRequestDTO = new EQPHiredWorkOrderRequestDTO();


if (Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]) > 0)
{
_EQPHiredWorkOrderRequestDTO.Id = Convert.ToInt32(ViewState["EQPHiredWorkOrderRequestID"]);
}
_EQPHiredWorkOrderRequestDTO.COMEnterpriseID = 1;
_EQPHiredWorkOrderRequestDTO.COMBranchID = Convert.ToInt16(LOGIN_DETAILS.COMBranchID);
_EQPHiredWorkOrderRequestDTO.COMCompanyID = Convert.ToInt16(LOGIN_DETAILS.LoginCompanyID);
_EQPHiredWorkOrderRequestDTO.ProjectID = Convert.ToInt16(cddProject.SelectedValue);
_EQPHiredWorkOrderRequestDTO.RequestedById = Convert.ToInt32(CddReqstdBy.SelectedValue);
_EQPHiredWorkOrderRequestDTO.RequestNo = txtRequestNo.Text;
_EQPHiredWorkOrderRequestDTO.ItemTypeID = Convert.ToInt32(rbItemType.SelectedValue);
if (Convert.ToString(wdcReqstDate.Value) != "")
{
_EQPHiredWorkOrderRequestDTO.RequestDate = Convert.ToDateTime(wdcReqstDate.Value);
}

_EQPHiredWorkOrderRequestDTO.EQPHiredWorkOrderRequestDetailsDTOList = GetHiredWorkOrderRequestDetails();

_EQPHiredWorkOrderRequestDTO.Remarks = txtRemarks.Text;
_EQPHiredWorkOrderRequestDTO.Status = "Created";
_EQPHiredWorkOrderRequestDTO.CreatedDate = Convert.ToDateTime(DateTime.Now);
_EQPHiredWorkOrderRequestDTO.SysuserID = Convert.ToInt16(LOGIN_DETAILS.LoginUserID );
//SetButtons(_FIXAssetRentingBillEntryDTO);
if (txtRequestNo.ReadOnly)
{
_EQPHiredWorkOrderRequestDTO.IsAutoSerialNo = true;
}
else
{
_EQPHiredWorkOrderRequestDTO.IsAutoSerialNo = false;
}
return _EQPHiredWorkOrderRequestDTO;
}


private IList<eqphiredworkorderrequestdetailsdto> GetHiredWorkOrderRequestDetails()
{
IList<eqphiredworkorderrequestdetailsdto> _EQPHiredWorkOrderRequestDetailsDTOList = new List<eqphiredworkorderrequestdetailsdto>();

foreach (UltraGridRow row in uwgWORequestDetails.Rows)
{
EQPHiredWorkOrderRequestDetailsDTO _EQPHiredWorkOrderRequestDetailsDTO = new EQPHiredWorkOrderRequestDetailsDTO();

if (Convert.ToInt32(row.Cells.FromKey("KeyId").Value) > 0)
{
_EQPHiredWorkOrderRequestDetailsDTO.EQPHiredWorkOrderRequestDetailsID = Convert.ToInt32(row.Cells.FromKey("KeyId").Value);
}


if (Convert.ToInt32(row.Cells.FromKey("KeyEQPHiredWorkOrderRequestID").Value) > 0)
{
_EQPHiredWorkOrderRequestDetailsDTO.EQPHiredWorkOrderRequestID= Convert.ToInt32(row.Cells.FromKey("KeyEQPHiredWorkOrderRequestID").Value);
}

if (Convert.ToInt32(row.Cells.FromKey("KeyCOMItemDefinitionID").Value) > 0)
{
_EQPHiredWorkOrderRequestDetailsDTO.COMItemDefinitionID = Convert.ToInt32(row.Cells.FromKey("KeyCOMItemDefinitionID").Value);
}

//if (Convert.ToInt32(row.Cells.FromKey("KeyAssetUOMID").Value) > 0)
//{
// _EQPHiredWorkOrderRequestDetailsDTO.AssetUOMID = Convert.ToInt32(row.Cells.FromKey("KeyAssetUOMID").Value);
//}
//if (Convert.ToInt32(row.Cells.FromKey("KeyUsageUOMID").Value) > 0)
//{
// _EQPHiredWorkOrderRequestDetailsDTO.UsageUOMID = Convert.ToInt32(row.Cells.FromKey("KeyUsageUOMID").Value);
//}
DropDownList _ddlAssetUOMID = (DropDownList)GetRowObject(row, "ddlAssetUOM", "KeyAssetUOM");
_EQPHiredWorkOrderRequestDetailsDTO.AssetUOMID = Convert.ToInt16(_ddlAssetUOMID.SelectedValue);

DropDownList ddlUsageUOMID = (DropDownList)GetRowObject(row, "ddlUsageUOM", "KeyUsageUOM");
_EQPHiredWorkOrderRequestDetailsDTO.UsageUOMID = Convert.ToInt16(ddlUsageUOMID.SelectedValue);


if (Convert.ToInt32(row.Cells.FromKey("KeyAssetQty").Value) > 0)
{
_EQPHiredWorkOrderRequestDetailsDTO.AssetQty = Convert.ToInt32(row.Cells.FromKey("KeyAssetQty").Value);
}
if (Convert.ToInt32(row.Cells.FromKey("KeyUsageQty").Value) > 0)
{
_EQPHiredWorkOrderRequestDetailsDTO.UsageQty = Convert.ToInt32(row.Cells.FromKey("KeyUsageQty").Value);
}
if( row.Cells.FromKey("KeyNeedByDate").Value != null)
_EQPHiredWorkOrderRequestDetailsDTO.NeedByDate = Convert.ToDateTime(row.Cells.FromKey("KeyNeedByDate").Value);

_EQPHiredWorkOrderRequestDetailsDTOList.Add(_EQPHiredWorkOrderRequestDetailsDTO);

}
return _EQPHiredWorkOrderRequestDetailsDTOList;
}

private void LoadHiredWorkOrderRequestDetails(Int32 EQPHiredWorkOrderRequestID)
{
if (EQPHiredWorkOrderRequestID != 0)
{
EQPHiredWorkOrderRequestDTO _EQPHiredWorkOrderRequestDTO = serviceUtil.GetServiceProxy<ieqpequipmentservice>().LoadEQPHiredWorkOrderRequest(Convert.ToInt32(EQPHiredWorkOrderRequestID));

txtRequestNo.Text = Convert.ToString(_EQPHiredWorkOrderRequestDTO.RequestNo);

if (_EQPHiredWorkOrderRequestDTO.RequestDate != null)
wdcReqstDate.Value = Convert.ToDateTime(_EQPHiredWorkOrderRequestDTO.RequestDate);

LoadProjects();
LoadEmployee(Convert.ToInt16("0"));
cddProject.SelectedValue = Convert.ToString(_EQPHiredWorkOrderRequestDTO.ProjectID);

//if (_EQPHiredWorkOrderRequestDTO.ProjectID > 0)
//{
//LoadEmployee(Convert.ToInt16(_EQPHiredWorkOrderRequestDTO.ProjectID));
CddReqstdBy.SelectedValue = Convert.ToString(_EQPHiredWorkOrderRequestDTO.RequestedById);
//}
lbl_Designation.Text = _EQPHiredWorkOrderRequestDTO.Designation;
txtRemarks.Text = _EQPHiredWorkOrderRequestDTO.Remarks;
rbItemType.SelectedValue = Convert.ToString(_EQPHiredWorkOrderRequestDTO.ItemTypeID);

if (_EQPHiredWorkOrderRequestDTO.EQPHiredWorkOrderRequestDetailsDTOList.Count != 0)
{
uwgWORequestDetails.DataSource = _EQPHiredWorkOrderRequestDTO.EQPHiredWorkOrderRequestDetailsDTOList;
uwgWORequestDetails.DataBind();

SetRownumbersWORequest();
}

SetButtons(_EQPHiredWorkOrderRequestDTO);
}



}

private void DisableControls(Control c)
{
if (c is WebControl)
((WebControl)c).Enabled = false;

foreach (Control child in c.Controls)
DisableControls(child);
}

private string GetWORequestNo()
{
COMDocumentSerialNoSettingsDTO _DocumentSerialNoSettingsDTO = new COMDocumentSerialNoSettingsDTO();
_DocumentSerialNoSettingsDTO.COMEnterpriseID = 1; //Default Enterprise
_DocumentSerialNoSettingsDTO.COMCompanyID = Convert.ToInt16(LOGIN_DETAILS.LoginCompanyID);
_DocumentSerialNoSettingsDTO.COMProjectID = Convert.ToInt16(cddProject.SelectedValue);
_DocumentSerialNoSettingsDTO.DocumentTypeEnum = DocumentTypeEnum.HiredAssetWorkOrderRequest;


COMSerialNoDTO SerialNoDTO = serviceUtil.GetServiceProxy<icomdocumentserialnoservice>().GetDocumentSerialNoByDocumentType(_DocumentSerialNoSettingsDTO);

if ((SerialNoDTO.SerialNo != "0") && (!String.IsNullOrEmpty(SerialNoDTO.SerialNo)))
{
if (SerialNoDTO.IsManual)
{
txtRequestNo.ReadOnly = false;
}
else
{
txtRequestNo.Text = SerialNoDTO.SerialNo;
txtRequestNo.ReadOnly = true;
txtRequestNo.Style.Add(HtmlTextWriterStyle.BorderStyle, "None");
}
}
else
{
DisableControls((this.Page.Master.FindControl("CommonHeader")));
wibCancel.Enabled = true;
}
return SerialNoDTO.SerialNo;
}

private bool ValidateSave()
{
int Count = 0;
Boolean IsValid = true;
MessageList messageList = new MessageList();
if (uwgWORequestDetails.Rows.Count > 0)
{
foreach (UltraGridRow row in uwgWORequestDetails.Rows)
{
DropDownList ddlAssetUOM = (DropDownList)GetRowObject(row, "ddlAssetUOM", "KeyAssetUOM");
DropDownList ddlUsageUOM = (DropDownList)GetRowObject(row, "ddlUsageUOM", "KeyUsageUOM");

if (ddlAssetUOM.SelectedValue == "0")
{
string msg = "Please Select AssetUOM";
messageList.Add(new MessageInfo(msg, AlertMessageTypeEnum.Info));
ShowQBox(messageList);
return false;

}
if (ddlUsageUOM.SelectedValue == "0")
{
string msg = "Please Select UsageUOM";
messageList.Add(new MessageInfo(msg, AlertMessageTypeEnum.Info));
ShowQBox(messageList);
return false;

}
}

}


return IsValid;
}
private void SetButtons(EQPHiredWorkOrderRequestDTO _EQPHiredWorkOrderRequestDTO)
{
if (_EQPHiredWorkOrderRequestDTO.Id == 0)
{
wibSubmit.Enabled = false;
wibAppReject.Enabled = false;
wibRevoke.Enabled = false;
warpDelete.Enabled = false;
}
else if (_EQPHiredWorkOrderRequestDTO.IsDeleteFlag == true)
{
wibSave.Enabled = false;
wibSubmit.Enabled = false;
wibAppReject.Enabled = false;
wibRevoke.Enabled = false;
warpDelete.Enabled = false;
cddProject.DropDownWARP.Enabled = false;
cddProject.EnabledDropdown = false;
CddReqstdBy.DropDownWARP.Enabled = false;
CddReqstdBy.EnabledDropdown = false;
cddProject.DropDownWARP.Enabled = false;
cddProject.EnabledDropdown = false;
warpwibAddAsset.Enabled = false;
}
else if (_EQPHiredWorkOrderRequestDTO.IsApprovedFlag == true)
{
wibSave.Enabled = false;
wibSubmit.Enabled = false;
wibAppReject.Enabled = false;
wibRevoke.Enabled = true;
warpDelete.Enabled = false;
cddProject.DropDownWARP.Enabled = false;
cddProject.EnabledDropdown = false;
CddReqstdBy.DropDownWARP.Enabled = false;
CddReqstdBy.EnabledDropdown = false;
cddProject.DropDownWARP.Enabled = false;
cddProject.EnabledDropdown = false;
warpwibAddAsset.Enabled = false;
}
else if (_EQPHiredWorkOrderRequestDTO.IsSubmittedFlag == true)
{
wibSubmit.Enabled = false;
wibAppReject.Enabled = true;
wibRevoke.Enabled = false;
wibSave.Enabled = false;
warpDelete.Enabled = false;
cddProject.DropDownWARP.Enabled = false;
cddProject.EnabledDropdown = false;
CddReqstdBy.DropDownWARP.Enabled = false;
CddReqstdBy.EnabledDropdown = false;
cddProject.DropDownWARP.Enabled = false;
cddProject.EnabledDropdown = false;
warpwibAddAsset.Enabled = false;
}
else if (_EQPHiredWorkOrderRequestDTO.IsRejectedFlag == true)
{
wibSave.Enabled = true;
wibSubmit.Enabled = true;
warpDelete.Enabled = true;
cddProject.DropDownWARP.Enabled = false;
cddProject.EnabledDropdown = false;
CddReqstdBy.DropDownWARP.Enabled = false;
CddReqstdBy.EnabledDropdown = false;
cddProject.DropDownWARP.Enabled = false;
cddProject.EnabledDropdown = false;
wibAppReject.Enabled = false;
wibRevoke.Enabled = false;
warpwibAddAsset.Enabled = false;
}
else
{
wibSave.Enabled = true;
wibSubmit.Enabled = true;
warpDelete.Enabled = true;
CddReqstdBy.DropDownWARP.Enabled = true;
CddReqstdBy.EnabledDropdown = true;
cddProject.DropDownWARP.Enabled = true;
cddProject.EnabledDropdown = true;
wibAppReject.Enabled = false;
wibRevoke.Enabled = false;
warpwibAddAsset.Enabled = true;
}

}


/* To Populate the ItemType RadioButtonList */

private IList<combosearchresultdto> getMenuPopulatorSearchResultItemType(MenuDropDownEnum _MenuDropDownEnum, ModuleEnum _ModuleEnum, PageEnum _PageEnum)
{
string[] LookUpData = { LookUpDataEnum.Capital.ToString(), LookUpDataEnum.BulkAssets.ToString() };

Dictionary<string, object=""> FilterParameters = new Dictionary<string, object="">();
MenuPopulatorRequestDTO menuPopulatorRequestDTO = new MenuPopulatorRequestDTO();
menuPopulatorRequestDTO.MenuDropDownEnum = _MenuDropDownEnum;
menuPopulatorRequestDTO.ModuleEnum = _ModuleEnum;
menuPopulatorRequestDTO.PageEnum = _PageEnum;
menuPopulatorRequestDTO.addAddtionalData("LookupCategory", LookUpCategoryEnum.ItemType.ToString());
menuPopulatorRequestDTO.addAddtionalData("lookupData", LookUpData.ToArray());

//directly calling service
IMenuPopulatorService MenuPopulatorServiceProxy =
serviceUtil.GetServiceProxy<imenupopulatorservice>("MenuPopulatorServiceEndpoint");
IList<combosearchresultdto> resultList =
(IList<combosearchresultdto>)MenuPopulatorServiceProxy.LoadMenuDropDownData(menuPopulatorRequestDTO);

return resultList;
}

private void FillItemType() // COMLookUpDataForLookupCategory_Common_Common
{
ValueList vl = new ValueList(true);

IList<combosearchresultdto> resultDTOList =
getMenuPopulatorSearchResultItemType(MenuDropDownEnum.COMLookUpDataForLookupCategory, ModuleEnum.Common, PageEnum.Common);

rbItemType.DataValueField = "ID";
rbItemType.DataTextField = "ColumnValue";
rbItemType.DataSource = resultDTOList;
rbItemType.DataBind();
foreach (ListItem item in rbItemType.Items)
{
if (item.Text.Contains(LookUpDataEnum.Capital.ToString()))
{
item.Selected = true;

}
}
}

# endregion Private Methods


}
QuestionWhich Property of Grid View would help me? Pin
Usman ali24-Aug-16 23:31
MemberUsman ali24-Aug-16 23:31 
AnswerRe: Which Property of Grid View would help me? Pin
Richard Deeming25-Aug-16 3:11
mveRichard Deeming25-Aug-16 3:11 
Questionweb form gridview control Pin
dcof23-Aug-16 8:08
Memberdcof23-Aug-16 8:08 
QuestionI have thousands of user who are accessing my site, How should I handle a load ? Pin
Abhijit Mindcraft22-Aug-16 23:57
MemberAbhijit Mindcraft22-Aug-16 23:57 
AnswerRe: I have thousands of user who are accessing my site, How should I handle a load ? Pin
deepankarbhatnagar23-Aug-16 1:20
professionaldeepankarbhatnagar23-Aug-16 1:20 
GeneralRe: I have thousands of user who are accessing my site, How should I handle a load ? Pin
Abhijit Mindcraft23-Aug-16 1:48
MemberAbhijit Mindcraft23-Aug-16 1:48 
GeneralRe: I have thousands of user who are accessing my site, How should I handle a load ? Pin
deepankarbhatnagar23-Aug-16 4:43
professionaldeepankarbhatnagar23-Aug-16 4:43 
GeneralRe: I have thousands of user who are accessing my site, How should I handle a load ? Pin
Abhijit Mindcraft23-Aug-16 21:45
MemberAbhijit Mindcraft23-Aug-16 21:45 
GeneralRe: I have thousands of user who are accessing my site, How should I handle a load ? Pin
jkirkerx25-Aug-16 10:20
professionaljkirkerx25-Aug-16 10:20 
Questionadd data to more table relation in same time Pin
ahmed_sa20-Aug-16 13:05
Memberahmed_sa20-Aug-16 13:05 
AnswerRe: add data to more table relation in same time Pin
ahmed_sa21-Aug-16 6:11
Memberahmed_sa21-Aug-16 6:11 
Questionweb form message using master pages message and/or JavaScript message Pin
dcof18-Aug-16 13:07
Memberdcof18-Aug-16 13:07 
AnswerRe: web form message using master pages message and/or JavaScript message Pin
John C Rayan19-Aug-16 3:24
professionalJohn C Rayan19-Aug-16 3:24 
GeneralRe: web form message using master pages message and/or JavaScript message Pin
dcof19-Aug-16 10:30
Memberdcof19-Aug-16 10:30 
GeneralRe: web form message using master pages message and/or JavaScript message Pin
John C Rayan21-Aug-16 23:16
professionalJohn C Rayan21-Aug-16 23:16 
Questionweb form using javacript Pin
dcof17-Aug-16 17:16
Memberdcof17-Aug-16 17:16 
AnswerRe: web form using javacript Pin
Peter Leow17-Aug-16 17:49
professionalPeter Leow17-Aug-16 17:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.