public int AuthenticatePrincipal(string ID, string password)
    {
        int num = 30;

        try
        {
            DataTable     table = new DataTable();
            Webservicedal t     = new Webservicedal();
            table = t.Authenticated_Sel_Principal(ID);
            if (table.Rows.Count <= 0)
            {
                return(num);
            }
            if (table.Rows[0]["IsExists"].ToString() == "1")
            {
                if (table.Rows[0]["Password"].ToString() != password)
                {
                    num = 2;
                }
                return(num);
            }
            return(1);
        }
        catch
        {
            return(1);
        }
    }
    public int Authenticate(string ID, string password)
    {
        int num = 1;

        try
        {
            DataTable     table = new DataTable();
            Webservicedal t     = new Webservicedal();
            table = t.Authenticated_Sel_UID(ID);
            if (table.Rows.Count <= 0)
            {
                return(num);
            }
            if (table.Rows[0]["Password"].ToString() == password)
            {
                if (bool.Parse(table.Rows[0]["IsStudent"].ToString()))
                {
                    return(10);
                }
                return(20);
            }
            else
            {
                num = 2;
            }
        }
        catch
        {
        }
        return(num);
    }