//Get Autogenerated ID public static int GetAutogeneratedLevelID_BL() { int Levelid = 0; try { Levelid = Level_DAL.GetAutoGeneratedLevelId(); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(Levelid); }
//Search Level By Id public static DataTable SearchLevelById_BL(int Levelid) { DataTable level = null; try { level = Level_DAL.SearchLevelById(Levelid); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(level); }
//Dispaly All Level public static DataTable DisplayLevel_BL() { DataTable level = null; try { level = Level_DAL.DisplayAllLevels(); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(level); }
//Delete Level public static int DeleteLevel_BL(int Levelid) { int rowsAffected = 0; try { rowsAffected = Level_DAL.DeleteLevel(Levelid); } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(rowsAffected); }
//Calling Update Level public static int UpdateLevel_BL(Level newLevel) { int rowsAffected = 0; try { if (ValidatLevel(newLevel)) { rowsAffected = Level_DAL.UpdateLevel(newLevel); } } catch (SqlException ex) { throw ex; } catch (HRMSException ex) { throw ex; } return(rowsAffected); }