Esempio n. 1
0
        public ResearchRoommateBo GetByPersonId(int idPerson)
        {
            ABLib.DAL.Sql.SqlParametersCollection oSqlParameters = new ABLib.DAL.Sql.SqlParametersCollection();
            oSqlParameters.Add("IdPerson", idPerson, SqlDbType.Int);

            ResearchRoommateBo researchRoommateBo = this.FillLst(this.SqlDbStoredProcedureDAL.ExecWithResultDt("ResearchRoommate_GetByPersonId", oSqlParameters)).FirstOrDefault();

            return(researchRoommateBo);
        }
Esempio n. 2
0
        public List <PlaceBo> GetByResearchRoommateId(int idResearchRoommate)
        {
            ABLib.DAL.Sql.SqlParametersCollection oSqlParameters = new ABLib.DAL.Sql.SqlParametersCollection();
            oSqlParameters.Add("IdResearchRoommate", idResearchRoommate, SqlDbType.Int);

            List <PlaceBo> lstPlaceBo = this.FillLst(this.SqlDbStoredProcedureDAL.ExecWithResultDt("Place_GetLstByResearchRoommateId", oSqlParameters));

            return(lstPlaceBo);
        }
Esempio n. 3
0
        public PersonBo GetByUserId(int idUser)
        {
            ABLib.DAL.Sql.SqlParametersCollection oSqlParameters = new ABLib.DAL.Sql.SqlParametersCollection();
            oSqlParameters.Add("IdUser", idUser, SqlDbType.Int);

            PersonBo personBo = this.FillLst(this.SqlDbStoredProcedureDAL.ExecWithResultDt("Person_GetByUderId", oSqlParameters)).FirstOrDefault();

            return(personBo);
        }
Esempio n. 4
0
        public bool Upd(PlaceBo placeBo, int idResearchRoommate, int idCreationProject)
        {
            ABLib.DAL.Sql.SqlParametersCollection oSqlParameters = new ABLib.DAL.Sql.SqlParametersCollection();
            oSqlParameters.Add("IdResearchRoommate", (idResearchRoommate == 0) ? null : idResearchRoommate.ToString(), SqlDbType.NVarChar);
            oSqlParameters.Add("IdCreationProject", (idCreationProject == 0) ? null : idCreationProject.ToString(), SqlDbType.NVarChar);
            oSqlParameters.Add("City", placeBo.City, SqlDbType.NVarChar);
            oSqlParameters.Add("PostalCode", placeBo.PostalCode, SqlDbType.NVarChar);
            oSqlParameters.Add("Department", placeBo.Department, SqlDbType.NVarChar);
            oSqlParameters.Add("DepartmentNumber", placeBo.DepartmentNumber, SqlDbType.NVarChar);
            oSqlParameters.Add("Region", placeBo.Region, SqlDbType.NVarChar);
            oSqlParameters.Add("Country", placeBo.Country, SqlDbType.NVarChar);
            oSqlParameters.Add("ScopeResearch", placeBo.ScopeResearch, SqlDbType.TinyInt);

            return(this.SqlDbStoredProcedureDAL.ExecWithTryCatch("Place_Upd", oSqlParameters));
        }
Esempio n. 5
0
        public int Upd(ResearchRoommateBo researchRoommateBo, int idPerson)
        {
            ABLib.DAL.Sql.SqlParametersCollection oSqlParameters = new ABLib.DAL.Sql.SqlParametersCollection();
            oSqlParameters.AddIdOut("IdResearchRoommate");
            oSqlParameters.Add("IdPerson", idPerson, SqlDbType.Int);
            oSqlParameters.Add("MaxBudget", researchRoommateBo.MaxBudget, SqlDbType.SmallInt);
            oSqlParameters.Add("EmailAlert", researchRoommateBo.EmailAlert, SqlDbType.TinyInt);
            oSqlParameters.Add("SearchCriteria", researchRoommateBo.SearchCriteria, SqlDbType.NVarChar);
            oSqlParameters.Add("EcoPractice", researchRoommateBo.EcoPractice, SqlDbType.NVarChar);
            oSqlParameters.Add("PictureName", researchRoommateBo.PictureName, SqlDbType.NVarChar);
            oSqlParameters.Add("ActivatedAnnouncement", 1, SqlDbType.Bit);

            this.SqlDbStoredProcedureDAL.Add(researchRoommateBo, "IdResearchRoommate", 0, "ResearchRoommate_Upd", oSqlParameters);

            return(researchRoommateBo.IdResearchRoommate);
        }
Esempio n. 6
0
        public int Add(PersonBo personBo, int idUser)
        {
            ABLib.DAL.Sql.SqlParametersCollection oSqlParameters = new ABLib.DAL.Sql.SqlParametersCollection();
            oSqlParameters.AddIdOut("IdPerson");
            oSqlParameters.Add("IdUser", idUser, SqlDbType.Int);
            oSqlParameters.Add("FirstName", personBo.FirstName, SqlDbType.NVarChar);
            oSqlParameters.Add("LastName", personBo.LastName, SqlDbType.NVarChar);
            oSqlParameters.Add("Civility", personBo.Civility, SqlDbType.TinyInt);
            oSqlParameters.Add("Country", personBo.Country, SqlDbType.NVarChar);
            oSqlParameters.Add("DateBorn", personBo.DateBorn, SqlDbType.Date);
            oSqlParameters.Add("Activity", personBo.Activity, SqlDbType.TinyInt);
            oSqlParameters.Add("PhoneCode", personBo.PhoneCode, SqlDbType.NVarChar);
            oSqlParameters.Add("PhoneNumber", personBo.PhoneNumber, SqlDbType.NVarChar);
            oSqlParameters.Add("ContactType", personBo.ContactType, SqlDbType.TinyInt);
            oSqlParameters.Add("PersonnalityDescription", personBo.PersonnalityDescription, SqlDbType.NVarChar);
            oSqlParameters.Add("DateInscription", DateTime.Now, SqlDbType.DateTime);
            oSqlParameters.Add("DateLastActivity", DateTime.Now, SqlDbType.DateTime);

            this.SqlDbStoredProcedureDAL.Add(personBo, "IdPerson", 0, "Person_Add", oSqlParameters);

            return(personBo.IdPerson);
        }