using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Collections.Generic; using nmsSetup; public partial class Admin_office_certificatemark : System.Web.UI.Page { clsBLSetup obj; PRPSetup objprp; protected void Page_Load(object sender, EventArgs e) { if (Session["OfficeAdmin"] == null) { Response.Redirect("../../Default.aspx"); } if (!Page.IsPostBack) { } lblMsg.Text = ""; } //---------------manual paging with repearter --------------------------------------------------- private void SelectDatail() { obj = new clsBLSetup(); objprp = new PRPSetup(); objprp.id = txtRegistration.Text; List lst = new List(); lst = obj.viewMarksDetail(objprp); if (lst.Count == 0) { lblMsg.Text = "Record not Find !"; } else { datalist.DataSource = lst; datalist.DataBind(); btnSave.Visible = false; Button1.Visible = true; } } protected void Button1_Click(object sender, EventArgs e) { string ss = DateTime.Now.ToString("yyyy/m/dd"); string querry = "", memberid = ""; string querry1 = ""; int cnt = 0; foreach (RepeaterItem item in datalist.Items) { if (cnt == 0) { querry = "delete from masterPracticalMark where pStudentCode=" + ((Label)item.FindControl("lblinvestorId")).Text + " ;"; querry1 = "delete from masterStudentPaperMark where pmStudentCode=" + ((Label)item.FindControl("lblinvestorId")).Text + " ;"; } //if (((CheckBox)item.FindControl("chk")).Checked == true) //{ string st = ((Label)item.FindControl("lblbranchid")).Text; string courseId = ((Label)item.FindControl("lblCourseId")).Text; string subId = ((Label)item.FindControl("scwSubjectId")).Text; if (((TextBox)item.FindControl("txtmodule1")).Text != "") { querry += "insert into masterPracticalMark (pSubjectId,pPracticalMark,pAttendanceStatus,pBranchId,pStudentCode,pModuleId) values(" + subId + "," + ((TextBox)item.FindControl("txtmodule1")).Text + ",'P'," + ((Label)item.FindControl("lblbranchid")).Text + "," + ((Label)item.FindControl("lblinvestorId")).Text + ",1" + ");"; querry1 += "insert into masterStudentPaperMark (pmStudentCode,pmModuleId,pmMarks,pmNegetiveMark,pmPaperId,pmIsActive,pmSubjectId) values(" + ((Label)item.FindControl("lblinvestorId")).Text + ",'" + ((Label)item.FindControl("lblModule")).Text + "'," + ((TextBox)item.FindControl("txtTheory")).Text + ",'0',NULL," + 1 + "," + subId + ");"; } if (((TextBox)item.FindControl("txtmodule1")).Text != "") { if (memberid != "") { memberid += ","; } memberid += ((Label)item.FindControl("lblinvestorId")).Text; } cnt = 1; //} } querry += " update joinPrint set printPracticalStatus=1 where printStudentId in (" + memberid + ")"; clsBLSetup obj = new clsBLSetup(); PRPSetup objprp = new PRPSetup(); objprp.name = querry; objprp.address = querry1; obj.insMarkDetail(objprp); SelectDatail(); } protected void btnSave_Click(object sender, EventArgs e) { SelectDatail(); } }