how to place lower table i.e send to table to the right side of upper table. need help.....

  • Thread starter Thread starter love4csharp
  • Start date Start date
L

love4csharp

Guest
Hi

guys

plz see screenshot ..my work is to place lower table at right side of upper table.so please see code. I am unable to do it. plz suggest .

<%@ Page Language="VB" AspCompat="true" Inherits="myPage"%>
<%@ Import namespace="ADODB" %><% RStoTablePre()%>


<script language="VB" runat="Server
on error resume next
Dim TextMatrix(20) As Object
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs)
DBInit()

RStoCombo("select office_code,office_name from offices where office_code<>" & office98 & " order by 1", 1, 0, officef,"")
officef.Attributes.Add("onfocusout", "var m=this.value;k=this.parentElement;this.parentElement.innerHTML=cimp;k.childNodes(0).childNodes(0).value=m;")
Dim sqll As String = ""
sqll = "select 0, disp_office_code as office_code, (select office_name from offices where office_code=disp_office_code) as office_name from disp_offices where office_code=" & office98 & " and disp_office_code in (select office_code from offices where office_level<>STOP) order by id"


RStoCombo("select disp_office_code as office_code, disp_office_name as office_name from disp_offices where office_code=" & office98 & " order by 2", 1, 0, txNEXT_OFFICE_CODE, "")
RStoCombo(sqll, 2, 1, txNEXT_OFFICE_CODE, "")

End Sub


Protected Sub btSave_Click(ByVal sender As Object, ByVal e As System.EventArgs)
on error resume next
If Request("letterid") = "" Then
msgtd.Text = "First select a letter to dispatch."
Exit Sub
End If


For x = 0 To txNEXT_OFFICE_CODE.Items.Count - 1

If txNEXT_OFFICE_CODE.Items(x).Selected = True Then
sss = "update lettertrans set " & IIf(IsDate(txPUTUP_DATE.Text), "PUTUP_DATE=to_date(" & txPUTUP_DATE.Text & ",DD-MM-YYYY),", "") & "remarks=" & Replace(Replace(txREMARKS.Text, """", """"""), "", "") & ", next_office_code = " & txNEXT_OFFICE_CODE.Items(x).value & ", desp_date = sysdate, desp_time = sysdate, desp_flag = " & "1" & ", next_office_receipt_status = " & "0" & ", despatch_date_time = sysdate where id=" & Request("letterid")
cnn.execute(sss)
System.Threading.Thread.Sleep(100)
cnn.Execute("Insert into lettertrans select * from lettertrans where id=" & Request("letterid"))

End If
Next
cnn.Execute("delete from lettertrans where id=" & Request("letterid"))


End Sub
</script>

<%
on error resume next
op = request.Item("opt")
id = request.Item("id")
SetVar()
response.Write ifrec
response.End
Select Case op
Case "update"

rst1 = New ADODB.Recordset
rst1.open("select lettermaster.ID,is_new, prev_office_code, prev_office_diary_no, file_letter, lettertrans.letter_office_code, lettertrans.letter_diary_no, lettertrans.diary_no, receipt_date_time, next_office_code, lettertrans.office_code,subject,filed from lettertrans,lettermaster where lettermaster.office_code=lettertrans.letter_office_code and lettermaster.diary_no= lettertrans.letter_diary_no and lettertrans.office_code = " & office98 & " and file_letter = " & "L" & " ", cnn, 1)
If rst1.recordcount > 0 Then
For x = 1 To rst1.recordcount
ifrec = (Request("officecode" & rst1(0).value))
If ifrec <> "" And sNull(rst1.Fields.Item("diary_no").Value) <> "" Then

sss = "update lettertrans set " & IIf(IsDate(txPUTUP_DATE.Text), "PUTUP_DATE=" & txPUTUP_DATE.Text & ",", "") & "remarks=" & Replace(Replace(txREMARKS.Text, """", """"""), "", "") & ", next_office_code = " & ifrec & ", desp_date = sysdate, desp_time = sysdate, desp_flag = " & "1" & ", next_office_receipt_status = " & "0" & ", despatch_date_time = sysdate where office_code = " & sNull(rst1.Fields.Item("office_code").Value) & " and diary_no = " & sNull(rst1.Fields.Item("diary_no").Value) & ""
cnn.execute(sss)


sss = "update lettermaster set disp_office_code = " & ifrec & ", disp_date_time = sysdate where office_code = " & sNull(rst1.Fields.Item("letter_office_code").Value) & " and diary_no = " & sNull(rst1.Fields.Item("letter_diary_no").Value) & ""

cnn.execute(sss)

End If
rst1.MoveNext()
Next
End If
UPGRADE_NOTE: Object rst1 may not be destroyed until it is garbage collected. Copy this link in your browser for more: http://msdn.microsoft.com/library/en-us/vbcon/html/vbup1029.aspx
rst1 = Nothing
Case "del"

If Err.Number Then msg = "Record could not be deleted. Error:" & Err.Description Else msg = "Record has been deleted sucessfully."

End Select
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>File Tracker >> Letter >> Letter Dispatch</title>
<link rel="Stylesheet ../inc/htmlstyle.css" />
<script type="text/javascript" language="javascript" src="../inc/script.js </script>
<script type="text/javascript" language="javascript" src="../inc/sorttable.js </script>
<script type="text/javascript" language="javascript" src="../inc/tableresize.js </script>
<link rel="stylesheet ../inc/calendar.css" />
<script type="text/javascript" language="javascript" src="../inc/calendar.js </script>
<script type="text/javascript" language="javascript

<!--
////////////////////
var coffice;
var cimp;
var rindex;
function winl(){
//coffice=document.getElementById("officef").outerHTML;
//cimp=<input onfocus="this.parentElement.parentElement.innerHTML=coffice;" name="officecode" size="15" style="width:100%;font-family: Verdana; font-size: 10px; border: 1px solid #808080 ;
//alert(coffice);
}
function openEdit(lid){
/*alert(document.opened);
if (document.opened==undefined){
s = window.showModelessDialog(../showdialog.aspx?title=MODIFY CUSTOMER RECORD&url=main/cus_add.aspx?op=open%26id=+lid, window, dialogHeight:330px; dialogWidth:340px; scroll:no);
document.opened="true";
}else{
s.I1.location=cus_add.aspx?op=open&id=+lid;
}*/
parent.frames(1).location=add_mbill.aspx?op=open&id=+lid;
}
function delop(delid){
m=window.confirm("Are you sure to delete this record.\nClick OK to Delete.");
if (m==true){document.location="?op=del&id="+delid;}
}
//////////////////////////////////
function settext(con){
//alert(con.name)
var i=con.parentElement.parentElement;
//con.name=officecode+i.parentElement.rowIndex;
rindex=con;
cimp=i.innerHTML;
//alert(cimp);
i.innerHTML=coffice;

}
//-->
</script>

</head>

<body onload="winl()" topmargin="0
<form runat="server" method="post" id="f1" >
<div style="visibility:hidden

<div align="center
<table border="0" cellpadding="0" width="100%" height="418
<tr>
<td id="td1" height="14
<font size="5" color="#5ED548 <b>Letter Dispatch</b></font></td>
</tr>
<tr>
<td bordercolor="#008000" style="border-style: solid; border-width: 1px
<div align="center" style="height:201px; width:929px
<%


ssql = "select letter_office_code|| /||letter_diary_no as ""Letter Ref"",letter_no as ""Letter No"",Subject,decode(is_new,1,L||((select current_diary_no from offices where office_code = " & office98 & ")+rownum),lettertrans.Diary_No) as ""Diary No"",Sender,receipt_date_time as ""Receipt Date"",<input type=""radio"" name=""letterid"" value=""||lettertrans.id||" as ""Select"" from lettertrans,lettermaster where lettermaster.office_code=lettertrans.letter_office_code and lettermaster.diary_no= lettertrans.letter_diary_no and next_office_code is null and lettertrans.office_code = " & office98 & " and file_letter = " & "L" & " AND (lettertrans.fileid<>1 or lettertrans.fileid is null) "
response.write office98

RStoTable(ssql, " ;mreg;mreg", "100%;200", 5, 100, -1, "10;10;20;7;15;13", "")

%>&nbsp;<br>
&nbsp;<br>&nbsp;
</td>
</tr>

<tr>
<td bordercolor="#008000" style="border-style: solid; border-width: 1px
<div align="left
<table border="0" cellpadding="0" style="border-collapse: collapse" width="502" id="table1" height="158
<tr>
<td width="98" valign="top" height="75 &nbsp;Send To</td>
<td width="285" valign="top" height="75
<asp:CheckBoxList ID="txNEXT_OFFICE_CODE" runat="server" Height="75px"
Width="273px" style="overflow: auto" BackColor="White" CssClass="tx"
RepeatLayout="Flow
</asp:CheckBoxList></td>
<td height="75 &nbsp;</td>
</tr>
<tr>
<td width="98" valign="top" height="56 &nbsp;Remarks/Comments</td>
<td height="56" width="285
<asp:TextBox ID="txREMARKS" runat="server" CssClass="tx" Height="49px"
TextMode="MultiLine" Width="273px </asp:TextBox>
</td>
<td height="56
&nbsp;</td>
</tr>
<tr>
<td width="98 &nbsp;Put-Up Date</td>
<td width="285
<a id="anchor2 javascript:void(0)" name="anchor2"
onclick="cal.select(document.all(txPUTUP_DATE),anchor2,dd/MM/yyyy); return false;
<asp:TextBox ID="txPUTUP_DATE" runat="server" CssClass="tx" Width="80px </asp:TextBox>
<img align="top" alt="Calendar" border="0" class="imgLink" height="17"
src="../images/calendar.gif" width="18" /> </td>
<td>
<asp:Button ID="btSave" runat="server" Text="Update" onclick="btSave_Click" OnClientClick="return window.confirm(Are you sure to update records.\nClick OK to confirm)" />
</td>
</tr>
</table>

</td>
</tr>

</table>

<asp:Label ID="msgtd" runat="server" ForeColor="Red </asp:Label>

</form>
</body>

</html>



db145892745bc864e630a12ee6954cd8._.png


thanks and regard love4csharp

Continue reading...
 
Back
Top