示例#1
0
        public Address Save(Address objAddress)
        {
            _ReturnProc ret = ExecuteTuple("AddressSave", new object[] {
                new SqlParameter("AddressId", objAddress.AddressId),
                new SqlParameter("Line1", objAddress.Line1),
                new SqlParameter("Line2", objAddress.Line2),
                new SqlParameter("Neighbourhood", objAddress.Neighbourhood),
                new SqlParameter("City", objAddress.City),
                new SqlParameter("State", objAddress.State),
                new SqlParameter("ZipCode", objAddress.ZipCode),
                new SqlParameter("Latitude", objAddress.Latitude),
                new SqlParameter("Longitude", objAddress.Longitude),
                new SqlParameter("CountryId", objAddress.CountryId),
                new SqlParameter("PersonId", this.PersonId)
            });

            if (!ret.IsValid)
            {
                return(new Address
                {
                    ErrorMsg = ret.ErrorMsg
                });
            }

            return(ExecuteList("AddressList", new object[] {
                new SqlParameter("AddressId", ret.GetValue())
            }).FirstOrDefault());
        }
示例#2
0
        public Person Save(Person objPerson)
        {
            _ReturnProc ret = ExecuteTuple("PersonSave", new object[] {
                new SqlParameter("PersonId0", objPerson.PersonId),
                new SqlParameter("FirstName", objPerson.FirstName),
                new SqlParameter("LastName", objPerson.LastName),
                new SqlParameter("Email", objPerson.Email),
                new SqlParameter("Password", objPerson.Password),
                new SqlParameter("BirthDate", objPerson.BirthDate),
                new SqlParameter("Mobile", objPerson.Mobile),
                new SqlParameter("AddressId", objPerson.AddressId),
                new SqlParameter("PersonId", this.PersonId)
            });

            if (!ret.IsValid)
            {
                return(new Person
                {
                    ErrorMsg = ret.ErrorMsg
                });
            }

            return(ExecuteList("PersonList", new object[] {
                new SqlParameter("PersonId", ret.GetValue())
            }).FirstOrDefault());
        }
示例#3
0
        public Profile Save(Profile objProfile)
        {
            _ReturnProc ret = ExecuteTuple("ProfileSave", new object[] {
                new SqlParameter("ProfileId", objProfile.ProfileId),
                new SqlParameter("ProfileDesc", objProfile.ProfileDesc),
                new SqlParameter("PersonId", this.PersonId)
            });

            if (!ret.IsValid)
            {
                return(new Profile
                {
                    ErrorMsg = ret.ErrorMsg
                });
            }

            return(ExecuteList("ProfileList", new object[] {
                new SqlParameter("ProfileId", ret.GetValue())
            }).FirstOrDefault());
        }
        public SchoolType Save(SchoolType objSchoolType)
        {
            _ReturnProc ret = ExecuteTuple("SchoolTypeSave", new object[] {
                new SqlParameter("SchoolTypeId", objSchoolType.SchoolTypeId),
                new SqlParameter("SchoolTypeDesc", objSchoolType.SchoolTypeDesc),
                new SqlParameter("PersonId", this.PersonId)
            });

            if (!ret.IsValid)
            {
                return(new SchoolType
                {
                    ErrorMsg = ret.ErrorMsg
                });
            }

            return(ExecuteList("SchoolTypeList", new object[] {
                new SqlParameter("SchoolTypeId", ret.GetValue())
            }).FirstOrDefault());
        }
示例#5
0
        public Question Save(Question objQuestion)
        {
            _ReturnProc ret = ExecuteTuple("QuestionSave", new object[] {
                new SqlParameter("QuestionId", objQuestion.QuestionId),
                new SqlParameter("QuestionDesc", objQuestion.QuestionDesc),
                new SqlParameter("PersonId", this.PersonId)
            });

            if (!ret.IsValid)
            {
                return(new Question
                {
                    ErrorMsg = ret.ErrorMsg
                });
            }

            return(ExecuteList("QuestionList", new object[] {
                new SqlParameter("QuestionId", ret.GetValue())
            }).FirstOrDefault());
        }
示例#6
0
        public StudentAnwser Save(StudentAnwser objStudentAnwser)
        {
            _ReturnProc ret = ExecuteTuple("StudentAnwserSave", new object[] {
                new SqlParameter("QuestionOptionId", objStudentAnwser.QuestionOptionId),
                new SqlParameter("StudentId", objStudentAnwser.StudentId),
                new SqlParameter("PersonId", this.PersonId)
            });

            if (!ret.IsValid)
            {
                return(new StudentAnwser
                {
                    ErrorMsg = ret.ErrorMsg
                });
            }

            return(ExecuteList("StudentAnwserList", new object[] {
                new SqlParameter("StudentAnwserId", ret.GetValue())
            }).FirstOrDefault());
        }
示例#7
0
        public School Save(School objSchool)
        {
            _ReturnProc ret = ExecuteTuple("SchoolSave", new object[] {
                new SqlParameter("SchoolId", objSchool.SchoolId),
                new SqlParameter("SchoolName", objSchool.SchoolName),
                new SqlParameter("AddressId", objSchool.AddressId),
                new SqlParameter("DirectorId", objSchool.DirectorId),
                new SqlParameter("PersonId", this.PersonId)
            });

            if (!ret.IsValid)
            {
                return(new School
                {
                    ErrorMsg = ret.ErrorMsg
                });
            }

            return(ExecuteList("SchoolList", new object[] {
                new SqlParameter("SchoolId", ret.GetValue())
            }).FirstOrDefault());
        }
示例#8
0
        public Student Save(Student objStudent)
        {
            _ReturnProc ret = ExecuteTuple("StudentSave", new object[] {
                new SqlParameter("StudentId", objStudent.StudentId),
                new SqlParameter("SchoolId", objStudent.SchoolId),
                new SqlParameter("GradeId", objStudent.GradeId),
                new SqlParameter("Notes", objStudent.Notes),
                new SqlParameter("PersonId", this.PersonId)
            });

            if (!ret.IsValid)
            {
                return(new Student
                {
                    ErrorMsg = ret.ErrorMsg
                });
            }

            return(ExecuteList("StudentList", new object[] {
                new SqlParameter("StudentId", ret.GetValue())
            }).FirstOrDefault());
        }