public static void SetTopPriorityDepartment() { // increament in list of required list for next student list.Add("Matric"); list.Add("Inter"); list.Add("ECAT"); PreferenceDL orderObject2 = new PreferenceDL(); orderObject2.setARNinpreference(key); // list2 increament of test if not already entered if (list2.Count == 2) { } else if (list2.Count == 1) { if (list2.Contains("ILET")) { list2.Add("GAT"); } else { list2.Add("ILETS"); } } else { list2.Add("GAT"); list2.Add("ILETS"); } // refresh main form MainForm.Refresh(); }//set TOP priority function end
public static void SetTopPriorityDepartment() { // increament in list of required list for next student list.Add("Matric"); list.Add("Inter"); list.Add("ECAT"); PreferenceDL orderObject2 = new PreferenceDL(); orderObject2.setARNinpreference(key); // list2 increament of test if not already entered if (list2.Count == 2) { } else if (list2.Count == 1) { if (list2.Contains("ILET")) { list2.Add("GAT"); } else { list2.Add("ILETS"); } } else { list2.Add("GAT"); list2.Add("ILETS"); } //=========================Merit list setting===========================// /* * AcademicDL function call that return string */ string strMerit; string nameofSyudent; // return ARN, Dept,Category,Aggregate strMerit = Education.sortFirstPreferenceDegree(); int keyValue; try { if (strMerit != "") { string[] strinMeritList = strMerit.Split(','); float agg = float.Parse(strinMeritList[3]); keyValue = int.Parse(strinMeritList[0]); // get name of student nameofSyudent = personalStd.getNameOfstd(keyValue); // zero index has name and 1 email string[] strNameEmail = nameofSyudent.Split(','); if (strNameEmail.Length > 0) { mailList.Add(strNameEmail[1]); } /* * // ARN,Name,Depart,Category,Agg */ if (strinMeritList[2] == "A") { tableMeritList.Rows.Add(keyValue, strNameEmail[0], strinMeritList[1], strinMeritList[2], strinMeritList[3]); printString += "" + keyValue + " " + strNameEmail[0] + " " + strinMeritList[1] + " " + strinMeritList[2] + " " + strinMeritList[3] + "\n"; } else if (strinMeritList[2] == "B") { tableMeritList.Rows.Add(keyValue, strNameEmail[0], strinMeritList[1], strinMeritList[2], strinMeritList[3]); printString += "" + keyValue + " " + strNameEmail[0] + " " + strinMeritList[1] + " " + strinMeritList[2] + " " + strinMeritList[3] + "\n"; } else if (strinMeritList[2] == "C") { tableMeritList.Rows.Add(keyValue, strNameEmail[0], strinMeritList[1], strinMeritList[2], strinMeritList[3]); printString += "" + keyValue + " " + strNameEmail[0] + " " + strinMeritList[1] + " " + strinMeritList[2] + " " + strinMeritList[3] + "\n"; } else { System.Console.WriteLine("Seats are not available"); } } else { // do nothing } } catch (Exception ex) { MessageBox.Show(ex.Message); } // refresh main form MainForm.Refresh(); }//set TOP priority function end