<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SOMainMobileSHDeliveryEndv3_2.aspx.cs" Inherits="AutockWebApplication.SO.SOMobile.SOMainMobileSHDeliveryEndv3_2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <meta charset="utf-8"> <title></title> <style type="text/css"> .style1 { width: 91%; } .style2 { } .style3 { } </style> </head> <body style="width: 173px; font-family: Tahoma; font-size: x-small;" bgcolor="#99FF66"> <form id="form1" runat="server" method="post" action=""> <div> <table class="style1"> <tr> <td class="style3"> <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Arial" Text="DELIVERY TO USER"></asp:Label> </td> <td> <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/Mobile/MobileMainPagSH.aspx" BackColor="Yellow">HOME</asp:LinkButton> </td> </tr> </table> </div> <hr /> <table class="style1"> <tr> <OBJECT ID="alcax" WIDTH=300 HEIGHT=80 CODEBASE ="alcax.ocx" CLASSID="CLSID:078DD2C4-1067-43F9-9107-D6480BE98A93"> </OBJECT> <BUTTON > CONFIRM </BUTTON> <BUTTON > CLEAR </BUTTON> </tr> <tr> <td class="style2"> <asp:Label ID="Label16" runat="server" Text="Name:"></asp:Label> </td> <td> <asp:TextBox ID="txtReceiver" runat="server" Width="110px" Height="20px"></asp:TextBox> </td> </tr> <tr> <td class="style2"> <asp:Label ID="Label17" runat="server" Text="ContactNo:"></asp:Label> </td> <td> <asp:TextBox ID="txtContactNo" runat="server" Width="110px" Height="20px"></asp:TextBox> </td> </tr> <tr> <td class="style2"> <asp:Label ID="Label8" runat="server" Text="VoucherNo:"></asp:Label> </td> <td> <asp:Label ID="txtSONo" runat="server"></asp:Label> </td> </tr> <tr> <td class="style2"> <asp:Label ID="Label6" runat="server" Text="Ward:"></asp:Label> </td> <td> <asp:Label ID="txtDeptCode" runat="server"></asp:Label> </td> </tr> <tr> <td class="style2"> <asp:Label ID="Label7" runat="server" Text="CostCentre:"></asp:Label> </td> <td> <asp:Label ID="txtCostCentre" runat="server"></asp:Label> </td> </tr> <tr> <td class="style2"> <asp:Label ID="Label9" runat="server" Text="BOM/EIRF:"></asp:Label> </td> <td> <asp:Label ID="txtNote" runat="server"></asp:Label> </td> </tr> <tr> <td class="style2"> <asp:Label ID="Label15" runat="server" Text="TotalItems:"></asp:Label> </td> <td> <asp:Label ID="txtTotalItems" runat="server"></asp:Label> </td> </tr> <tr> <td class="style2"> <asp:Label ID="Label14" runat="server" Text="Status:"></asp:Label> </td> <td> <asp:Label ID="lblStatus" runat="server"></asp:Label> </td> </tr> <tr> <td> <asp:Label ID="lblUserName" runat="server" Visible="False"></asp:Label> <input type="button" id="btnSave" name="btnSave" value="SAVE" style="width: 75px" onclick=UploadSignature() /> </td> </tr> </table> <asp:SqlDataSource ID="sqlDSSO" runat="server" ConnectionString="<%$ ConnectionStrings:AED_AUTConnectionString %>" SelectCommand="SELECT TOP (1) DocNo FROM SO order by DocKey Desc" UpdateCommand="alcsp_SODeliveryEndUpdate" UpdateCommandType="StoredProcedure" InsertCommand="alcsp_SOVerifyPick" InsertCommandType="StoredProcedure"> <InsertParameters> <asp:Parameter Name="DocNo" Type="String" /> <asp:SessionParameter Name="UserID" SessionField="UserID" Type="String" /> <asp:Parameter Direction="Output" Name="StrOutput" Size="100" Type="String" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="DocNo" Type="String" /> <asp:Parameter Name="UserID" Type="String" /> <asp:Parameter Name="StrOutput" Type="String" Direction="Output" Size="100" /> <asp:Parameter Name="UDF_Department" Type="String" /> <asp:Parameter Name="UDF_CostCentre" Type="String" /> <asp:Parameter Name="UDF_ReceiveContact" Type="String" /> <asp:Parameter Name="UDF_ReceiveSignature" Type="String" /> </UpdateParameters> </asp:SqlDataSource> </form> <script language="javascript"> //Passing parameters to ActiveX object and starting application function OpenActiveX1() { try { document.alcax.CaptureSignature(); //Running method from activeX alert(document.alcax.GetBitmapByte); } catch(Err) { alert(Err.description); } } function OpenActiveX2() { try { document.alcax.ClearSignature(); //Running method from activeX } catch(Err) { alert(Err.description); } } </script> <script type="text/javascript"> function UploadSignature() { try { alert("OK NOW"); xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); var receivername = document.getElementById('<%=txtReceiver.ClientID%>').value; var receiverphone = document.getElementById('<%=txtContactNo.ClientID%>').value; var image = document.alcax.GetBitmapByte; alert(image); alert(receivername); xmlhttp.open("POST","~/SO/SOMOBILE/SOMainMobileSHDeliveryEndv3_2.aspx/UploadImage",true); //xmlhttp.setRequestHeader("Content-type","application/x-javascript"); xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState != 4 || xmlhttp.status != 200) return; alert("OK MAN!"); }; var datatosend = "imageData : " + image + ",rName : " + receivername + ",rContact : " + receiverphone; alert(datatosend); xmlhttp.send(datatosend); } catch(err) { alert(err.message); } } </script> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)