Пример #1
0
        public JsonResult Delete(int id)
        {
            EmployeesExperiencesBLL EmployeeExperience = new EmployeesExperiencesBLL();

            EmployeeExperience.LoginIdentity = UserIdentity;
            Result result = EmployeeExperience.Remove(id);

            if (result.EnumMember == EmployeesExperiencesValidationEnum.Done.ToString())
            {
            }
            return(Json(new
            {
                data = EmployeeExperience
            }, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public JsonResult GetEmployeesExperiences()
        {
            var data = new EmployeesExperiencesBLL().GetEmployeesExperiences()
                       .Select(x => new
            {
                EmployeeExperienceID = x.EmployeeExperienceID,
                TotalYears           = x.TotalYears,
                TotalMonths          = x.TotalMonths,
                TotalDays            = x.TotalDays,
                EmployeeCodeNo       = x.EmployeesCodes.EmployeeCodeNo,
                EmployeeNameAr       = x.EmployeesCodes.Employee.EmployeeNameAr,
                CreatedDate          = Globals.Calendar.GetUmAlQuraDate(x.CreatedDate),
            });

            return(Json(new { data = data }, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        public JsonResult Create(EmployeesExperiencesViewModel EmployeeExperienceVM)
        {
            EmployeesExperiencesBLL EmployeeExperiences = new EmployeesExperiencesBLL();

            EmployeeExperiences.TotalYears     = EmployeeExperienceVM.TotalYears;
            EmployeeExperiences.TotalMonths    = EmployeeExperienceVM.TotalMonths;
            EmployeeExperiences.TotalDays      = EmployeeExperienceVM.TotalDays;
            EmployeeExperiences.EmployeesCodes = new EmployeesCodesBLL()
            {
                EmployeeCodeID = EmployeeExperienceVM.EmployeeVM.EmployeeCodeID.Value
            };
            EmployeeExperiences.LoginIdentity = UserIdentity;
            Result result = EmployeeExperiences.Add();

            if (result.EnumMember == EmployeesExperiencesValidationEnum.Done.ToString())
            {
            }
            return(Json(new { data = EmployeeExperiences.EmployeeExperienceID }, JsonRequestBehavior.AllowGet));
        }