style="TABLE-LAYOUT: fixed;" 'If e.CommandName = "Edit" Then ' 'Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "WindowLocation", "window.open(" & IPMConst.PG_MD_CUSTOMERINFO & ".aspx?time=" & Now().ToString().Replace(" ", "") & "','_self');", True) ' Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "WindowLocation", "window.open('ManageCustomerInfo.aspx?CustomerID=" & e.Item.Cells(8).Text & "' ,'Hung')", True) 'End If 'If lbtnModify.Enabled = False Then ' lbtnModify.Enabled = CheckUserRightOnObject(Session("ProjectID"), lbtnModify.ID, "IPMModifyProject") 'End If 'If e.Item.Cells(2).Text.Length > 14 Then ' Dim mItem As String = e.Item.Cells(2).Text.Substring(0,14)+" "+e.Item.Cells(2).Text.Substring(14, ' mItem.Substring(0, 14) 'End If 'Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "WindowOpenerSubmit", "window.returnValue = 1;", True) 'Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "WindowOpenerSubmit", "window.opener.location.reload();", True) 'Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "WindowOpenerSubmit", "window.returnValue = 1;", True) 'If lbtnModify.Enabled = False Then ' lbtnModify.Enabled = CheckUserRightOnObject(Session("ProjectID"), lbtnModify.ID, "IPMModifyProject") 'End If 'If lbtnModify.Enabled = False Then ' lbtnModify.Enabled = CheckUserRightOnObject(Session("ProjectID"), lbtnModify.ID, "IPMModifyProject") 'End If 'If lbtnModify.Enabled = False Then ' lbtnModify.Enabled = CheckUserRightOnObject(Session("ProjectID"), lbtnModify.ID, "IPMModifyProject") 'End If 'If lbtnModify.Enabled = False Then ' lbtnModify.Enabled = CheckUserRightOnObject(Session("ProjectID"), lbtnModify.ID, "IPMModifyProject") 'End If 'e.Row.Cells(4).Attributes.Add("onClick", "return CheckDay('" & StartDate & "','" & EndDate & "');") 'e.Row.Cells(3).Attributes.Add("onClick", "return CheckDay('" & StartDate & "','" & EndDate & "');")
'e.Row.Cells(4).Attributes.Add("onchange", "return CheckDay('" & StartDate & "','" & EndDate & "');") 'e.Row.Cells(3).Attributes.Add("onchange", "return CheckDay('" & StartDate & "','" & EndDate & "');") 'CType(e.Row.Cells(4).Controls(1), CalendarPopup).Attributes.Add("onBlur", "return CheckDay('" EndDate & "');") 'CType(e.Row.Cells(3).Controls(1), CalendarPopup).Attributes.Add("onBlur", "return CheckDay('" EndDate & "');") 'CType(e.Row.FindControl("RealStartDate"), CalendarPopup).Attributes.Add("onblur", "return CheckDay('" EndDate & "');") 'CType(e.Row.FindControl("RealEndDate"), CalendarPopup).Attributes.Add("onblur", "return CheckDay('" EndDate & "');")
& StartDate & "','" & & StartDate & "','" & & StartDate & "','" & & StartDate & "','" &
''' <summary> ''' set tab for controls ''' ''' Sub SetTab() btnCancel.Attributes.Add("onkeydown", "if(event.which || event.keyCode)" &
_
"{if ((event.which == 9) || (event.keyCode == 9)) " & _ "{document.getElementById('" + btnInsert.ClientID & _ "').focus();return false;}} else {return true}; ") End Sub ''' <summary> ''' set width for Grid ''' ''' Public Sub SetWidth() Dim mScript As String = "function SetWidth(){ document.getElementById('" & dgCustomer.ClientID & "').style.width=document.getElementById('tblHeader').offsetWidth;" & _ " document.getElementById('dvList').style.width=document.getElementById('tblHeader') .offsetWidth + 18;" & _ "document.getElementById('tblHeader').style.width=document. getElementById('" & dgCustomer.ClientID & "').offsetWidth;} window.onresize = SetWidth;SetWidth();" Page.ClientScript.RegisterStartupScript(Me.GetType, "SetWidth", mScript, True) End Sub 'If mScheudulePercent <> Nothing Or mProgressPercent <> Nothing Or mNextWeekPercent <> Nothing Then ' mTable.Rows.Add(DBNull.Value, DBNull.Value) ' NumRow += 1 ' mTable.Rows(NumRow)("WeekProgressID") = Session("WeekProgressID") ' mTable.Rows(NumRow)("TaskID") = CType(Session("mArrayTaskID"), Long())(j)
'End If Dim myConnectionInfo As CrystalDecisions.Shared.ConnectionInfo = New CrystalDecisions.Shared.ConnectionInfo() ' Note: This is your local ODBC Name NOT SQL SERVER NAME myConnectionInfo.ServerName = "ISB-Testserver" ' If your ODBC connection defaulted to your application database, ' you can remove the following line. myConnectionInfo.DatabaseName = "IPM_Basic" 'myConnectionInfo.DatabaseName = "ReportTool" myConnectionInfo.UserID = "sa" myConnectionInfo.Password = "isb" 'Dim myReportDocument = CrystalReportSource1.ReportDocument 'If your crystal report is in some other folder, give proper path ' In this example, .rpt file in the same folder as .aspx file Dim myReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument() ''If your crystal report is in some other folder, give proper path '' In this example, .rpt file in the same folder as .aspx file Dim reportPath As String = Server.MapPath("~\Report\CrytalReport\T_ProjectSchedule.rpt") myReportDocument.Load(reportPath) SetDBLogonForReport(myConnectionInfo, myReportDocument) CrystalReportViewer1.ReportSource = myReportDocument ' You can customize the Crystal Reports toolbar. ' like the following. I have disabled the business object logo ' in the tool bar. CrystalReportViewer1.HasCrystalLogo = False function OpenWindow() { //window.open("IPMManageCustomerInfo.aspx", "Hung");// + (new Date()).getTime()); var m = window.showModalDialog("IPMManageCustomerInfo.aspx" ,null,"dialogHeight:500px;dialogWidth:850px;dialogTop:100px;dialogLeft:100px;edge: Raised;center:Yes;help:No;resizable:Yes;status:No;scroll:no"); if (m != null) window.location.reload(); return false; } function Edit_Open(pQueryValue) { //window.open("ManageCustomerInfo.aspx?CustomerID=" + pQueryValue,"Hung"); var m = window.showModalDialog("IPMManageCustomerInfo.aspx?CustomerID="+ pQueryValue + "&Time=" + (new Date()).getTime(),null,"dialogHeight:500px;dialogWidth:850px;dialogTop:100px;dialo gLeft:100px;edge:Raised;center:Yes;help:No;resizable:Yes;status:No;scroll:no"); if (m != null) window.location.reload(); return false; }
function DeleteConfirm() { return confirm(mDeleteConfirm)==true ? true : false; } function keyCheck(eventObj, obj) { var keyCode; // Check For Browser Type if (document.all){ keyCode=eventObj.keyCode; } else{ keyCode=eventObj.which; } var str=obj.value; if (keyCode == 32) { return true; } if(keyCode<48 || keyCode >58) { // Allow only integers and decimal points return false } return true } function Check() { if (document.getElementById("<%=txtCompanyName.ClientID %>").value == "") { document.getElementById("<%=txtCompanyName.ClientID %>").focus(); document.getElementById("<%=lblError.ClientID %>").innerHTML = mMustFillReuiredField; return false; } var regEmail = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; if (document.getElementById("<%=txtEmail.ClientID %>").value != "" && regEmail.test(document.getElementById("<%=txtEmail.ClientID %>").value) == false) { document.getElementById("<%=txtEmail.ClientID %>").focus(); document.getElementById("<%=lblError.ClientID %>").innerHTML = mEmailInvalid; return false; } if ( document.getElementById("<%=txtFax.ClientID %>").value != "") { var re = /[^ -0-9]/g if (re.test(document.getElementById("<%=txtFax.ClientID %>").value))
// // { // // mFaxInvalid; // // }
document.getElementById("<%=txtFax.ClientID %>").focus(); document.getElementById("<%=lblError.ClientID %>").innerHTML = }
return false;
if (document.getElementById("<%=txtPhone.ClientID %>").value != "") { // var re = /[^ -0-9]/g // if (re.test(document.getElementById("<%=txtPhone.ClientID %>").value)) { // document.getElementById("<%=txtPhone.ClientID %>").focus(); // document.getElementById("<%=lblError.ClientID %>").innerHTML = mPhoneInvalid ; // return false; // } } var regWebsite = /^([\w-]+\.)+[\w-]+([/][\w- ./?%&=]*)?$/; if (document.getElementById("<%=txtWebsite.ClientID %>").value != "" && regWebsite.test(document.getElementById("<%=txtWebsite.ClientID %>").value) == false) { document.getElementById("<%=txtWebsite.ClientID %>").focus(); document.getElementById("<%=lblError.ClientID %>").innerHTML = mWebsiteInvalid; return false; } var mContent mContent =document.getElementById("<%=txtNote.ClientID %>").value if (mContent.length > 255 ) { document.getElementById("<%=lblError.ClientID %>").innerHTML = mLimitNoteLength document.getElementById("<%=txtNote.ClientID %>").focus() return false; } mContent =document.getElementById("<%=txtAddress.ClientID %>").value if (mContent.length > 255 ) { document.getElementById("<%=lblError.ClientID %>").innerHTML = mLimitAddressLength document.getElementById("<%=txtAddress.ClientID %>").focus() return false; } return true;
}
Dim mDeleteConfirm As String = IPMErrMsg.ERRMSG_IPM_DELETE_CONFIRM Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "Variable", "var mDeleteConfirm = '" & mDeleteConfirm & "';", True) Declare @mSql nvarchar(2000) set @mSql ='select * from KLEASM Where 1=1 ' if (not(@pSchoolCode is null or @pSchoolCode='')) set @mSql = @mSql + ' and GAKKOCD=''' +@pSchoolCode +'''' if (not(@pSubjectcode is null or @pSubjectcode='')) set @mSql = @mSql + ' And KAMOKCD=''' + @pSubjectcode +'''' if (not(@pLAName is null or @pLAName='')) set @mSql = @mSql + ' And LEASMEI like ''%' + RTrim(@pLAName) + '%'''
if
(not(@pLCName is null or @pLCName='')) set @mSql = @mSql + ' And LKAISYA = ' + @pLCName + '' if (not(@pCTNumber is null or @pCTNumber='')) set @mSql = @mSql + ' and KEIYAKNO like ''%' + Rtrim(@pCTNumber) + '%''' if (@pOutFlg = 2 ) set @mSql = @mSql + ' and OUTFLG=''' + 'P' +'''' if (@pOutFlg = 3 ) set @mSql = @mSql + ' and OUTFLG !=''' + 'P' +''''
IF (right(@mSql,3) ='and') begin set @mSql = left(@mSql,charindex('and',@mSql)-1) exec sp_executesql @mSql end else exec sp_executesql @mSql print @mSql Private Sub JMsgBox(ByVal msg As String) Dim strScript As String strScript = "<script languate=javascript>" strScript &= "alert('" & msg & "');" strScript &= "" Response.Write(strScript) End Sub ///close child window and reload parent window opener.focus(); opener.location.href = opener.location; self.close();