public int InsertOrganization(TRNOrganization objOrganization) { objOrganization.OrganizationID = 1; BeginTransaction(); try { objOrganization.OrganizationID = Insert(objOrganization); CommitTransaction(); } catch (Exception ex) { RollBackTransaction(); objOrganization.OrganizationID = -1; } return objOrganization.OrganizationID; }
public int DeleteOrganization(TRNOrganization objOrganization) { int rowsaffected = -1; BeginTransaction(); try { String[] UpdateProperties = new String[] { "ModifiedBy", "ModifiedDate", "Status" }; rowsaffected = Update(objOrganization, UpdateProperties); CommitTransaction(); } catch (Exception e) { RollBackTransaction(); rowsaffected = -1; } return rowsaffected; }
public int DeleteOrganization(TRNOrganization objOrganization) { objOrganization.ModifiedDate = DateTime.Now; return new TRNOrganizationDAO().DeleteOrganization(objOrganization); }
public int InsertOrganization(TRNOrganization objOrganization) { objOrganization.CreatedDate = DateTime.Now; return new TRNOrganizationDAO().InsertOrganization(objOrganization); }