//Bind Parent Grid #region Bind Parent Grid //Student Grid Bind #region [Student Grid Bind] private void GrdStudentBind() { try { objEWA.OrgId = Convert.ToString(Session["OrgId"]); objEWA.CourseId = ddlCourse.SelectedValue.ToString(); objEWA.BranchId = ddlBranch.SelectedValue.ToString(); objEWA.ClassId = ddlClass.SelectedValue.ToString(); DataSet ds = objBL.StudentGridBind_BL(objEWA); if (ds.Tables[0].Rows.Count == 0 || ds == null) { msgBox.ShowMessage("No Record Found !!!", "Saved", UserControls.MessageBox.MessageStyle.Information); } else { GrdStudent.DataSource = ds; GrdStudent.DataBind(); } } catch (Exception) { throw; } }
private void BindCourse() { try { EWA_Common objEWA = new EWA_Common(); BL_Common objBL = new BL_Common(); objEWA.OrgId = Session["OrgId"].ToString(); DataSet ds = objBL.BindCourses_BL(objEWA); ViewState["dvBranch"] = ds.Tables[2]; ViewState["dvClass"] = ds.Tables[3]; ViewState["dvDivision"] = ds.Tables[4]; ViewState["dvStudentData"] = ds.Tables[5]; ddlCourse.DataSource = ds.Tables[0]; ddlCourse.DataTextField = "CourseName"; ddlCourse.DataValueField = "CourseId"; ddlCourse.DataBind(); ddlCourse.Items.Insert(0, new ListItem("---Select---", "0")); ddlCasteCategory.DataSource = ds.Tables[1]; ddlCasteCategory.DataTextField = "CasteCategoryName"; ddlCasteCategory.DataValueField = "CasteCategoryId"; ddlCasteCategory.DataBind(); ddlCasteCategory.Items.Insert(0, new ListItem("---Select---", "0")); DDLAcademicYear.DataSource = ds.Tables[7]; DDLAcademicYear.DataTextField = "AcademicYear"; DDLAcademicYear.DataValueField = "AcademicYearId"; DDLAcademicYear.DataBind(); DDLAcademicYear.Items.Insert(0, new ListItem("---Select---", "0")); ddlBranch.Items.Clear(); ddlBranch.Items.Insert(0, new ListItem("---Select---", "0")); ddlClass.Items.Clear(); ddlClass.Items.Insert(0, new ListItem("---Select---", "0")); if (IsPostBack) { GrdStudent.DataSource = ds.Tables[5]; GrdStudent.DataBind(); gvPrint.DataSource = ds.Tables[5]; gvPrint.DataBind(); ViewState["PrintData"] = ds.Tables[5]; } } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }
private void BindCourse() { try { EWA_Common objEWA = new EWA_Common(); BL_Common objBL = new BL_Common(); objEWA.OrgId = Session["OrgId"].ToString(); DataSet ds = objBL.BindCourses_BL(objEWA); ViewState["dvcast"] = ds.Tables[1]; ViewState["dvBranch"] = ds.Tables[2]; ViewState["dvClass"] = ds.Tables[3]; //ViewState["dvDivision"] = ds.Tables[4]; ViewState["dvStudentData"] = ds.Tables[5]; ddlCourse.DataSource = ds.Tables[0]; ddlCourse.DataTextField = "CourseName"; ddlCourse.DataValueField = "CourseId"; ddlCourse.DataBind(); ddlCourse.Items.Insert(0, new ListItem("---Select---", "0")); ddlCasteCategory.DataSource = ds.Tables[1]; ddlCasteCategory.DataTextField = "CasteCategoryName"; ddlCasteCategory.DataValueField = "CasteCategoryId"; ddlCasteCategory.DataBind(); ddlCasteCategory.Items.Insert(0, new ListItem("---Select---", "0")); DDLAcademicYear.DataSource = ds.Tables[7]; DDLAcademicYear.DataTextField = "AcademicYear"; DDLAcademicYear.DataValueField = "AcademicYearId"; DDLAcademicYear.DataBind(); DDLAcademicYear.Items.Insert(0, new ListItem("---Select---", "0")); ddlBranch.Items.Clear(); ddlBranch.Items.Insert(0, new ListItem("---Select---", "0")); ddlClass.Items.Clear(); ddlClass.Items.Insert(0, new ListItem("---Select---", "0")); ddlDivision.Items.Clear(); ddlDivision.Items.Insert(0, new ListItem("---Select---", "0")); GrdStudent.DataSource = ds.Tables[5]; GrdStudent.DataBind(); //GrdStudent.DataSource = db.Displaygrid("SELECT tblStudent.UserCode, tblAdmissionDetails.FirstName, tblAdmissionDetails.MiddleName, tblAdmissionDetails.LastName, tblCourse.CourseName, tblBranch.BranchName, tblClass.ClassName, tblAdmissionDetails.AdmissionYear FROM tblAdmissionDetails INNER JOIN tblStudent ON tblAdmissionDetails.AdmissionID = tblStudent.AdmissionId INNER JOIN tblCourse ON tblAdmissionDetails.CourseId = tblCourse.CourseId INNER JOIN tblBranch ON tblAdmissionDetails.BranchId = tblBranch.BranchId INNER JOIN tblClass ON tblAdmissionDetails.ClassId = tblClass.ClassId where tblAdmissionDetails.OrgID='" + Convert.ToInt32(Session["OrgId"]) + "'"); //GrdStudent.DataBind(); gvPrint.DataSource = ds.Tables[5]; gvPrint.DataBind(); ViewState["PrintData"] = ds.Tables[5]; } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }
void clear() { GrdEmployee.DataSource = ""; GrdEmployee.DataBind(); //GrdParent.DataSource = ""; //GrdParent.DataBind(); GrdStudent.DataSource = ""; GrdStudent.DataBind(); txtMessage.Text = ""; }
//Added by Ashwini 23-Oct-2020 protected void btnSearch_Click(object sender, EventArgs e) { EWA_Common objEWA = new EWA_Common(); BL_Common objBL = new BL_Common(); objEWA.student = txtSearchStudname.Text; DataSet ds = objBL.GetStudentWiseData(objEWA); GrdStudent.DataSource = ds; GrdStudent.DataBind(); }
//Student Chnaging #region [Student Changing] protected void GrdStudent_PageIndexChanging(object sender, GridViewPageEventArgs e) { try { GrdStudent.PageIndex = e.NewPageIndex; GrdStudent.DataSource = dsGrdStudent; GrdStudent.DataBind(); } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }
public void BindStudentList(string rblStatus) { EWA_Common objEWA = new EWA_Common(); BL_Common objBL = new BL_Common(); objEWA.OrgId = Session["OrgId"].ToString(); DataSet ds = objBL.BindCourses_BL(objEWA); ViewState["dvStudentData"] = ds.Tables[6]; dvStudentData = new DataView(ViewState["dvStudentData"] as DataTable); dvStudentData.RowFilter = "[Status] = '" + rblStatus + "'"; GrdStudent.DataSource = dvStudentData; GrdStudent.DataBind(); gvPrint.DataSource = dvStudentData; gvPrint.DataBind(); }
private void GetStudentData() { string strQuery = null; if (rblStatus.SelectedValue == "Admission Completed") { dvStudentData = new DataView(ViewState["dvStudentData_Completed"] as DataTable); ViewState["PrintData"] = dvStudentData; } else { dvStudentData = new DataView(ViewState["dvStudentData"] as DataTable); ViewState["PrintData"] = dvStudentData; } if (rblStatus.SelectedItem != null) { strQuery = "[Status] = '" + rblStatus.SelectedValue + "'"; } if (ddlCourse.SelectedValue != "0") { if (rblStatus.SelectedItem != null) { strQuery = "[CourseId] = " + ddlCourse.SelectedValue + " And [Status] = '" + rblStatus.SelectedValue + "'"; } else { strQuery = "[CourseId] = " + ddlCourse.SelectedValue + ""; } } if (ddlBranch.SelectedValue != "0") { strQuery = strQuery + " And [BranchId] = " + ddlBranch.SelectedValue + ""; } if (ddlClass.SelectedValue != "0") { strQuery = strQuery + " And [ClassId] = " + ddlClass.SelectedValue + ""; } dvStudentData.RowFilter = strQuery; GrdStudent.DataSource = dvStudentData; GrdStudent.DataBind(); gvPrint.DataSource = dvStudentData; gvPrint.DataBind(); ViewState["PrintableData"] = strQuery; }
protected void btnGo_Click(object sender, EventArgs e) { try { //GetStudentData(); EWA_Common objEWA = new EWA_Common(); BL_Common objBL = new BL_Common(); objEWA.OrgId = Session["OrgId"].ToString(); objEWA.CourseId = ddlCourse.SelectedValue; objEWA.BranchId = ddlBranch.SelectedValue; objEWA.ClassId = ddlClass.SelectedValue; objEWA.Status = rblStatus.SelectedValue; DataSet ds = objBL.Bind_AdmissionCompleted_BL(objEWA); GrdStudent.DataSource = ds.Tables[0]; GrdStudent.DataBind(); gvPrint.DataSource = ds.Tables[0]; gvPrint.DataBind(); //ViewState["PrintData"]= ds.Tables[0]; } catch (Exception ex) { } }
private void BindStudent() { try { EWA_Common objEWA = new EWA_Common(); BL_Common objBL = new BL_Common(); objEWA.OrgId = Session["OrgId"].ToString(); DataSet ds = objBL.BindCourses_BL(objEWA); ViewState["dvStudentData"] = ds.Tables[5]; GrdStudent.DataSource = ds.Tables[5]; GrdStudent.DataBind(); gvPrint.DataSource = ds.Tables[5]; gvPrint.DataBind(); ViewState["PrintData"] = ds.Tables[5]; } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }
private void GetStudentData() { string strQuery = null; dvStudentData = new DataView(ViewState["dvStudentData"] as DataTable); /////////////////////////////////////////////////////// if (ddlCourse.SelectedValue != "0") { if (ddlCasteCategory.SelectedValue == "0" && txtStudName.Text.Length == 0 && DDLAcademicYear.SelectedValue == "0") { strQuery = "[CourseId] = " + ddlCourse.SelectedValue + ""; } if (ddlCasteCategory.SelectedValue != "0") { strQuery = "[CasteCategoryId] = '" + ddlCasteCategory.SelectedValue + "' And [CourseId] = " + ddlCourse.SelectedValue + ""; } if (txtStudName.Text.Length != 0) { strQuery = "[StudentName] like '" + txtStudName.Text + "%' And [CourseId] = " + ddlCourse.SelectedValue + ""; } if (DDLAcademicYear.SelectedValue != "0") { strQuery = "[AcademicYearId] = " + DDLAcademicYear.SelectedValue + " And [CourseId] = " + ddlCourse.SelectedValue + ""; } if (ddlCasteCategory.SelectedValue != "0" && txtStudName.Text.Length != 0) { strQuery = "[CasteCategoryId] = '" + ddlCasteCategory.SelectedValue + "' And [StudentName] like '" + txtStudName.Text + "%' And [CourseId] = " + ddlCourse.SelectedValue + ""; } if (ddlCasteCategory.SelectedValue != "0" && DDLAcademicYear.SelectedValue != "0") { strQuery = "[CasteCategoryId] = '" + ddlCasteCategory.SelectedValue + "' And [CourseId] = " + ddlCourse.SelectedValue + " And [AcademicYearId] = " + DDLAcademicYear.SelectedValue; } if (txtStudName.Text.Length != 0 && DDLAcademicYear.SelectedValue != "0") { strQuery = "[StudentName] like '" + txtStudName.Text + "%' And [CourseId] = " + ddlCourse.SelectedValue + " And [AcademicYearId] = " + DDLAcademicYear.SelectedValue; } if (ddlCasteCategory.SelectedValue != "0" && txtStudName.Text.Length != 0 && DDLAcademicYear.SelectedValue != "0") { strQuery = "[CasteCategoryId] = '" + ddlCasteCategory.SelectedValue + "' And [StudentName] like '" + txtStudName.Text + "%' And [CourseId] = " + ddlCourse.SelectedValue + " And [AcademicYearId] = " + DDLAcademicYear.SelectedValue; } } else if (ddlCasteCategory.SelectedValue != "0") { if (ddlCourse.SelectedValue == "0" && txtStudName.Text.Length == 0 && DDLAcademicYear.SelectedValue == "0") { strQuery = "[CasteCategoryId] = '" + ddlCasteCategory.SelectedValue + "'"; } if (txtStudName.Text.Length != 0) { strQuery = "[StudentName] like '" + txtStudName.Text + "%' And [CasteCategoryId] = '" + ddlCasteCategory.SelectedValue + "'"; } if (DDLAcademicYear.SelectedValue != "0") { strQuery = "[AcademicYearId] = " + DDLAcademicYear.SelectedValue + " And [CasteCategoryId] = '" + ddlCasteCategory.SelectedValue + "'"; } if (txtStudName.Text.Length != 0 && DDLAcademicYear.SelectedValue != "0") { strQuery = "[StudentName] like '" + txtStudName.Text + "%' And [CasteCategoryId] = '" + ddlCasteCategory.SelectedValue + "' And [AcademicYearId] = " + DDLAcademicYear.SelectedValue; } } else if (txtStudName.Text.Length != 0) { if (ddlCourse.SelectedValue == "0" && ddlCasteCategory.SelectedValue == "0" && DDLAcademicYear.SelectedValue == "0") { strQuery = "[StudentName] like '" + txtStudName.Text + "%'"; } if (DDLAcademicYear.SelectedValue != "0") { strQuery = "[AcademicYearId] = " + DDLAcademicYear.SelectedValue + " And [StudentName] like '" + txtStudName.Text + "%'"; } } else if (DDLAcademicYear.SelectedValue != "0") { if (ddlCourse.SelectedValue == "0" && ddlCasteCategory.SelectedValue == "0" && txtStudName.Text.Length == 0) { strQuery = "[AcademicYearId] = " + DDLAcademicYear.SelectedValue; } } ///////////////////////////////////////////////////// if (ddlBranch.SelectedValue != "0") { strQuery = strQuery + " And [BranchId] = " + ddlBranch.SelectedValue + ""; } if (ddlClass.SelectedValue != "0") { strQuery = strQuery + " And [ClassId] = " + ddlClass.SelectedValue + ""; } if (ddlDivision.SelectedValue != "0") { strQuery = strQuery + " And [DivisionId] = " + ddlDivision.SelectedValue + ""; } dvStudentData.RowFilter = strQuery; GrdStudent.DataSource = dvStudentData; // GrdStudent.DataSource = db.Displaygrid("SELECT tblStudent.UserCode, tblAdmissionDetails.FirstName, tblAdmissionDetails.MiddleName, tblAdmissionDetails.LastName, tblCourse.CourseName, tblBranch.BranchName, tblClass.ClassName, tblAdmissionDetails.AdmissionYear FROM tblAdmissionDetails INNER JOIN tblStudent ON tblAdmissionDetails.AdmissionID = tblStudent.AdmissionId INNER JOIN tblCourse ON tblAdmissionDetails.CourseId = tblCourse.CourseId INNER JOIN tblBranch ON tblAdmissionDetails.BranchId = tblBranch.BranchId INNER JOIN tblClass ON tblAdmissionDetails.ClassId = tblClass.ClassId where tblAdmissionDetails.OrgID='" + Convert.ToInt32(Session["OrgId"]) + "' AND tblAdmissionDetails.CourseId='"+ddlCourse.Text+"'"); GrdStudent.DataBind(); ViewState["PrintData"] = ViewState["PrintableData"] = strQuery; //ViewState["PrintableData"] = dvStudentData; }
private void GetStudentData() { string strQuery = null; dvStudentData = new DataView(ViewState["dvStudentData"] as DataTable); /////////////////////////////////////////////////////// if (ddlCourse.SelectedValue != "0") { if (ddlCasteCategory.SelectedValue == "0" && txtStudName.Text.Length == 0 && DDLAcademicYear.SelectedValue == "0") { strQuery = "[CourseId] = " + ddlCourse.SelectedValue + ""; } if (ddlCasteCategory.SelectedValue != "0") { strQuery = "[Caste] = '" + ddlCasteCategory.SelectedItem.Text + "' And [CourseId] = " + ddlCourse.SelectedValue + ""; } if (txtStudName.Text.Length != 0) { strQuery = "[StudentName] like '" + txtStudName.Text + "%' And [CourseId] = " + ddlCourse.SelectedValue + ""; } if (DDLAcademicYear.SelectedValue != "0") { strQuery = "[AcademicYearId] = " + DDLAcademicYear.SelectedValue + " And [CourseId] = " + ddlCourse.SelectedValue + ""; } if (ddlCasteCategory.SelectedValue != "0" && txtStudName.Text.Length != 0) { strQuery = "[CasteCategoryId] = '" + ddlCasteCategory.SelectedItem.Text + "' And [StudentName] like '" + txtStudName.Text + "%' And [CourseId] = " + ddlCourse.SelectedValue + ""; } if (ddlCasteCategory.SelectedValue != "0" && DDLAcademicYear.SelectedValue != "0") { strQuery = "[CasteCategoryId] = '" + ddlCasteCategory.SelectedItem.Text + "' And [CourseId] = " + ddlCourse.SelectedValue + " And [AcademicYearId] = " + DDLAcademicYear.SelectedValue; } if (txtStudName.Text.Length != 0 && DDLAcademicYear.SelectedValue != "0") { strQuery = "[StudentName] like '" + txtStudName.Text + "%' And [CourseId] = " + ddlCourse.SelectedValue + " And [AcademicYearId] = " + DDLAcademicYear.SelectedValue; } if (ddlCasteCategory.SelectedValue != "0" && txtStudName.Text.Length != 0 && DDLAcademicYear.SelectedValue != "0") { strQuery = "[CasteCategoryId] = '" + ddlCasteCategory.SelectedItem.Text + "' And [StudentName] like '" + txtStudName.Text + "%' And [CourseId] = " + ddlCourse.SelectedValue + " And [AcademicYearId] = " + DDLAcademicYear.SelectedValue; } } else if (ddlCasteCategory.SelectedValue != "0") { if (ddlCourse.SelectedValue == "0" && txtStudName.Text.Length == 0 && DDLAcademicYear.SelectedValue == "0") { strQuery = "[CasteCategoryId] = '" + ddlCasteCategory.SelectedItem.Text + "'"; } if (txtStudName.Text.Length != 0) { strQuery = "[StudentName] like '" + txtStudName.Text + "%' And [CasteCategoryId] = '" + ddlCasteCategory.SelectedItem.Text + "'"; } if (DDLAcademicYear.SelectedValue != "0") { strQuery = "[AcademicYearId] = " + DDLAcademicYear.SelectedValue + " And [CasteCategoryId] = '" + ddlCasteCategory.SelectedItem.Text + "'"; } if (txtStudName.Text.Length != 0 && DDLAcademicYear.SelectedValue != "0") { strQuery = "[StudentName] like '" + txtStudName.Text + "%' And [CasteCategoryId] = '" + ddlCasteCategory.SelectedItem.Text + "' And [AcademicYearId] = " + DDLAcademicYear.SelectedValue; } } else if (txtStudName.Text.Length != 0) { if (ddlCourse.SelectedValue == "0" && ddlCasteCategory.SelectedValue == "0" && DDLAcademicYear.SelectedValue == "0") { strQuery = "[StudentName] like '" + txtStudName.Text + "%'"; } if (DDLAcademicYear.SelectedValue != "0") { strQuery = "[AcademicYearId] = " + DDLAcademicYear.SelectedValue + " And [StudentName] like '" + txtStudName.Text + "%'"; } } else if (DDLAcademicYear.SelectedValue != "0") { if (ddlCourse.SelectedValue == "0" && ddlCasteCategory.SelectedValue == "0" && txtStudName.Text.Length == 0) { strQuery = "[AcademicYearId] = " + DDLAcademicYear.SelectedValue; } } ///////////////////////////////////////////////////// if (ddlBranch.SelectedValue != "0") { strQuery = strQuery + " And [BranchId] = " + ddlBranch.SelectedValue + ""; } if (ddlClass.SelectedValue != "0") { strQuery = strQuery + " And [ClassId] = " + ddlClass.SelectedValue + ""; } dvStudentData.RowFilter = strQuery; GrdStudent.DataSource = dvStudentData; GrdStudent.DataBind(); ViewState["PrintData"] = ViewState["PrintableData"] = strQuery; //ViewState["PrintableData"] = dvStudentData; }
private void UpgradeAcademicyear(string strAction) { try { EWA_Admission objEWA = new EWA_Admission(); BL_Admission objBAL = new BL_Admission(); int Userid = Convert.ToInt32(Session["UserCode"]); var count = GrdStudent.Rows.Count; string[] AdmissionID = new string[count]; int i = 0; int oldOrgId = Convert.ToInt32(Session["OrgId"].ToString()); foreach (GridViewRow gvrow in GrdStudent.Rows) { CheckBox chk = (CheckBox)gvrow.FindControl("chkbox"); if (chk != null && chk.Checked) { Label addmissionId = (Label)gvrow.FindControl("lbladdmissionid"); Label UserCode = (Label)gvrow.FindControl("lblUserCode"); Label Branch = (Label)gvrow.FindControl("lblBranch"); Label Class = (Label)gvrow.FindControl("LblClass"); Label AcademicYear = (Label)gvrow.FindControl("LblAcademicID"); string _drpcourse = drpcourse.SelectedValue; string _drpbranch = drpbranch.SelectedValue; string _drpclass = drpclass.SelectedValue; float castcatergoryid = db.getDb_Value(" select feescategory FROM tbladmissiondetails WHERE admissionid='" + addmissionId.Text + "' and OrgID='" + oldOrgId + "' "); float AcademicYearId = db.getDb_Value("SELECT AcademicYearId FROM tblStudent WHERE (UserCode = '" + UserCode.Text + "') and OrgID='" + oldOrgId + "' "); float fessid = 0; float FeesDetailsid = 0; string FeesParticular; float TotalAmt = 0; DateTime currentDate = System.DateTime.Now.Date; fessid = db.getDb_Value("SELECT top(1) dbo.tblFeesDetails.FeesId FROM dbo.tblFees INNER JOIN dbo.tblFeesDetails ON dbo.tblFees.FeesId = dbo.tblFeesDetails.FeesId where AcademicYearId='" + drpacedemicyear1.SelectedValue + "' and CourseId='" + _drpcourse + "' and BranchId='" + _drpbranch + "' and ClassId='" + _drpclass + "' and CasteCategoryId='" + castcatergoryid.ToString() + "' "); FeesDetailsid = db.getDb_Value("SELECT top(1) dbo.tblFeesDetails.FeesDetailsId FROM dbo.tblFees INNER JOIN dbo.tblFeesDetails ON dbo.tblFees.FeesId = dbo.tblFeesDetails.FeesId where AcademicYearId='" + drpacedemicyear1.SelectedValue + "' and CourseId='" + _drpcourse + "' and BranchId='" + _drpbranch + "' and ClassId='" + _drpclass + "' and CasteCategoryId='" + castcatergoryid.ToString() + "' "); if (fessid > 0) { DataTable dt = new DataTable(); cn.Close(); cn.Open(); using (SqlCommand cmd = new SqlCommand("SELECT top(1) dbo.tblFeesDetails.Particular FROM dbo.tblFees INNER JOIN dbo.tblFeesDetails ON dbo.tblFees.FeesId = dbo.tblFeesDetails.FeesId where AcademicYearId='" + drpacedemicyear1.SelectedValue + "' and CourseId='" + _drpcourse + "' and BranchId='" + _drpbranch + "' and ClassId='" + _drpclass + "' and CasteCategoryId='" + castcatergoryid.ToString() + "'", cn)) { cmd.CommandType = CommandType.Text; cmd.Connection = cn; SqlDataReader dr = cmd.ExecuteReader(); dt.Load(dr); FeesParticular = dt.Rows[0]["Particular"].ToString(); } TotalAmt = db.getDb_Value("select sum(Amount) as TotalAmount from tblFeesDetails where FeesId='" + Convert.ToInt32(fessid) + "' "); Shwmsg.Visible = false; BtnAddFees.Visible = false; } else { Shwmsg.Visible = true; Shwmsg.Text = "Please Add Fees For This Class"; BtnAddFees.Visible = true; return; } float reciptno = db.getDb_Value("SELECT Max(ReceiptNo) FROM tblStudentFeesPaid where StudentId='" + UserCode.Text + "'"); db.insert("update tblAdmissionDetails set CourseId='" + _drpcourse + "', BranchId='" + _drpbranch + "', ClassId='" + _drpclass + "' where AdmissionID='" + addmissionId.Text + "' "); db.insert("update tblStudent_Details set AcademicYearId=" + drpacedemicyear1.SelectedValue + " where AdmissionID='" + addmissionId.Text + "' "); db.insert("update [dbo].[tblStudentFeesPaid] set StudentId='" + UserCode.Text + "',FeesId='" + Convert.ToInt32(fessid) + "',TotalAmount='" + Convert.ToInt32(TotalAmt) + "',PaidAmount=0,PendingAmount='" + Convert.ToInt32(TotalAmt) + "',UserId= '" + Convert.ToInt32(Userid) + "',TransDate= '" + currentDate + "',remark= '" + FeesParticular.ToString() + "',FeesDetailsId= '" + Convert.ToInt32(FeesDetailsid) + "' where StudentId ='" + UserCode.Text + "' and GroupReceiptNo=0 "); objEWA.OrgID = Convert.ToInt32(Session["OrgId"].ToString()); objEWA.student_Code = UserCode.Text; objEWA.CourseId = ddlCourse.SelectedValue; objEWA.Branch_ID = Convert.ToInt32(Branch.Text); objEWA.ClassId = Class.Text; objEWA.AcademicYearID = AcademicYear.Text; objEWA.PinCode1 = Convert.ToInt32(Userid); string StatusSave = objBAL.SaveStudentFeesHistrory(objEWA); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alert", "alert('Student Promoted Successfully ..!!');window.location='NextAcademicYearSpecial.aspx';", true); } } dvBranch = null; dvClass = null; dvStudentData = null; dvdrpBranch = null; dvdrpClass = null; dvdrpStudentData = null; GrdStudent.DataSource = null; GrdStudent.DataBind(); BindCourse(); GetStudentData(); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alert", "alert('SomeThing Is Wrong..!!');window.location='NextAcademicYearSpecial.aspx';", true); } catch (Exception) { throw; } }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { var errorsAdding = GrdStudent.GetValue(Validation.ErrorsProperty); // var errorsUpdating = UpdStudent.GetValue(Validation.ErrorsProperty); }