public static bool AddProgram(ATTProgram objProgram) { try { DLLProgram.AddProgram(objProgram); return(true); } catch (Exception ex) { throw ex; } }
public static List <ATTProgram> GetProgramList(int orgID, int programID, string ContainDefPorgramValue, string ContainDefPrgCoordinatorValue, string ContainDefPrgSponsorValue, string ContainDefSessionValue, string ContainDefSessionCourseValue, string ContainDefCourseValue) { List <ATTProgram> PorgramLST = new List <ATTProgram>(); foreach (DataRow row in DLLProgram.GetProgramTable(orgID, programID).Rows) { ATTProgram objProgram = new ATTProgram ( int.Parse(row["ORG_ID"].ToString()), int.Parse(row["PROGRAM_ID"].ToString()), row["PROGRAM_NAME"].ToString(), int.Parse(row["PRG_TYPE_ID"].ToString()), row["DESCRIPTION"].ToString(), row["ACTIVE"].ToString(), row["LAUNCH_DATE"].ToString(), row["DURATION"].ToString(), (row["DURATION_TYPE_ID"] == System.DBNull.Value)?0: int.Parse(row["DURATION_TYPE_ID"].ToString()), row["TO_DATE"].ToString(), row["LOCATION"].ToString(), "A" ); objProgram.PrgCoordinatorLST = BLLProgramCoordinator.GetProgramCoordinatorList(int.Parse(row["ORG_ID"].ToString()), int.Parse(row["PROGRAM_ID"].ToString()), 0, ContainDefPrgCoordinatorValue); objProgram.PrgSponsorLST = BLLProgramSponsor.GetProgramSponsorList(int.Parse(row["ORG_ID"].ToString()), int.Parse(row["PROGRAM_ID"].ToString()), 0, ContainDefPrgSponsorValue); objProgram.SessionLST = BLLSessions.GetSessionList(int.Parse(row["ORG_ID"].ToString()), int.Parse(row["PROGRAM_ID"].ToString()), 0, ContainDefSessionValue, ContainDefSessionCourseValue); objProgram.CourseLST = BLLCourse.GetCourseList(int.Parse(row["ORG_ID"].ToString()), int.Parse(row["PROGRAM_ID"].ToString()), 0, ContainDefCourseValue); PorgramLST.Add(objProgram); } if (ContainDefPorgramValue == "Y") { PorgramLST.Insert(0, new ATTProgram(0, 0, "--- Select Program ---", 0, "", "", "", "", 0, "", "", "")); } return(PorgramLST); }