public void FillFacultyWiseCourseCoursePart(string FacID, string CrID, string MoLrnID, string PtrnID, string BrnID, string CrPrDetailsID) { clsCommon common = new clsCommon(); DataTable dt; ddlFaculty.Items.Clear(); try { dt = InstRep.AssignedConfirmedFaculties(hidUniID.Value, hidInstID.Value); } catch (Exception ex) { throw new Exception(ex.Message); } Common.fillDropDown(ddlFaculty, dt, FacID, "Fac_Desc", "pk_Fac_ID", "--- Select ---"); ddlCourse.Items.Clear(); try { dt = InstRep.AssignedConfirmedCourses(hidUniID.Value, hidInstID.Value, FacID); } catch (Exception ex) { throw new Exception(ex.Message); } common.fillDropDown(ddlCourse, dt, CrID, "Cr_Desc", "pk_Cr_ID", "--- Select ---"); ddlMoLrn.Items.Clear(); try { dt = InstRep.AssignedConfirmedModeOfLearning(hidUniID.Value, hidInstID.Value, FacID, CrID); } catch (Exception ex) { throw new Exception(ex.Message); } common.fillDropDown(ddlMoLrn, dt, MoLrnID, "MoLrn_Type", "pk_MoLrn_ID", "--- Select ---"); ddlCrPtrn.Items.Clear(); try { dt = InstRep.AssignedConfirmedCoursePatterns(hidUniID.Value, hidInstID.Value, FacID, CrID, MoLrnID); } catch (Exception ex) { throw new Exception(ex.Message); } common.fillDropDown(ddlCrPtrn, dt, PtrnID, "text", "value", "--- Select ---"); ddlBranch.Items.Clear(); try { dt = InstRep.AssignedConfirmedBranches(hidUniID.Value, hidInstID.Value, FacID, CrID, MoLrnID, PtrnID); } catch (Exception ex) { throw new Exception(ex.Message); } if (hidBranchName.Value == "No Branch") { ddlBranch.Items.Insert(0, "No Branch"); } else { common.fillDropDown(ddlBranch, dt, BrnID, "Text", "Value", "--- Select ---"); } dt.Dispose(); }