public static int Create(string column, int row, string value, int worksheetId) { try { ExcelDataSet.CellsRow cellRow = Table.NewCellsRow(); cellRow.Column = column; cellRow.Row = row; cellRow.Value = value; cellRow.WorksheetId = worksheetId; Table.AddCellsRow(cellRow); if (!Cell_DAL.Update(Table)) { return(Constants.Constants.UNDEFINED_ID); } return(cellRow.Id); } catch { throw; } }
public static bool Update(ExcelDataSet.CellsRow row) { try { CellsTableAdapter adapter = new CellsTableAdapter(); adapter.Update(row); return(true); } catch { throw; } }
public static bool Delete(int id) { try { ExcelDataSet.CellsRow row = Cell_DAL.GetDataRow(id); if (row == null) { return(true); } row.Delete(); return(Cell_DAL.Update(Table)); } catch { throw; } }