internal bool Save(int worksheetId) { bool result = false; if (CellRow == null) { Id = Cell_BLL.Create(Column, Row, CurrentValue, worksheetId); CellRow = Cell_DAL.GetDataRow(Id); result = true; } else if (Included) { CellRow.Value = CurrentValue; result = Cell_DAL.Update(CellRow); } else { result = Cell_BLL.Delete(Id); } OriginalValue = CurrentValue; return(result); }
public Cell(int id) { CellRow = Cell_DAL.GetDataRow(id); Id = id; Column = CellRow.Column; Row = CellRow.Row; CurrentValue = CellRow.Value; OriginalValue = CellRow.Value; WorksheetId = CellRow.WorksheetId; Included = true; }
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; } }