System.Data.Common.DbDataRecord.GetInt32 C# (CSharp) Method

GetInt32() public abstract method

public abstract GetInt32 ( int i ) : int
i int
return int
        public abstract int GetInt32(int i);

Usage Example

Esempio n. 1
0
//-------------------------------------------------------------------------------------------
    void ByDay_ItemDataBound(object sender, DataGridItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item ||
            e.Item.ItemType == ListItemType.AlternatingItem)
        {
            System.Data.Common.DbDataRecord rd = (System.Data.Common.DbDataRecord)e.Item.DataItem;
            DateTime date = new DateTime(rd.GetInt32(0), rd.GetInt32(1), rd.GetInt32(2));
            e.Item.Cells[0].Text = date.ToString("MM/dd/yy");
            if (date > DateTime.Now)
            {
                e.Item.Cells[0].Font.Italic = true;
                e.Item.Cells[0].ForeColor   = System.Drawing.Color.Gray;
            }
        }
    }
All Usage Examples Of System.Data.Common.DbDataRecord::GetInt32