Ejemplo n.º 1
0
        //public List<SelectListItem> ()
        //{
        //    AICPDAL.UserProfileDAL DAL = new AICPDAL.UserProfileDAL();
        //    UserVM finalmemberlist = new UserVM();
        //    //  x.queList =  DAL.SecurityQuestionList();
        //    var memlist = DAL.memberTypeList();

        //    foreach (var item in memlist.ToList())
        //    {
        //        finalmemberlist.memberList.Add(new SelectListItem() { Text = item.RoleName, Value = item.RoleID.ToString() });
        //    }

        //    return finalmemberlist.memberList;



        //        var jobData = db.jobs.Where(x => x.jobname.Contains(keyword) && x.Location.Contains(location)).ToList();
        //        foreach (var item in jobData)
        //        {
        //            searchData.Add(new JobSearch() { JobName = item.jobname, Company = item.company, Location = item.Location });
        //        }

        //}


        public void CreateNewUser(AICPJOBPORTAL.ViewModel.UserVM UserInformation)
        {
            // string replyMessage = "Error occured While Creating the User";

            AICPDAL.UserProfileDAL DAL = new AICPDAL.UserProfileDAL();

            AICPDAL.userdetail objUserDetail = new AICPDAL.userdetail();
            AICPDAL.user       objUser       = new AICPDAL.user();

            PropertyCopier.Copy(UserInformation.objUserDetail, objUserDetail);
            PropertyCopier.Copy(UserInformation.objUserInitials, objUser);
            objUser.Password = UserInformation.Password;


            DAL.CreateNewUser(objUserDetail, objUser);
        }
Ejemplo n.º 2
0
        public void CreateNewUser(userdetail userDetail, user user)
        {
            // string resultMessage = "successfully created user record";

            // var x = (AICPDAL.ViewModel.UserVM) userDetails;

            //var userInformation = userDetails;

            using (aicpdataEntities db = new aicpdataEntities())
            {
                //user userInfoNew = new user();

                //userInfo.UserID = user.UserID;
                //userInfoNew.UserName = user.UserName;
                //userInfoNew.Password = user.Password;
                //userInfoNew.questionid = user.questionid;
                //userInfoNew.hintanswer = user.hintanswer;
                //userInfoNew.createddate = System.DateTime.Now;
                //userInfoNew.modifieddate = System.DateTime.Now;
                //userInfoNew.IsForgotPassword = false;
                //userInfoNew.hintquestion2id = user.hintquestion2id;
                //userInfoNew.hintanswer2 = user.hintanswer2;
                //userInfoNew.hintquestion3id = user.hintquestion3id;
                //userInfoNew.hintanswer3 = user.hintanswer3;
                //userInfoNew.UserName = user.UserName;

                db.users.Add(user);
                db.SaveChanges();

                userDetail.UserID = user.UserID;

                //userdetail userDetailInfo = new userdetail();
                //userDetailInfo.UserID = user.UserID;
                //userDetailInfo.Address1 = userDetail.Address1;
                //userDetailInfo.Address2 = userDetail.Address2;
                //// userDetail.category = "software";
                //userDetailInfo.categoryid = userDetail.categoryid;
                //userDetailInfo.City = userDetail.City;
                //userDetailInfo.companyname = userDetail.companyname;
                //userDetailInfo.Country = userDetail.Country;
                //userDetailInfo.createddate = System.DateTime.Now;
                //userDetailInfo.EmailID = userDetail.EmailID;
                //userDetailInfo.FirstName = userDetail.FirstName;
                //userDetailInfo.LastName = userDetail.LastName;
                //userDetailInfo.MiddleName = userDetail.MiddleName;
                //userDetailInfo.MobileContact = userDetail.MobileContact;
                //userDetailInfo.State = userDetail.State;
                //userDetailInfo.subcategoryid = userDetail.subcategoryid;
                //userDetailInfo.Zipcode = userDetail.Zipcode;
                //userDetailInfo.WorkContact = userDetail.WorkContact;
                //userDetailInfo.MobileContact = userDetail.MobileContact;
                //  userDetail.FirstName = userDetails.

                db.userdetails.Add(userDetail);
                db.SaveChanges();
            }

            //    public SelectList GetResumeGuideLines()
            //{

            //    using (aicpdataEntities db = new aicpdataEntities())
            //    {
            //        var guidelines = db.resumeguidelines.Select(x => x.Guideline).ToList();
            //        //ViewBag.ResumeGuideLines = guidelines;
            //        return guidelines;
            //    }
        }