/*-------------------------------------------------------------------------------HOME PAGE------------------------------------------------------*/ public string addTimeTable(PeriodTimeTable periodTimeTable) { try { periodTimeTable.createddate = DateTime.Now; periodTimeTable.isactive = true; int TimeTableid = objUserInfoDAL.getTimeTableid(periodTimeTable.class_id, periodTimeTable.section_id); if (TimeTableid == 0) { objUserInfoDAL.addTimeTable(periodTimeTable); TimeTableid = objUserInfoDAL.getTimeTableid(periodTimeTable.class_id, periodTimeTable.section_id); periodTimeTable.timetable_id = TimeTableid; objUserInfoDAL.addPeriodTimeTable(periodTimeTable); return("Success"); } else { return("User Exists"); } } catch (Exception ex) { CubitExceptionUtility.CubitExceptionLog(ex.Message + "BAL: Error while inserting TimeTable details" + ex.StackTrace + " " + ex.InnerException, this.GetType().BaseType.Name.ToString(), DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString()); return("Error"); } }