Ejemplo n.º 1
0
        public ActionResult BadhuwaEdit(JobHistoryViewModel data)
        {
            data.JobHistories.DecisionDate        = !string.IsNullOrEmpty(data.JobHistories.DecisionDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.DecisionDateNP)) : data.JobHistories.DecisionDate;
            data.JobHistories.LetterIssueDate     = !string.IsNullOrEmpty(data.JobHistories.LetterIssueDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.LetterIssueDateNP)) : data.JobHistories.LetterIssueDate;
            data.JobHistories.EffectiveDate       = !string.IsNullOrEmpty(data.JobHistories.EffectiveDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.EffectiveDateNP)) : data.JobHistories.EffectiveDate;
            data.JobHistories.ServiceHolidingDate = !string.IsNullOrEmpty(data.JobHistories.ServiceHolidingDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.ServiceHolidingDateNP)) : data.JobHistories.ServiceHolidingDate;
            data.JobHistories.OfficeJoinDate      = !string.IsNullOrEmpty(data.JobHistories.OfficeJoinDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.OfficeJoinDateNP)) : data.JobHistories.OfficeJoinDate;
            data.JobHistories.EffectiveTillDate   = !string.IsNullOrEmpty(data.JobHistories.EffectiveTillDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.EffectiveTillDateNP)) : data.JobHistories.EffectiveTillDate;
            data.JobHistories.SadarDate           = !string.IsNullOrEmpty(data.JobHistories.SadarDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.SadarDateNP)) : data.JobHistories.SadarDate;
            if (data.UpdateAsCurrent == true)
            {
                _jobHistoryService.UpdateAsCurrent(data.JobHistories);
            }
            int res = _jobHistoryService.UpdateBadhuwa(data.JobHistories);

            return(Redirect("/History/" + data.JobHistories.EmpCode));
        }
Ejemplo n.º 2
0
        public ActionResult EmployeeTransferEdit(JobHistoryViewModel data)
        {
            data.JobHistories.DecisionDate        = !string.IsNullOrEmpty(data.JobHistories.DecisionDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.DecisionDateNP)) : data.JobHistories.DecisionDate;
            data.JobHistories.LetterIssueDate     = !string.IsNullOrEmpty(data.JobHistories.LetterIssueDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.LetterIssueDateNP)) : data.JobHistories.LetterIssueDate;
            data.JobHistories.EffectiveDate       = !string.IsNullOrEmpty(data.JobHistories.EffectiveDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.EffectiveDateNP)) : data.JobHistories.EffectiveDate;
            data.JobHistories.ServiceHolidingDate = !string.IsNullOrEmpty(data.JobHistories.ServiceHolidingDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.ServiceHolidingDateNP)) : data.JobHistories.ServiceHolidingDate;
            data.JobHistories.OfficeJoinDate      = !string.IsNullOrEmpty(data.JobHistories.OfficeJoinDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.OfficeJoinDateNP)) : data.JobHistories.OfficeJoinDate;
            data.JobHistories.SadarDate           = !string.IsNullOrEmpty(data.JobHistories.SadarDateNP) ? Convert.ToDateTime(NepEngDate.NepToEng(data.JobHistories.SadarDateNP)) : data.JobHistories.SadarDate;
            if (!ViewBag.AllowEdit)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }
            if (data.UpdateAsCurrent == true)
            {
                _jobHistoryService.UpdateAsCurrent(data.JobHistories);
            }
            int res = _jobHistoryService.UpdateTransfer(data.JobHistories);

            return(Redirect("/History/" + data.JobHistories.EmpCode));
        }