public void bindJumpNotification() { clsJump j = new clsJump(); DataSet ds = j.ListJumpRequests(j); gvJumpNotification.DataSource = ds; gvJumpNotification.DataBind(); }
public void RequestJump(clsJump jump) { SqlParameter[] sp = new SqlParameter[4]; sp[0] = new SqlParameter("@Student_ID",jump.Student_ID); sp[1] = new SqlParameter("@Reason",jump.Reason); sp[2] = new SqlParameter("@IsApproved",jump.Is_Approved); sp[3] = new SqlParameter("@IsRejected", jump.Is_Rejected); datalayer.Execute_NonQuery("sp_RequestJump", CommandType.StoredProcedure, sp); }
protected void btnSaveReason_Click(object sender, EventArgs e) { clsJump j = new clsJump(); j.Reason = txtReason.Text; j.Student_ID = Convert.ToInt32(Session["Student_ID"]); j.RequestJump(j); bindJumpInfo(); pnlform.Visible = false; pnldata.Visible = true; }
public void bindJumpInfo() { clsJump cs = new clsJump(); DataSet ds = cs.ListJump(uname); gvJumpRequest.DataSource = ds; gvJumpRequest.DataBind(); if (ds.Tables[0].Rows.Count > 0) { btnRequestNewJump.Visible = false; pnlNotification.Visible = true; } }
protected void ckIsRejected_CheckedChanged(object sender, EventArgs e) { GridViewRow gr = (GridViewRow)((DataControlFieldCell)((CheckBox)sender).Parent).Parent; HiddenField hfStudentID = (HiddenField)gr.FindControl("hfStudentID"); int StudentID = Convert.ToInt32(hfStudentID.Value); clsJump j = new clsJump(); bool i = j.RejectJump(StudentID); if (i) { bindJumpNotification(); } else { } }
public DataSet ListJumpRequests(clsJump j) { return datalayer.get_data("sp_ListJumpRequests",CommandType.StoredProcedure,null); }