//eydcja wiersza private void gridRowEdit(object sender, RoutedEventArgs e) { DataRowView selected = (DataRowView)dataGrid.SelectedItem; string table = wybieranieTabeli.SelectedItem.ToString(); var okno = new RowEdit( table, tableColumns[table], dbConnection, tableColumnsType[table], primaryKeys[table], selected ); okno.ShowDialog(); gridRefresh(); }
public JsonResult UpdateRow(string link, string text, string description, int container, int priority, int rowId, bool isDelete = false) { var rowEdit = new RowEdit(new Row() { Text = text, Link = link, Description = description, ContainerId = container, Priority = priority, RowId = rowId, }); var result = isDelete ? rowEdit.Delete() : rowEdit.Update(); return(new JsonResult(result)); }