public string UpdateAppointmentDate(List <UpdateApplicantInterestingsDTO> updatedata)
        {
            try
            {
                foreach (var data in updatedata)
                {
                    ApplicantProfile applicantProfile = new ApplicantProfile();
                    applicantProfile = Context.ApplicantProfile.Where(x => x.Empid == data.Empid).FirstOrDefault();
                    applicantProfile.StatusApplicant = data.StatusApplicant;
                    applicantProfile.UpdDate         = DateTime.Now;
                    Context.ApplicantProfile.Update(applicantProfile);
                    Context.SaveChanges();


                    ApplicantAppointmentDate applicantAppointmentDate = new ApplicantAppointmentDate();
                    applicantAppointmentDate = Context.ApplicantAppointmentDate.Where(x => x.Empid == data.Empid).FirstOrDefault();
                    if (data.StatusApplicant == "Contact_Nint" || data.StatusApplicant == "Contact_Cnot")
                    {
                        applicantAppointmentDate.AppointmentDate = null;
                    }
                    else if (data.StatusApplicant == "Contact_Inte")
                    {
                        applicantAppointmentDate.AppointmentDate = data.AppointmentDate;
                    }
                    Context.ApplicantAppointmentDate.Update(applicantAppointmentDate);
                    Context.SaveChanges();
                }
                return("Success");
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public async Task <string> SaveinterviewDate(ApplicantAppointmentDateDTO data, string team)
        {
            try
            {
                DateTime dateTime = DateTime.Now;
                ApplicantAppointmentDate saveinterviewdate = new ApplicantAppointmentDate();

                saveinterviewdate.Username  = data.Username;
                saveinterviewdate.Empid     = data.Empid;
                saveinterviewdate.Datetime1 = data.Datetime1;
                saveinterviewdate.Datetime2 = data.Datetime2;
                //saveinterviewdate.AppointmentDate = data.AppointmentDate;
                //saveinterviewdate.AppointmentStatus = data.AppointmentStatus;
                saveinterviewdate.CrBy   = data.Username;
                saveinterviewdate.CrDate = DateTime.Now;

                Context.ApplicantAppointmentDate.Add(saveinterviewdate);
                Context.SaveChanges();


                ApplicantProfile applicantProfile = new ApplicantProfile();
                applicantProfile = Context.ApplicantProfile.Where(x => x.Empid == data.Empid).FirstOrDefault();

                applicantProfile.StatusApplicant = "Pass_PM";
                applicantProfile.Team            = team;
                applicantProfile.UpdDate         = dateTime;
                Context.ApplicantProfile.Update(applicantProfile);
                Context.SaveChanges();

                return("Success");
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }