Esempio n. 1
0
        public ActionResult <SiblingAddUpdateForStudentModel> RemoveSibling(SiblingAddUpdateForStudentModel siblingAddUpdateForStudentModel)
        {
            SiblingAddUpdateForStudentModel siblingRemove = new SiblingAddUpdateForStudentModel();

            try
            {
                siblingRemove = _studentService.RemoveSibling(siblingAddUpdateForStudentModel);
            }
            catch (Exception es)
            {
                siblingRemove._message = es.Message;
                siblingRemove._failure = true;
            }
            return(siblingRemove);
        }
Esempio n. 2
0
        public ActionResult <SiblingAddUpdateForStudentModel> AssociationSibling(SiblingAddUpdateForStudentModel siblingAddUpdateForStudentModel)
        {
            SiblingAddUpdateForStudentModel siblingAddUpdateForStudent = new SiblingAddUpdateForStudentModel();

            try
            {
                siblingAddUpdateForStudent = _studentService.AssociationSibling(siblingAddUpdateForStudentModel);
            }
            catch (Exception es)
            {
                siblingAddUpdateForStudent._failure = true;
                siblingAddUpdateForStudent._message = es.Message;
            }
            return(siblingAddUpdateForStudent);
        }
Esempio n. 3
0
        /// <summary>
        /// Remove Sibling
        /// </summary>
        /// <param name="siblingAddUpdateForStudentModel"></param>
        /// <returns></returns>
        public SiblingAddUpdateForStudentModel RemoveSibling(SiblingAddUpdateForStudentModel siblingAddUpdateForStudentModel)
        {
            SiblingAddUpdateForStudentModel associationshipDelete = new SiblingAddUpdateForStudentModel();

            try
            {
                if (TokenManager.CheckToken(siblingAddUpdateForStudentModel._tenantName + siblingAddUpdateForStudentModel._userName, siblingAddUpdateForStudentModel._token))
                {
                    associationshipDelete = this.studentRepository.RemoveSibling(siblingAddUpdateForStudentModel);
                }
                else
                {
                    associationshipDelete._failure = true;
                    associationshipDelete._message = TOKENINVALID;
                }
            }
            catch (Exception es)
            {
                associationshipDelete._failure = true;
                associationshipDelete._message = es.Message;
            }
            return(associationshipDelete);
        }
Esempio n. 4
0
        /// <summary>
        /// Association Sibling
        /// </summary>
        /// <param name="siblingAddUpdateForStudentModel"></param>
        /// <returns></returns>
        public SiblingAddUpdateForStudentModel AssociationSibling(SiblingAddUpdateForStudentModel siblingAddUpdateForStudentModel)
        {
            SiblingAddUpdateForStudentModel siblingAddUpdateForStudent = new SiblingAddUpdateForStudentModel();

            try
            {
                if (TokenManager.CheckToken(siblingAddUpdateForStudentModel._tenantName + siblingAddUpdateForStudentModel._userName, siblingAddUpdateForStudentModel._token))
                {
                    siblingAddUpdateForStudent = this.studentRepository.AssociationSibling(siblingAddUpdateForStudentModel);
                }
                else
                {
                    siblingAddUpdateForStudent._failure = true;
                    siblingAddUpdateForStudent._message = TOKENINVALID;
                }
            }
            catch (Exception es)
            {
                siblingAddUpdateForStudent._failure = true;
                siblingAddUpdateForStudent._message = es.Message;
            }
            return(siblingAddUpdateForStudent);
        }