Example #1
0
        //update
        public int Update(Advertisement n)
        {
            try
            {
                var getAdvertisement = db.Advertisements.Find(n.AdvertisementId);

                getAdvertisement.AdStartDate = n.AdStartDate;
                getAdvertisement.AdEndDate   = n.AdEndDate;
                getAdvertisement.AdPosition  = n.AdPosition;
                getAdvertisement.AdStatus    = n.AdStatus;
                getAdvertisement.AdName      = n.AdName;
                getAdvertisement.AdPhone     = n.AdPhone;
                getAdvertisement.AdEmail     = n.AdEmail;
                getAdvertisement.AdAddress   = n.AdAddress;
                getAdvertisement.AdLink      = n.AdLink;
                getAdvertisement.AdImage     = n.AdImage;

                db.SaveChanges();

                return(1);
            }
            catch (Exception)
            {
                return(0);
            }
        }
Example #2
0
 public bool Delete(int idJob)
 {
     try
     {
         var getJob = db.RecruitJobs.Find(idJob);
         getJob.RJStatus = 4;
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Example #3
0
        public bool UpdateStatus(int?status, int idRecruit)
        {
            try
            {
                var getRecruit = db.Recruits.Find(idRecruit);

                getRecruit.RIStatus = status;

                db.SaveChanges();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Example #4
0
        //update
        public int Update(New n)
        {
            try
            {
                var getNew = db.News.Find(n.NewsId);

                getNew.NTitle       = n.NTitle;
                getNew.NQuote       = n.NQuote;
                getNew.NDetail      = n.NDetail;
                getNew.NAvatar      = n.NAvatar;
                getNew.N_CategoryId = n.N_CategoryId;
                getNew.NType        = n.NType;
                getNew.Nstatus      = n.Nstatus;

                db.SaveChanges();

                return(1);
            }
            catch (Exception)
            {
                return(0);
            }
        }
Example #5
0
        public int Update(WebmasterInfo ef)
        {
            try
            {
                var get = db.WebmasterInfoes.Find(ef.WebmasterInfoId);

                get.WIUserName = ef.WIUserName;
                get.WIFullName = ef.WIFullName;
                get.WIAddress  = ef.WIAddress;
                get.WIGender   = ef.WIGender;
                get.WIBirthDay = ef.WIBirthDay;
                get.WIStatus   = ef.WIStatus;
                get.WIPosition = ef.WIPosition;
                get.WIType     = ef.WIType;

                db.SaveChanges();
                return(1);
            }
            catch (Exception)
            {
                return(0);
            }
        }
Example #6
0
        //Insert
        public bool Insert(SignUpNewsletter ef)
        {
            try
            {
                db.SignUpNewsletters.Add(ef);
                db.SaveChanges();


                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Example #7
0
        public int UpdateCandidate(Candidate cdd)
        {
            try
            {
                var getCandidate = db.Candidates.Find(cdd.CandidateId);

                getCandidate.CddFullName     = cdd.CddFullName;
                getCandidate.CPAvatar        = cdd.CPAvatar;
                getCandidate.CddAge          = cdd.CddAge;
                getCandidate.CddSex          = cdd.CddSex;
                getCandidate.CPExperience    = cdd.CPExperience;
                getCandidate.CP_ProfessionId = cdd.CP_ProfessionId;
                getCandidate.CP_SalaryId     = cdd.CP_SalaryId;
                getCandidate.CP_ExperienceId = cdd.CP_ExperienceId;
                getCandidate.CP_LevelId      = cdd.CP_LevelId;
                getCandidate.CP_WorkTypeId   = cdd.CP_WorkTypeId;
                getCandidate.CddAbout        = cdd.CddAbout;
                getCandidate.CddPhone        = cdd.CddPhone;
                getCandidate.CddEmail        = cdd.CddEmail;
                getCandidate.CddFacebook     = cdd.CddFacebook;
                getCandidate.CddGoogle       = cdd.CddGoogle;
                getCandidate.Cdd_CityId      = cdd.Cdd_CityId;
                getCandidate.Cdd_DistrictId  = cdd.Cdd_DistrictId;
                getCandidate.Cdd_WardId      = cdd.Cdd_WardId;
                getCandidate.CPStatus        = cdd.CPStatus;
                getCandidate.CddPathCV       = cdd.CddPathCV;
                getCandidate.CddDescribeCV   = cdd.CddDescribeCV;

                db.SaveChanges();

                return(1);
            }
            catch (Exception)
            {
                return(0);
            }
        }