Exemplo n.º 1
0
        public void LoadLevelData(string Levelid)
        {
            try
            {
                EduLevelsRepository elir  = new EduLevelsRepository();
                EduLevel            level = elir.FindByid(Levelid.ToInt());


                if (level != null)
                {
                    lbltitle.Text = level.LevelTitle;

                    lbllevelid.Text = level.LevelID.ToString();
                    TextBox1.Text   = level.LevelTitle;
                }
                else
                {
                    Redirector.Goto(Redirector.PageName.errorpage);
                }
            }
            catch
            {
                Redirector.Goto(Redirector.PageName.errorpage);
            }
        }
Exemplo n.º 2
0
        public EduLevel FindByEduLevelID(string username, string password, int id)
        {
            WebServiceAccountsRepository webir       = new WebServiceAccountsRepository();
            WebServiceAccount            currentuser = webir.FindByUserName(username);

            if (currentuser != null)
            {
                if (currentuser.Password == password)
                {
                    EduLevelsRepository depir = new EduLevelsRepository();
                    return(depir.FindByid(id));
                }
                else
                {
                    return(null);
                }
            }

            else
            {
                return(null);
            }
        }