public static GridDataItem UpdateItem(OrderedDictionary keys, OrderedDictionary newValues)
    {
        var id   = Convert.ToInt32(keys["ID"]);
        var item = GridDataItem.GetData().First(i => i.ID == id);

        LoadNewValues(item, newValues);
        return(item);
    }
Beispiel #2
0
 protected void Page_Init(object sender, EventArgs e)
 {
     ASPxGridView1.DataSource = GridDataItem.GetData();
     if (!IsPostBack)
     {
         ASPxGridView1.DataBind();
     }
 }
Beispiel #3
0
    protected GridDataItem DeleteItem(OrderedDictionary keys, OrderedDictionary values)
    {
        var id   = Convert.ToInt32(keys["ID"]);
        var item = GridDataItem.GetData().First(i => i.ID == id);

        GridDataItem.GetData().Remove(item);
        return(item);
    }
    public static GridDataItem InsertNewItem(OrderedDictionary newValues)
    {
        var item = new GridDataItem()
        {
            ID = GridDataItem.GetData().Count
        };

        LoadNewValues(item, newValues);
        GridDataItem.GetData().Add(item);
        return(item);
    }
Beispiel #5
0
 protected void Page_Init(object sender, EventArgs e)
 {
     Grid.DataSource = GridDataItem.GetData();
     Grid.DataBind();
 }