SQL> desc phone;
Name Null? Type
----------------------------------------- -------- ----------------------------
PHONE_ID NOT NULL NUMBER(10)
FK_PHONE_ACCOUNT_ID NOT NULL NUMBER(10)
PHONE_AREACODE NOT NULL VARCHAR2(5)
PHONE_NUMBER NOT NULL NUMBER(10)
PHONE_CITY NOT NULL VARCHAR2(40)
FK_PHONE_PLAN_ID NOT NULL NUMBER(5)
FK_PHONE_USAGE_ID NOT NULL NUMBER(5)
PHONE_ENABLED NOT NULL NUMBER(1)
FK_EMPLOYEEID NOT NULL NUMBER(10)
COMPANY_AMOUNT NUMBER(10,2)
SQL> alter table phone rename column PHONE_CITY to FK_IIL_COMP_LOC_ID;
SQL> Desc Phone;
Name Null? Type
----------------------------------------- -------- ----------------------------
PHONE_ID NOT NULL NUMBER(10)
FK_PHONE_ACCOUNT_ID NOT NULL NUMBER(10)
PHONE_AREACODE NOT NULL VARCHAR2(5)
PHONE_NUMBER NOT NULL NUMBER(10)
FK_IIL_COMP_LOC_ID NOT NULL VARCHAR2(40)
FK_PHONE_PLAN_ID NOT NULL NUMBER(5)
FK_PHONE_USAGE_ID NOT NULL NUMBER(5)
PHONE_ENABLED NOT NULL NUMBER(1)
FK_EMPLOYEEID NOT NULL NUMBER(10)
COMPANY_AMOUNT NUMBER(10,2)
Wednesday, June 23, 2010
Monday, June 14, 2010
Example for Allowing Only Numric in a textbox on Client side
<asp:TextBox ID="txt_tenderno" onkeydown="return onKeyPressBlockNumbers(event)" onFocus="this.style.background ='yellow'" onBlur="this.style.background='white'" runat="server" ></asp:TextBox>
function onKeyPressBlockNumbers(e)
{
var key = window.event ? e.keyCode : e.which;
var keychar = String.fromCharCode(key);
reg = /\d/;
return !reg.test(keychar);
}-----------------OR---------------------
<asp:TextBox ID="txt_tenderno" onkeydown="return numeric(event)" onFocus="this.style.background ='yellow'" onBlur="this.style.background='white'" runat="server" ></asp:TextBox>
function numeric(e) {var key = window.event ? e.keyCode : e.which; return ((key == 8) || (key > 47 && key < 58)); }
To get Grid View Rows in Javascript
<script language="javascript" type="text/javascript">
var gridViewCtlId = '<%=ctlGridView.ClientID%>';
var gridViewCtl = null;
var curSelRow = null;
var curRowIdx = -1;
function getGridViewControl()
{
if (null == gridViewCtl)
{
gridViewCtl = document.getElementById(gridViewCtlId);
}
}
function onGridViewRowSelected(rowIdx)
{
var selRow = getSelectedRow(rowIdx);
if (null != selRow)
{
curSelRow = selRow;
var cellValue = getCellValue(rowIdx, 0);
alert(cellValue);
}
}
function getSelectedRow(rowIdx)
{
return getGridRow(rowIdx);
}
function getGridRow(rowIdx)
{
getGridViewControl();
if (null != gridViewCtl)
{
return gridViewCtl.rows[rowIdx];
}
return null;
}
function getGridColumn(rowIdx, colIdx)
{
var gridRow = getGridRow(rowIdx);
if (null != gridRow)
{
return gridRow.cells[colIdx];
}
return null;
}
function getCellValue(rowIdx, colIdx)
{
var gridCell = getGridColumn(rowIdx, colIdx);
if (null != gridCell)
{
return gridCell.innerText;
}
return null;
}
</script>
Thursday, June 10, 2010
Tuesday, June 8, 2010
ClickOnce Deployment In Visula Basic 2008 Express Edition
I see. well yes you can do this, its called ClickOnce deployment. Take a look at this:
if you have the full version of VS.NET, then you could make your own installer and has more flexibility on what you can do but since its the express version, you get ClickOnce deployment
Monday, June 7, 2010
Listing Files in Dictionary
Private Sub ListFilesInDictionay(ByVal sStartDir As String, ByRef MyDict As Dictionary(Of Integer, String))
Dim OutDir As DirectoryInfo = New DirectoryInfo(sStartDir)
If OutDir.Exists Then
Dim MyFileNum As Integer = 1
For Each OurFile As FileInfo In OutDir.GetFiles
MyDict.Add(MyFileNum, OurFile.Name)
MyFileNum += 1
Next
End If
End Sub
Dim OutDir As DirectoryInfo = New DirectoryInfo(sStartDir)
If OutDir.Exists Then
Dim MyFileNum As Integer = 1
For Each OurFile As FileInfo In OutDir.GetFiles
MyDict.Add(MyFileNum, OurFile.Name)
MyFileNum += 1
Next
End If
End Sub
Tuesday, June 1, 2010
To Show Controls those are not validated as yellow background
on the page_prerender event paste below scratched code
foreach (BaseValidator valControl in Page.Validators)
{
WebControl assControl = (WebControl)Page.FindControl(valControl.ControlToValidate);
if (!valControl.IsValid)
assControl.BackColor = System.Drawing.Color.Yellow;
else
assControl.BackColor = System.Drawing.Color.White;
}
}
foreach (BaseValidator valControl in Page.Validators)
{
WebControl assControl = (WebControl)Page.FindControl(valControl.ControlToValidate);
if (!valControl.IsValid)
assControl.BackColor = System.Drawing.Color.Yellow;
else
assControl.BackColor = System.Drawing.Color.White;
}
}
Subscribe to:
Posts (Atom)