/// <summary>
    /// this method using for get the student data and return table 
    /// </summary>
    public void DisplayStudent_Grid()
    {

        try
        {
            StudentClassObject = new StudentClass();
            ds = new DataSet();
            ds = StudentClassObject.GetStudentData(Convert.ToInt32(Session["ID"].ToString()), "");
            GridView1.DataSource = null;
            if (ds.Tables.Count != 0)
            {
                GridView1.DataSource = ds.Tables[0];
            }

            //GridView1.DataBind();
        }
        catch (Exception)
        {
            GridView1.DataSource = null;
        }
        finally
        {
            GridView1.DataBind();
        }
    }
    public void GetStudentDetails_Json(string Session_Key, string Student_No)
    {
        int LoginID = 0;
        rows = new List<Dictionary<string, object>>();
        serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
        if (HttpContext.Current.Session["ID"] == null)
        {

            Context.Response.Write("[{Status: Login is experied}]");
        }
        else if (Convert.ToString(HttpContext.Current.Session.SessionID) == Session_Key)
        {

            DataTable dt = new DataTable();
            StudentClsObject = new StudentClass();
            ds = new DataSet();
            try
            {

                LoginID = Convert.ToInt32(HttpContext.Current.Session["ID"].ToString());
                ds = StudentClsObject.GetStudentData(LoginID, Student_No);
                dt = ds.Tables[0];
                Dictionary<string, object> row;
                foreach (DataRow dr in dt.Rows)
                {
                    row = new Dictionary<string, object>();
                    foreach (DataColumn col in dt.Columns)
                    {
                        row.Add(col.ColumnName, dr[col]);
                    }
                    rows.Add(row);
                }

            }
            catch (Exception)
            {


            }
            if (rows.Count > 0)
            {

                Context.Response.Write(serializer.Serialize(rows));
            }
        }
        else
        {
            // Context.Response.Clear();
            //  Context.Response.ContentType = "application/json; charset=utf-8";
            Context.Response.Write("[{Status: Session key is not Matched}]");
        }
    }
    public void GetStudentDetails_Json(string Session_Key, string Student_No)
    {
        int LoginID = 0;

        rows       = new List <Dictionary <string, object> >();
        serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
        if (HttpContext.Current.Session["ID"] == null)
        {
            Context.Response.Write("[{Status: Login is experied}]");
        }
        else if (Convert.ToString(HttpContext.Current.Session.SessionID) == Session_Key)
        {
            DataTable dt = new DataTable();
            StudentClsObject = new StudentClass();
            ds = new DataSet();
            try
            {
                LoginID = Convert.ToInt32(HttpContext.Current.Session["ID"].ToString());
                ds      = StudentClsObject.GetStudentData(LoginID, Student_No);
                dt      = ds.Tables[0];
                Dictionary <string, object> row;
                foreach (DataRow dr in dt.Rows)
                {
                    row = new Dictionary <string, object>();
                    foreach (DataColumn col in dt.Columns)
                    {
                        row.Add(col.ColumnName, dr[col]);
                    }
                    rows.Add(row);
                }
            }
            catch (Exception)
            {
            }
            if (rows.Count > 0)
            {
                Context.Response.Write(serializer.Serialize(rows));
            }
        }
        else
        {
            // Context.Response.Clear();
            //  Context.Response.ContentType = "application/json; charset=utf-8";
            Context.Response.Write("[{Status: Session key is not Matched}]");
        }
    }
    /// <summary>
    /// this method using for get the student data and return table
    /// </summary>
    public void DisplayStudent_Grid()
    {
        try
        {
            StudentClassObject = new StudentClass();
            ds = new DataSet();
            ds = StudentClassObject.GetStudentData(Convert.ToInt32(Session["ID"].ToString()), "");
            GridView1.DataSource = null;
            if (ds.Tables.Count != 0)
            {
                GridView1.DataSource = ds.Tables[0];
            }

            //GridView1.DataBind();
        }
        catch (Exception)
        {
            GridView1.DataSource = null;
        }
        finally
        {
            GridView1.DataBind();
        }
    }
 public DataTable GetStudentDetails_Xml(int UserID, string StudentId)
 {
     StudentClsObject = new StudentClass();
     ds = StudentClsObject.GetStudentData(UserID, StudentId);
     return(ds.Tables[0]);
 }
    public DataTable GetStudentDetails_Xml(int UserID, string StudentId)
    {

        StudentClsObject = new StudentClass();
        ds = StudentClsObject.GetStudentData(UserID, StudentId);
        return ds.Tables[0];

    }