public ActionResult QuickViewEmployment(string UserID)
        {
            int uid  = db.UserProfiles.Where(x => x.MyAppID == UserID).FirstOrDefault().UserID;
            var data = db.Get_Employment(uid).ToList();
            List <EmploymentDetails> lst = new List <EmploymentDetails>();

            foreach (var i in data)
            {
                EmploymentDetails d = new EmploymentDetails();
                d.EmpDetailID  = i.EmpDetailID;
                d.EmployerName = i.EmployerName;
                d.UserID       = i.UserID;
                d.TypeID       = i.TypeID;
                d.Type         = i.Type;
                d.Designation  = i.Desgignation;


                if (i.Type == "Current Employer" && i.DateTo == null)
                {
                    d.DateFrom = i.DateFrom.Value;
                    d.DateTo   = null;
                    d.Gap      = "From " + DateCommonFunctions.GetShortDateFormat(i.DateFrom.Value) + " To Present";
                }
                else
                {
                    d.DateFrom = i.DateFrom.Value;
                    d.DateTo   = i.DateTo.Value;
                    d.Gap      = "From " + DateCommonFunctions.GetShortDateFormat(i.DateFrom.Value) + " To " + DateCommonFunctions.GetShortDateFormat(i.DateTo.Value);
                }

                lst.Add(d);
            }

            return(PartialView("_ucEmployment", lst));
        }
        public ActionResult ViewEmployment(int UserID)
        {
            var data = db.Get_Employment(UserID).ToList();
            List <EmploymentDetails> lst = new List <EmploymentDetails>();

            foreach (var i in data)
            {
                EmploymentDetails d = new EmploymentDetails();
                d.EmpDetailID  = i.EmpDetailID;
                d.EmployerName = i.EmployerName;
                d.UserID       = i.UserID;
                d.TypeID       = i.TypeID;
                d.Type         = i.Type;
                d.Designation  = i.Desgignation;


                if (i.Type == "Current Employer" && i.DateTo == null)
                {
                    d.DateFrom = i.DateFrom.Value;
                    d.DateTo   = null;
                    d.Gap      = "From " + DateCommonFunctions.GetShortDateFormat(i.DateFrom.Value) + " To Present";
                }
                else
                {
                    d.DateFrom = i.DateFrom.Value;
                    d.DateTo   = i.DateTo.Value;
                    d.Gap      = "From " + DateCommonFunctions.GetShortDateFormat(i.DateFrom.Value) + " To " + DateCommonFunctions.GetShortDateFormat(i.DateTo.Value);
                }

                lst.Add(d);
            }

            return(PartialView("_ucEmployment", lst));
        }