Exemplo n.º 1
0
        public ActionResult EditPersonalInformation(int iApplicantId)
        {
            ApplicantDashboardBAL          objApplicantDashboardBAL          = new ApplicantDashboardBAL();
            ApplicantPersonalInformationBO objApplicantPersonalInformationBO = objApplicantDashboardBAL.editPersonalInformation(iApplicantId);

            return(PartialView("_EditPersonalInformation", objApplicantPersonalInformationBO));
        }
Exemplo n.º 2
0
        public ActionResult getPersonalInformation()
        {
            ApplicantDashboardBAL          objApplicantDashboardBAL          = new ApplicantDashboardBAL();
            ApplicantPersonalInformationBO objApplicantPersonalInformationBO = new ApplicantPersonalInformationBO();

            objApplicantPersonalInformationBO.TitleList     = objApplicantDashboardBAL.TitleList();
            objApplicantPersonalInformationBO.CountriesList = objApplicantDashboardBAL.CountryList();
            objApplicantPersonalInformationBO.GenderList    = objApplicantDashboardBAL.GenderList();
            return(PartialView("_EditPersonalInformation", objApplicantPersonalInformationBO));
        }
Exemplo n.º 3
0
        public JsonResult savePersonalInformation(ApplicantPersonalInformationBO Data)
        {
            if (Request.Files.Count > 0)
            {
                string strFileName           = "";
                string strExtention          = "";
                HttpFileCollectionBase files = Request.Files;
                for (int i = 0; i < files.Count; i++)
                {
                    HttpPostedFileBase file = files[i];
                    strExtention        = Path.GetExtension(file.FileName);
                    strFileName         = ViewData["LoginUserId"].ToString() + "_" + DateTime.UtcNow.ToString("yyyyMMddHHmmssfff", CultureInfo.InvariantCulture) + strExtention;
                    Data.FileSavedName1 = strFileName;
                    strFileName         = Path.Combine(strFileUploadPath1, strFileName);
                    file.SaveAs(strFileName);
                }
            }
            if (Request.Files.Count > 0)
            {
                string strFileName1           = "";
                string strExtention1          = "";
                HttpFileCollectionBase files1 = Request.Files;
                for (int j = 0; j < files1.Count; j++)
                {
                    HttpPostedFileBase file = files1[j];
                    strExtention1 = Path.GetExtension(file.FileName);
                    strFileName1  = ViewData["LoginUserId"].ToString() + "_" + DateTime.UtcNow.ToString("yyyyMMddHHmmssfff", CultureInfo.InvariantCulture) + strExtention1;

                    Data.FileSavedName = strFileName1;
                    strFileName1       = Path.Combine(strFileUploadPath, strFileName1);
                    file.SaveAs(strFileName1);
                }
            }
            ApplicantDashboardBAL objApplicantDashboardBAL = new ApplicantDashboardBAL();
            string strResult = objApplicantDashboardBAL.SavePersonalInformation(Data, Convert.ToInt32(ViewData["LoginUserId"]));

            return(Json(strResult, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 4
0
        public JsonResult SaveApplicantRegistration(ApplicantPersonalInformationBO Data)
        {
            string strResult = "";

            if (Request.Files.Count > 0)
            {
                string strFileName       = "";
                string strExtention      = "";
                Random objRandom         = new Random();
                string strRandom         = objRandom.Next(10000) + "";
                string strFileUploadPath = "";

                string  fileName        = "";
                string  fileContentType = "";
                byte[]  tempFileBytes   = null;
                dynamic data            = null;
                dynamic types           = null;
                bool    result          = false;

                HttpFileCollectionBase files = Request.Files;
                if (files != null)
                {
                    for (int i = 0; i < files.Count; i++)
                    {
                        HttpPostedFileBase file = files[i];
                        if (file.ContentLength == 0)
                        {
                            strResult = "Upload file should not be empty";
                        }
                        else if (file.ContentLength > 0)
                        {
                            strExtention    = Path.GetExtension(file.FileName);
                            fileName        = file.FileName;                // getting File Name
                            fileContentType = file.ContentType;             // getting ContentType
                            tempFileBytes   = new byte[file.ContentLength]; // getting filebytes
                            data            = file.InputStream.Read(tempFileBytes, 0, Convert.ToInt32(file.ContentLength));
                            types           = CommonUtils.FileType.Image;   // Setting Image type
                            if (strExtention.ToUpper() == ".PDF")
                            {
                                types = CommonUtils.FileType.PDF;
                            }
                            else if (strExtention.ToUpper() == ".DOC")
                            {
                                types = CommonUtils.FileType.DOC;
                            }
                            else if (strExtention.ToUpper() == ".DOCX")
                            {
                                types = CommonUtils.FileType.DOCX;
                            }
                            result      = CommonUtils.isValidFile(tempFileBytes, types, fileContentType); // Validate Header
                            strFileName = strRandom + "_" + DateTime.UtcNow.ToString("yyyyMMddHHmmssfff", CultureInfo.InvariantCulture) + strExtention;
                            var strFileType = file.FileName.Split(new string[] { "_" }, StringSplitOptions.RemoveEmptyEntries);
                            if (result)
                            {
                                int FileLength = 1024 * 1024 * 3; //FileLength 3 MB
                                if (file.ContentLength > FileLength)
                                {
                                    strResult = "Upload file should not be greater than 3MB";
                                }

                                if (strFileType[0] == "PHOTO")
                                {
                                    Data.PhotoSavedName = strFileName;
                                    strFileUploadPath   = strPhotoUploadPath;
                                }
                                if (strFileType[0] == "RESUME")
                                {
                                    Data.CVSavedName  = strFileName;
                                    strFileUploadPath = strCVSavedUploadPath;
                                }
                                if (strFileType[0] == "IDCOPY")
                                {
                                    Data.CitizenShipIdCopySavedName = strFileName;
                                    strFileUploadPath = strCitizenShipIdCopyUploadPath;
                                }
                                if (strFileType[0] == "APPLICATIONLETTER")
                                {
                                    Data.ApplicationLetterSavedName = strFileName;
                                    strFileUploadPath = strApplicationLetterUploadPath;
                                }
                                strFileName = Path.Combine(strFileUploadPath, strFileName);
                                file.SaveAs(strFileName);
                            }
                            else
                            {
                                strResult = strResult + "Please Upload Valid file for " + strFileType[0] + "</br>";
                            }
                        }
                    }
                }
            }
            UpdateProfileBAL objUpdateProfileBAL = new UpdateProfileBAL();

            Data.IsActive = true;
            if (strResult == "")
            {
                strResult = objUpdateProfileBAL.SaveorUpdateApplicantRegistration(Data, 1);
            }
            return(Json(strResult, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 5
0
 public string SaveorUpdateApplicantRegistration(ApplicantPersonalInformationBO objApplicantPersonalInformationBO, int iUserId)
 {
     return(objUpdateProfileDAL.SaveorUpdateApplicantRegistration(objApplicantPersonalInformationBO, iUserId));
 }
 public string SavePersonalInformation(ApplicantPersonalInformationBO objApplicantPersonalInformationBO, int iUserId)
 {
     return(objApplicantDashboardDAL.SavePersonalInformation(objApplicantPersonalInformationBO, iUserId));
 }