コード例 #1
0
        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;
        }
コード例 #2
0
        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;

        }
コード例 #3
0
 public int DeleteOrganization(TRNOrganization objOrganization)
 {
     objOrganization.ModifiedDate = DateTime.Now;
     return new TRNOrganizationDAO().DeleteOrganization(objOrganization);
 }   
コード例 #4
0
 public int InsertOrganization(TRNOrganization objOrganization)
 {
     objOrganization.CreatedDate = DateTime.Now;
     return new TRNOrganizationDAO().InsertOrganization(objOrganization);
 }