public static DialogResult Show(Entity_Student studentObj) { initialiseDialog(); dialogUpdatePlacementDetails.label_studentId.Text = studentObj.collegeId; dialogUpdatePlacementDetails.studentObj = studentObj; dialogUpdatePlacementDetails.isBulkUpdate = false; dialogUpdatePlacementDetails.dateTime_dor.MaxDate = DateTime.Now; dialogUpdatePlacementDetails.ShowDialog(); return(result); }
private void insertStudentData() { Persistence p = new PersistenceImpl(); var conf = new MyConfiguration(); conf.currentBatch = "2012-16"; conf.currentDegree = "B.TECH"; string[] branch = new string[5] { "Software", "COMPUTER SCIENCE", "MECHANICAL", "ECE", "CIVIL" }; string[] gender = new string[2] { "MALE", "FEMALE" }; int studentId = 1704; long scoreID = 247; var mylist = new List <Object>(); var scoreList = new List <Object>(); for (int i = 200; i < 2201; i++) { var student = new Entity_Student(); student.branch = branch[i % branch.Length]; student.collegeId = studentId.ToString(); student.email = "*****@*****.**"; student.gender = gender[i % gender.Length]; student.myConfigObj = conf; student.phone = "111111111"; student.studentName = "Student" + i; mylist.Add(student); studentId++; var score = new Entity_StudentScore(); score.arrears = 0; score.cgpa = 7.6; score.X = 85; score.XII = 78; score.studentId = scoreID; scoreList.Add(score); scoreID++; } if (p.bulkInsert(mylist)) { p.bulkInsert(scoreList); } }
public override bool Equals(Object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } if (this == obj) { return(true); } Entity_Student studentObj = obj as Entity_Student; return(studentId == studentObj.studentId); }
private void listView1_MouseDoubleClick(object sender, MouseEventArgs e) { if (!Utility.isNetworkAvailable()) { Dialog_MyMessageBox.Show(Validations.VALIDATION_NO_NETWORK, 1, UiColors.MESSAGE_ERROR); } else { Entity_Student studentObj = listView1.SelectedItems[0].Tag as Entity_Student; updateStatus.panel_search.Hide(); DialogResult result = Dialog_UpdateStudentCompany.Show(studentObj); if (result == DialogResult.Yes) { Dialog_MyMessageBox.Show(Constant.UPDATE_SUCCESS, 1, UiColors.MESSAGE_SUCCESS); updateStatus.placementStatusUpdated = true; } else if (result == DialogResult.No) { Dialog_MyMessageBox.Show(Constant.DATA_EXISTS, 1, UiColors.MESSAGE_ERROR); } updateStatus.panel_search.Show(); } }
private IList<object> getStudentData(Excel.Range xlRange) { if (xlRange != null) { if (xlRange.Columns.Count == Constant.DB_INSERT_STUDENT_DATA) { int rowCount = xlRange.Rows.Count; int colCount = xlRange.Columns.Count; var studentList = new List<Object>(); var scoreList = new List<Object>(); var clusteredList = new List<Object>(); Entity_Student studentObj; Entity_StudentScore scoreObj; MyConfiguration myconfObj; for (int currRow = 3; currRow <= rowCount; currRow++) { studentObj = new Entity_Student(); scoreObj = new Entity_StudentScore(); myconfObj = new MyConfiguration(); for (int currCol = 1; currCol <= colCount; currCol++) { if (xlRange.Cells[currRow, currCol] != null && xlRange.Cells[currRow, currCol].Value2 != null && xlRange.Cells[currRow, currCol].Value2.ToString() != string.Empty) { string currValue = xlRange.Cells[currRow, currCol].Value2.ToString(); switch (currCol) { case 1: studentObj.collegeId = currValue; scoreObj.collegeId = studentObj.collegeId; break; case 2: studentObj.studentName = currValue; break; case 3: studentObj.gender = currValue; break; case 4: studentObj.branch = currValue; break; case 5: myconfObj.currentDegree = currValue; break; case 6: myconfObj.currentBatch = currValue; break; case 7: studentObj.phone = currValue; break; case 8: studentObj.email = currValue; break; case 9: scoreObj.X = Convert.ToDouble(currValue); break; case 10: scoreObj.XII = Convert.ToDouble(currValue); break; case 11: scoreObj.cgpa = Convert.ToDouble(currValue); break; case 12: scoreObj.diploma = Convert.ToDouble(currValue); break; case 13: scoreObj.arrears = Convert.ToInt16(currValue); break; } } } studentObj.myConfigObj = myconfObj; studentList.Add(studentObj); scoreList.Add(scoreObj); studentObj = null; scoreObj = null; myconfObj = null; } clusteredList.Add(studentList); clusteredList.Add(scoreList); return clusteredList; } return null; } return null; }