Esempio n. 1
0
        public JsonResult GetCandidateByICID(int ICID)
        {
            InterviewCandidateEntity CandidateDetails = null;

            try
            {
                var TktDtl = new InterviewCandidateComponent();
                CandidateDetails = TktDtl.GetCandidateByICID(ICID);
            }
            catch (Exception ex)
            {
                return(null);
            }
            return(Json(CandidateDetails, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        //[HttpPost]
        //public ActionResult CreateInterviewCandidate(string FirstName,string LastName, string Email, string MobileNumber,string Password, int InterviewForPositionname,string AssignmentDate,string AssignmentTime)
        //{
        //    using (var db = new EvolutyzCornerDataEntities())
        //    {

        //        try
        //        {

        //            InterviewCandidate nt = new InterviewCandidate();
        //            UserSessionInfo sessId = new UserSessionInfo();

        //            int IPID = Convert.ToInt32(InterviewForPositionname);
        //            int userID = sessId.UserId;
        //            int accid = sessId.AccountId;
        //            // DateTime date = Convert.ToDateTime(AssignmentDate);
        //           DateTime date = DateTime.ParseExact(AssignmentDate, "dd/MM/yyyy", CultureInfo.InvariantCulture);
        //            string pswd = GetMD5(Password);

        //            EvolutyzCornerDataEntities evolutyzData = new EvolutyzCornerDataEntities();

        //            InterviewCandidate Depart = new InterviewCandidate();
        //            InterviewCandidate Departs = new InterviewCandidate();
        //            InterviewCandidate user = new InterviewCandidate();

        //                Depart.Assessment_For_Positionid = IPID;
        //                Depart.FirstName = FirstName;
        //                Depart.LastName = LastName;
        //                Depart.Emailid = Email;
        //                Depart.MobileNo = MobileNumber;
        //                Depart.Password = pswd;
        //                Depart.RecrutementUserid = userID;
        //                Depart.AssessmentDate = date;
        //                Depart.AssessmentTime = AssignmentTime;
        //                Depart.CreatedDate = System.DateTime.Now;
        //                Depart.status = true;

        //                evolutyzData.InterviewCandidates.Add(Depart);
        //           // }

        //            int response = evolutyzData.SaveChanges();

        //            if (response > 0)
        //            {
        //                EvolutyzCornerDataEntities en = new EvolutyzCornerDataEntities();
        //                return Json("Data Added Successfully", JsonRequestBehavior.AllowGet);
        //                string FName = FirstName;
        //                string LName = LastName;
        //                string Pswd = Password;
        //                var Recuiteremail = (from a in en.Users where a.Usr_UserID == userID select a.Usr_LoginId).FirstOrDefault();
        //                SendEmailToresetpassword(FName, LName, Pswd, Recuiteremail);
        //            }
        //            else
        //            {
        //                return Json("Try Again!!", JsonRequestBehavior.AllowGet);
        //            }

        //        }
        //        catch (Exception EX)
        //        {

        //            throw;
        //        }
        //        //return null;
        //    }
        //}

        public string CreateInterviewCandidate(InterviewCandidateEntity InterviewDtl)
        {
            string          strResponse     = string.Empty;
            UserSessionInfo _objSessioninfo = Session["UserSessionInfo"] as UserSessionInfo;
            int             _userID         = _objSessioninfo.UserId;

            InterviewDtl.Createdby = _userID;
            var Org = new InterviewCandidateComponent();

            string Password = InterviewDtl.Password;

            InterviewDtl.Password = GetMD5(InterviewDtl.Password);

            int r = Org.AddIntCandidate(InterviewDtl);

            if (r == 0)
            {
                EvolutyzCornerDataEntities db = new EvolutyzCornerDataEntities();
                strResponse = "User created successfully";

                string FName         = InterviewDtl.FirstName;
                string LName         = InterviewDtl.LastName;
                int    RecUserid     = _userID;
                string password      = Password;
                var    RecuiterEmail = (from a in db.Users where a.Usr_UserID == RecUserid select a.Usr_LoginId).FirstOrDefault();

                SendEmailToresetpassword(FName, LName, RecUserid, password, RecuiterEmail);
            }
            else if (r == 1)
            {
                strResponse = "User already exists";
            }
            else if (r == -1)
            {
                strResponse = "Please Fill All Mandatory Fields";
            }
            else if (r == 2)
            {
                strResponse = "UserName already Exists";
            }
            else if (r == 3)
            {
                strResponse = "Loginid already Exists";
            }

            return(strResponse);
        }
Esempio n. 3
0
        public JsonResult GetInterviewCandidates()
        {
            UserSessionInfo sessId = new UserSessionInfo();
            int             userID = sessId.UserId;
            List <InterviewCandidateEntity> AccDetails = null;

            try
            {
                var objDtl = new InterviewCandidateComponent();
                AccDetails            = objDtl.GetInterviewCandidatesList();
                ViewBag.OrgAccDetails = AccDetails[0].ICID;
                ViewBag.Userid        = userID;
            }
            catch (Exception ex)
            {
                return(null);
            }
            return(Json(AccDetails, JsonRequestBehavior.AllowGet));
        }
Esempio n. 4
0
        // GET: InterviewCandidates
        public ActionResult Index()
        {
            UserSessionInfo sessId = new UserSessionInfo();
            int             userID = sessId.UserId;
            HomeController  hm     = new HomeController();
            var             obj    = hm.GetAdminMenu();

            foreach (var item in obj)
            {
                if (item.ModuleName == "Add InterviewCandidate")
                {
                    var mk = item.ModuleAccessType;


                    ViewBag.a = mk;
                }
            }


            InterviewCandidateComponent compobj = new InterviewCandidateComponent();


            var ICPNames = compobj.GetAllInterviewPositionNames().Select(a => new SelectListItem()
            {
                Value = a.APID.ToString(),
                Text  = a.InterviewForPositionname,
            });

            ViewBag.PositionNames = ICPNames;
            UserSessionInfo objUserSession = Session["UserSessionInfo"] as UserSessionInfo;
            int             Roleid         = Convert.ToInt32(objUserSession.RoleId);

            TempData["adminroleid"] = Roleid;



            ViewBag.RecUserId = userID;


            return(View());
        }