April 2007
M T W T F S S
    May »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

See Ruby & Phython Category in Private Sectoin

See Ruby & Phython Category in Private Sectoin

ทศนิยมใน Crystal Report

cstr(Number, 2)  ——– 2 คือจำนวนทศนิยม ถ้าไม่ต้องการเลขทศนิยมก็ให้ใส่เป็น 0

Store proc with cursor(MSSQL)

CREATE PROCEDURE sp_proc1
@fYear int ,
@fMonth  int ,
@fCatID int

AS
begin
 set nocount on
 declare @fTotal int, @fNameInventory varchar(50), @fID int, @fShip int, @fBuy int, @fTest int, @fPast int, @fBalance int, @fUnitName char(10), @fPast1 int, @fPast2 int
 declare @s int, @s1 int, @s2 int

 create table #T1
 (
 fInventoryID int,
 fNameInventory varchar(30),
 fUnitName char(10),
 fPast int,
 fBuy int,
 fTotal int,
 fShip int,
 fBalance int,
 fTest int
 )
  if @fCatID=0
 begin
  declare cur cursor for
  select fID [...]

มาดูว่าเครื่องคอมพิวเตอร์เราใช้พอร์ทอะไรไปบ้าง

พิมพ์ที่คอมมานด์พร้อม >> netstat -a -n -o

Deleting multiple record from CheckBox in DataGrid (JavaScript + ASP.NET)

1. ใส่ฟังก์ชั่น ในส่วนของ Javascript

<script language=”javascript”>

function confirmDelete(frm)
{
    // loop through all elements
    for (i=0; i<frm.length; i++)
    {
        // Look for our checkboxes only
        if (frm.elements[i].name.indexOf(”DeleteThis”) !=-1)
        {
            // If any are checked then confirm alert, otherwise nothing happens
            if(frm.elements[i].checked)
            {
                return confirm (’Are you sure you want to delete your selection(s)?’)
                }
        }
    }
}

สร้าง linkButton ไม่ให้มีเส้นบันทัดอยู่ข้างล่างลิ้ง text-decoration:none

<asp:DataList id=”dlPrices” runat=”server” DataKeyField=”hr_Id” OnItemCommand=”DataList_ItemCommand” OnItemDataBound=”BindGrid” Width=”95%”>
        <itemtemplate>
            <asp:LinkButton id=”btnDesc” runat=”server” CommandName=”select” CommandArgument=’<%# Container.DataItem(”hr_Id”) %>’><h4 style=”text-decoration:none;”><%# DataBinder.Eval(Container.DataItem, “hr_Name”) %></h4></asp:LinkButton>
        </itemtemplate>
    </asp:List>

store proc – default parameter

CREATE PROCEDURE GetData
@TID int = NULL
AS
IF @TID IS NOT NULL
     SELECT ID, name FROM Employee WHERE ID = @TID
 ELSE
     SELECT id, Name FROM Employee WHERE ID IS NULL
GO

See OOP Category in Private Sectoin

See OOP Category in Private Sectoin

See JavaScript Category in Private Sectoin

See JavaScript Category in Private Sectoin

See Database Category in Private Sectoin

See Database Category in Private Sectoin