Exemplo n.º 1
0
    public StudentData1 getStudentDataBase1(string ID)
    {
        CaseDataBase SDB = new CaseDataBase();
        StudentData1 returnValue=new StudentData1();
        if (int.Parse(SDB._StaffhaveRoles[3]) == 1)
        {

            returnValue=SDB.getStudentData1(ID);
        }
        else
        {
            returnValue.checkNo = _getcheckNo;
            returnValue.errorMsg = _errorMsg;
        }
        StaffDataBase sDB = new StaffDataBase();
        List<string> UserFile = sDB.getStaffDataName(HttpContext.Current.User.Identity.Name);
        if (returnValue.Unit != UserFile[2] && int.Parse(SDB._StaffhaveRoles[4]) == 0 && UserFile[1].Length > 0)
        {
            returnValue.checkNo = _getcheckNo;
            returnValue.errorMsg = _errorMsg;
        }
        return returnValue;
    }