private void DeleteStudentInfo(int admissionno) { VmStudentRegistration _objRegistration = new VmStudentRegistration(); _objRegistration.AdmissionNo = admissionno; long i = StudentListBLL.DeleteStudentInfobyAdmissionNo(_objRegistration); if (i > 0) { LoadStudentList(); } }
private void LoadStudentList() { try { DataTable dataTableDetails = StudentListBLL.GetAllStudent(); grdstulist.DataSource = dataTableDetails; grdstulist.DataBind(); //SetGridApearance(); } catch (Exception ex) { Alert.Show(ex.Message.ToString()); } }
protected void FilterstuID(VmStudentRegistration objvm) { try { Hashtable ht = new Hashtable(); ht.Add("StudentID", objvm.StudentID); DataTable dataTable = StudentListBLL.GetFilteredstudentlistwithStuID(ht); grdIDfilter.DataSource = dataTable; grdIDfilter.DataBind(); } catch (Exception ex) { Alert.Show(ex.Message.ToString()); } }
protected void FilterStuName(VmStudentRegistration objvm) { try { Hashtable ht = new Hashtable(); ht.Add("Name", objvm.sFirstName); ht.Add("Name", objvm.sLastName); ht.Add("Name", objvm.MiddleName); DataTable dataTable = StudentListBLL.GetFilteredstudentlistwithStuName(ht); grdNamefilter.DataSource = dataTable; grdNamefilter.DataBind(); } catch (Exception ex) { Alert.Show(ex.Message.ToString()); } }
private void EditstudentDetailstotextbox(int AdmissionNo) { try { Hashtable ht = new Hashtable(); ht.Add("AdmissionNo", AdmissionNo); DataTable dataTable = StudentListBLL.GetStudentInfobyAdmissionNo(ht); if (dataTable.Rows.Count > 0) { //txtadmsnnum.Text = dataTable.Rows[0]["AdmissionNo"].ToString(); //ddladmsndate.SelectedDate = (DateTime)dataTable.Rows[0]["AdmissioDate"]; //txtfn.Text = dataTable.Rows[0]["FirstName"].ToString(); //txtmdln.Text = dataTable.Rows[0]["MiddleName"].ToString(); //txtln.Text = dataTable.Rows[0]["LastName"].ToString(); //txtstuid.Text = dataTable.Rows[0]["StudentID"].ToString(); //ddlbatch.ClearSelection(); //ddlbatch.Text = dataTable.Rows[0]["BatchName"].ToString(); //ddlbatch.SelectedValue = dataTable.Rows[0]["Batch"].ToString(); //DateOfBirthS.SelectedDate = (DateTime)dataTable.Rows[0]["DOB"]; //ddlgender.ClearSelection(); //ddlgender.Text = dataTable.Rows[0]["GenderName"].ToString(); //ddlgender.SelectedValue = dataTable.Rows[0]["Gender"].ToString(); //ddlblood.ClearSelection(); //ddlblood.Text = dataTable.Rows[0]["BloodgroupName"].ToString(); //ddlblood.SelectedValue = dataTable.Rows[0]["Blood"].ToString(); //txtbirthplace.Text = dataTable.Rows[0]["BirthPlace"].ToString(); //ddlnationality.ClearSelection(); //ddlnationality.Text = dataTable.Rows[0]["NationalityName"].ToString(); //ddlnationality.SelectedValue = dataTable.Rows[0]["Nationality"].ToString(); //txtlang.Text = dataTable.Rows[0]["Language"].ToString(); //txtreli.Text = dataTable.Rows[0]["Religion"].ToString(); //ddlstucat.ClearSelection(); //ddlstucat.Text = dataTable.Rows[0]["StudentCategoryName"].ToString(); //ddlstucat.SelectedValue = dataTable.Rows[0]["StudentCategory"].ToString(); //txtcadds.Text = dataTable.Rows[0]["CurrentAddress"].ToString(); //txtpadds.Text = dataTable.Rows[0]["PermanentAddress"].ToString(); //txtcitys.Text = dataTable.Rows[0]["City"].ToString(); //txtstates.Text = dataTable.Rows[0]["State"].ToString(); //txtpins.Text = dataTable.Rows[0]["PinCode"].ToString(); //ddlstucountry.ClearSelection(); //ddlstucountry.Text = dataTable.Rows[0]["CountryName"].ToString(); //ddlstucountry.SelectedValue = dataTable.Rows[0]["Country"].ToString(); //txtphones.Text = dataTable.Rows[0]["PhoneNumber"].ToString(); //txtphone2s.Text = dataTable.Rows[0]["PhoneNumber2"].ToString(); //txtemails.Text = dataTable.Rows[0]["Email"].ToString(); } } catch (Exception) { throw; } }