public void HandleSaveNoCommitSQL(T obj, FormMode state) { var row = new CrudedItem <T>(); row.DataRow = obj; row.FormState = state; switch (state) { case FormMode.ADDMODE: row.SqlStatement = HandleNewItems(obj); break; case FormMode.EDITMODE: row.SqlStatement = HandleEditedItems(obj); break; case FormMode.DELETEMODE: row.SqlStatement = HandleDeletedItems(obj); break; default: row.SqlStatement = HandleNewItems(obj); break; } CrudedItemCollection.Add(row); }
public void HandleSaveNoCommitSP(T obj, FormMode state, string execStatement) { var row = new CrudedItem <T>(); row.DataRow = obj; row.FormState = state; row.SqlStatement = execStatement + ";"; CrudedItemCollection.Add(row); }