コード例 #1
0
        public string UpdateBasicDetails(PilotRegistrationViewModel model)
        {
            string response = "";
            var    data     = _context.ptaPilotRegistrationMasters.Where(x => x.ApplicationNo == model.ApplicationNo).FirstOrDefault();

            if (data != null)
            {
                data.ApplicationNo = model.ApplicationNo;
                data.Email         = model.Email;
                data.Mobile        = model.Mobile;
                data.DOB           = (!string.IsNullOrEmpty(model.DOBStr) ? DateTime.ParseExact(model.DOBStr, "dd/MM/yyyy", CultureInfo.InvariantCulture) : (DateTime?)null);
                _context.SaveChanges();
                response = "Basics Details Updated!";
            }
            return(response);
        }
コード例 #2
0
        public bool SaveExamFeeNitificationLogs(PilotRegistrationViewModel Model)
        {
            bool status = false;
            ptaScreeningEmailNotificationLog log = new ptaScreeningEmailNotificationLog
            {
                Amount        = Model.ExamAmount,
                CourseName    = Model.CourseName,
                LogDate       = DateTime.Now,
                CandidateName = Model.StudentName,
                Email         = Model.Email,
                ExamTermNo    = Model.ExamTerm,
                IsActive      = Model.IsActive,
                IsSendEmail   = Model.IsSendEmail,
                PTAPilotRegistrationMasterId = Model.Id
            };

            _context.ptaScreeningEmailNotificationLogs.Add(log);
            _context.SaveChanges();
            status = true;
            return(status);
        }
コード例 #3
0
        public PilotResponse CreatePilotTrainingRegistration([FromBody] PilotRegistrationViewModel value)
        {
            Common        _common = new Common();
            PilotResponse r       = new PilotResponse();

            if (string.IsNullOrEmpty(value.CourseApplied))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Course Applied!";
            }
            else if (string.IsNullOrEmpty(value.Title))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Title!";
            }
            else if (string.IsNullOrEmpty(value.FirstName))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid FirstName!";
            }
            else if (string.IsNullOrEmpty(value.Lastname))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid LastName!";
            }
            else if (string.IsNullOrEmpty(value.Email))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Email!";
            }
            else if (string.IsNullOrEmpty(value.MobileNo))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Mobile!";
            }
            else if (string.IsNullOrEmpty(value.DateOfBirth))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid DateOfBirth!";
            }
            else if (string.IsNullOrEmpty(value.Gender))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Gender!";
            }
            else if (string.IsNullOrEmpty(value.Nationality))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Nationality!";
            }
            else if (string.IsNullOrEmpty(value.LeadSource))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid LeadSource!";
            }
            else if (string.IsNullOrEmpty(value.CorrespondenceCountry))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Email!";
            }
            else if (string.IsNullOrEmpty(value.CorrespondenceAddress1))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Correpondance Address1!";
            }
            else if (string.IsNullOrEmpty(value.CorrespondencePinCode))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Correspondance PINCode!";
            }
            else if (string.IsNullOrEmpty(value.PermanentCountry))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Permanent Country!";
            }
            else if (string.IsNullOrEmpty(value.PermanentAddress1))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Permanent Address1!";
            }
            else if (string.IsNullOrEmpty(value.PermanentPinCode))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Permanent PINCode!";
            }
            else if (string.IsNullOrEmpty(value.Tenth_NameOfInstitute))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid 10th name of institute!";
            }
            else if (string.IsNullOrEmpty(value.Tenth_BoardAndUniversity))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid 10th Board&University!";
            }
            else if (string.IsNullOrEmpty(value.Tenth_YearOfPassing))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid 10th year of passing!";
            }
            else if (string.IsNullOrEmpty(value.Tenth_EvaluationType))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid 10th Evaluation Type!";
            }
            else if (string.IsNullOrEmpty(value.Twelve_NameOfInstitute))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid 12th Name Of Institute!";
            }
            else if (string.IsNullOrEmpty(value.Twelve_BoardAndUniversity))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid 12th Board&University!";
            }
            else if (string.IsNullOrEmpty(value.Twelve_Stream))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid 12th stream!";
            }
            else if (string.IsNullOrEmpty(value.Twelve_YearOfPassing))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid 12th year of passing!";
            }
            else if (string.IsNullOrEmpty(value.MedicalStatus))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Madical Status!";
            }
            else if (string.IsNullOrEmpty(value.ApplicantName))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid ApplicantName!";
            }
            else if (string.IsNullOrEmpty(value.ParentName))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid ParentName!";
            }
            else if (string.IsNullOrEmpty(value.Date))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid FormDate!";
            }
            else if (string.IsNullOrEmpty(value.ApplicationNo))
            {
                r.RegistrationNo = "";
                r.IsSuccess      = false;
                r.Message        = "Empty or Invalid Application No.!";
            }
            else
            {
                try
                {
                    var data = _common.CreatePilotTrainingRegistration(value);
                    if (!string.IsNullOrEmpty(data.RegistrationNo))
                    {
                        r.RegistrationNo = data.RegistrationNo;
                        r.IsSuccess      = true;
                        r.Message        = "Pilot Registration successfully completed.";
                    }
                    else
                    {
                        r.RegistrationNo = "";
                        r.IsSuccess      = false;
                        r.Message        = "";
                    }
                }
                catch (Exception ex)
                {
                    r.IsSuccess = false;
                    r.Message   = ex.Message + " " + ex.InnerException;
                }
            }
            return(r);
        }
コード例 #4
0
 public ActionResult UpdateBasicsDetails(PilotRegistrationViewModel Model)
 {
     return(Json(_studentService.UpdateBasicDetails(Model), JsonRequestBehavior.AllowGet));
 }