public List <ROLES_PERMISSIONDC> LoadAll() { DBConnection objConnection = new DBConnection(); ROLES_PERMISSIONDA objROLES_PERMISSIONDA = new ROLES_PERMISSIONDA(); List <ROLES_PERMISSIONDC> objROLES_PERMISSIONDC = null; try { objConnection.Open(false); objROLES_PERMISSIONDC = objROLES_PERMISSIONDA.LoadAll(objConnection); } catch (Exception ex) { throw ex; } finally { objConnection.Close(); } return(objROLES_PERMISSIONDC); }
public int Insert(List <ROLES_PERMISSIONDC> objROLES_PERMISSIONs) { int insertedCount = 0; DBConnection objConnection = new DBConnection(); ROLES_PERMISSIONDA objROLES_PERMISSIONDA = new ROLES_PERMISSIONDA(); try { objConnection.Open(true); insertedCount = objROLES_PERMISSIONDA.Insert(objConnection, objROLES_PERMISSIONs); objConnection.Commit(); } catch (Exception ex) { objConnection.Rollback(); throw ex; } finally { objConnection.Close(); } return(insertedCount); }