Exemplo n.º 1
0
        public ActionResult GetEmployeeList(string id)
        {
            //GetCurrentPeriodDetail
            var PeriodID   = Convert.ToInt64(id);
            var PeriodInfo = periodService.GetPeriodInformation(PeriodID);

            if (IsPeriodReadyForConvertData(PeriodInfo))
            {
                PeriodDTO pmsPeriodInfo = new PeriodDTO();
                pmsPeriodInfo.Name      = PeriodInfo.Name;
                pmsPeriodInfo.Id        = PeriodInfo.ID;
                pmsPeriodInfo.StateName = PeriodInfo.State.Name;

                try
                {
                    empConverter.ConvertEmployee(pmsPeriodInfo);

                    ViewBag.ResultMessage = empConverter.Result.ToString() + " Employee Has Been Converted!";
                }
                catch (Exception e)
                {
                    ViewBag.ResultMessage = "Error In Converting!";
                }
            }

            return(View("PeriodDetail", PeriodInfo));
        }
Exemplo n.º 2
0
 public void InsertEmployees()
 {
     if (_IsInsertable)
     {
         _EmployeeService.ConvertEmployee();
     }
     else
     {
         return;
     }
 }