Exemple #1
0
        public string AddStudent(MdlStudent mdlStudentObj)
        {
            DbStudent dbStudentObj = new DbStudent();
            CtrEmail ctrEmailObj = new CtrEmail();

            mdlStudentObj.Salt = CreateSalt(10);
            mdlStudentObj.Password = CreateHash(mdlStudentObj.Password, mdlStudentObj.Salt);

            //mdlStudentObj.ConfirmationCode = ctrEmailObj.getCode();
            mdlStudentObj.ConfirmationCode = "none";
            string Feedback = dbStudentObj.AddStudent(mdlStudentObj);
            if (Feedback == "Error")
                return Feedback;

            //ctrEmailObj.send();
            return Feedback;
        }
 public bool Validate(string code)
 {
     CtrEmail ctrEmail = new CtrEmail();
     return ctrEmail.checkCodeExist(code);
 }