protected void btnSubmit_Click(object sender, EventArgs e) { if (this.ddlProgram_Rqd.SelectedIndex == 0) { this.lblStatus.Text = "Save Error"; this.lblStatusMessage.Text = "Please Select Program"; this.programmaticModalPopup.Show(); return; } int?courseID; if (this.ddlCourse_Rqd.SelectedIndex == 0) { courseID = null; } else { courseID = int.Parse(this.ddlCourse_Rqd.SelectedValue); } List <ATTSessionCourseMember> CMMarksLST = new List <ATTSessionCourseMember>(); foreach (GridViewRow gvRow in this.grdFacultymember.Rows) { if (((TextBox)gvRow.FindControl("txtMarksObtained")).Text != "") { CMMarksLST.Add(new ATTSessionCourseMember ( int.Parse(Session["OrgID"].ToString()), int.Parse(this.ddlProgram_Rqd.Text), int.Parse(this.ddlSession_Rqd.Text), courseID, int.Parse(gvRow.Cells[0].Text), int.Parse(gvRow.Cells[1].Text), "", "", int.Parse(((TextBox)gvRow.FindControl("txtMarksObtained")).Text) )); } } BLLSessionCourseMember.UpdateResourcePersonMarks(CMMarksLST); ClearAll(); }
protected void ddlSession_Rqd_SelectedIndexChanged(object sender, EventArgs e) { List <ATTSession> lstSession = ((List <ATTProgram>)Session["DLPDS_Program_List"])[this.ddlProgram_Rqd.SelectedIndex].SessionLST; List <ATTSessionCourse> lstSC = lstSession[this.ddlSession_Rqd.SelectedIndex].LstSessionCourse; this.ddlCourse_Rqd.DataSource = lstSC; this.ddlCourse_Rqd.DataTextField = "CourseName"; this.ddlCourse_Rqd.DataValueField = "CourseID"; this.ddlCourse_Rqd.DataBind(); List <ATTSessionCourseMember> SCMemberLST = BLLSessionCourseMember.GetSessionCourseMemberForMarks(int.Parse(Session["OrgID"].ToString()), int.Parse(this.ddlProgram_Rqd.SelectedValue), int.Parse(this.ddlSession_Rqd.SelectedValue), null); this.grdFacultymember.DataSource = SCMemberLST; this.grdFacultymember.DataBind(); foreach (GridViewRow gvRow in this.grdFacultymember.Rows) { ((TextBox)gvRow.FindControl("txtMarksObtained")).Text = (gvRow.Cells[4].Text == "0") ? "" : gvRow.Cells[4].Text; } //this.ClearME(); }