Ejemplo n.º 1
0
 public void bindJumpNotification()
 {
     clsJump j = new clsJump();
     DataSet ds = j.ListJumpRequests(j);
     gvJumpNotification.DataSource = ds;
     gvJumpNotification.DataBind();
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 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;
     }
 }
Ejemplo n.º 5
0
    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
        {

        }
    }
Ejemplo n.º 6
0
 public DataSet ListJumpRequests(clsJump j)
 {
     return datalayer.get_data("sp_ListJumpRequests",CommandType.StoredProcedure,null);
 }