Exemple #1
0
        public ActionResult ExportExcelAssignings()
        {
            BaseAssigningsBLL AssigningBLL = AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);

            var data = Json(new
            {
                data = AssigningBLL.GetAssignings().Select(x => new
                {
                    x.AssigningID,
                    EmployeeCodeNo     = x.EmployeeCareerHistory.EmployeeCode.EmployeeCodeNo,
                    EmployeeNameAr     = x.EmployeeCareerHistory.EmployeeCode.Employee.EmployeeNameAr,
                    AssigningStartDate = Globals.Calendar.GetUmAlQuraDate(x.AssigningStartDate),
                    AssigningEndDate   = x.AssigningEndDate.HasValue ? Globals.Calendar.GetUmAlQuraDate(x.AssigningEndDate.Value) : "",
                    OrganizationName   = x.AssigningType.AssigningTypeID == (int)AssigningsTypesEnum.Internal ? ((InternalAssigningBLL)x).Organization.FullOrganizationName : ((ExternalAssigningBLL)x).ExternalOrganization,
                    JobName            = x.AssigningType.AssigningTypeID == (int)AssigningsTypesEnum.Internal ? ((InternalAssigningBLL)x).Job.JobName : string.Empty,
                    IsFinished         = x.IsFinished,
                })
            }, JsonRequestBehavior.AllowGet);

            Dictionary <string, string> ColumnNames = new Dictionary <string, string>
            {
                { "AssigningID", Resources.Globalization.SequenceNoText },
                { "EmployeeCodeNo", Resources.Globalization.EmployeeCodeNoText },
                { "EmployeeNameAr", Resources.Globalization.EmployeeNameArText },
                { "AssigningStartDate", Resources.Globalization.AssigningStartDateText },
                { "AssigningEndDate", Resources.Globalization.AssigningEndDateText },
                { "IsFinished", Resources.Globalization.AssigningIsFinishedText },
                { "OrganizationName", Resources.Globalization.OrganizationNameText },
                { "JobName", Resources.Globalization.JobNameText }
            };

            string fileName = ExcelHelper.ExportToExcel(Json(data), ColumnNames);

            return(Json(new { DownLoadFile = fileName }, JsonRequestBehavior.AllowGet));
        }
Exemple #2
0
        public JsonResult GetAssigningID()
        {
            BaseAssigningsBLL AssigningBLL = AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);

            AssigningBLL.AssigningID = int.Parse(Session["AssigningID"].ToString());
            return(Json(new { data = AssigningBLL }, JsonRequestBehavior.AllowGet));
        }
        public HttpResponseMessage AssignEmployeeUnderOrganizationManager(int EmployeeCodeID, int OrganizationID, int JobID)
        {
            InternalAssigningBLL assigning = (InternalAssigningBLL)AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);

            assigning.EmployeeCareerHistory = new EmployeesCareersHistoryBLL().GetEmployeeCurrentJob(EmployeeCodeID);
            assigning.Manager = new EmployeesCodesBLL()
            {
                EmployeeCodeID = this.WindowsEmployeeCode.EmployeeCodeID
            };
            assigning.Organization = new OrganizationsStructuresBLL()
            {
                OrganizationID = OrganizationID
            };
            assigning.Job = new JobsBLL()
            {
                JobID = JobID
            };
            assigning.LoginIdentity = new EmployeesCodesBLL()
            {
                EmployeeCodeID = this.WindowsEmployeeCode.EmployeeCodeID
            };

            if (assigning.EmployeeCareerHistory.EmployeeCareerHistoryID == 0)
            {
                throw new CustomException(Resources.Globalization.NoCareerHistoryExistsToEmployeeText);
            }

            Result result = assigning.AssignEmployeeUnderManager();

            if (result.EnumMember == OrganizationStructureValidationEnum.RejectedBecauseOfPlacementPeriodFinished.ToString())
            {
                throw new CustomException(Resources.Globalization.EmployeesPlacementPeriodFinishedText);
            }

            else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfActivePreviousAssigning.ToString())
            {
                InternalAssigningBLL assgining = (InternalAssigningBLL)result.Entity;
                throw new CustomException(Resources.Globalization.ValidationEmployeeAlreadyAssignedToOrgText
                                          + " NewLine" + Resources.Globalization.ManagerNameArText + " : " + (assgining.Manager != null ? assgining.Manager.Employee.EmployeeNameAr : string.Empty)
                                          + " NewLine" + Resources.Globalization.OrganizationNameText + " : " + assgining.Organization.GetOrganizationNameTillLastParentExceptPresident(assgining.Organization.OrganizationID)
                                          );
            }

            else
            {
                return(new HttpResponseMessage(HttpStatusCode.OK));
            }
        }
Exemple #4
0
        public ActionResult GetAssigningsWillExpire()
        {
            BaseAssigningsBLL AssigningBLL = AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);

            return(Json(new
            {
                data = AssigningBLL.GetAssigningsWillExpire(DateTime.Now, 1).Select(x => new
                {
                    x.AssigningID,
                    EmployeeCodeNo = x.EmployeeCareerHistory.EmployeeCode.EmployeeCodeNo,
                    EmployeeNameAr = x.EmployeeCareerHistory.EmployeeCode.Employee.EmployeeNameAr,
                    AssigningStartDate = x.AssigningStartDate,
                    AssigningEndDate = x.AssigningEndDate,
                    IsFinished = x.IsFinished,
                })
            }, JsonRequestBehavior.AllowGet));
        }
        public HttpResponseMessage RemoveEmployeeFromOrganizationManager(int AssigningID)
        {
            InternalAssigningBLL assigningBLL = (InternalAssigningBLL)AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);

            assigningBLL.AssigningID   = AssigningID;
            assigningBLL.LoginIdentity = new EmployeesCodesBLL()
            {
                EmployeeCodeID = this.WindowsEmployeeCode.EmployeeCodeID
            };
            Result result = assigningBLL.RemoveEmployeeFromManager();

            if (result.EnumMember == OrganizationStructureValidationEnum.RejectedBecauseOfPlacementPeriodFinished.ToString())
            {
                throw new CustomException(Resources.Globalization.EmployeesPlacementPeriodFinishedText);
            }
            else
            {
                return(new HttpResponseMessage(HttpStatusCode.OK));
            }
        }
Exemple #6
0
        public string GetOrganizationName(int EmployeeCareerHistoryID)
        {
            string            OrgName      = "";
            BaseAssigningsBLL AssigningBLL = AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);

            AssigningBLL = AssigningBLL.GetEmployeeActiveAssigning(EmployeeCareerHistoryID);

            if (AssigningBLL != null && AssigningBLL.AssigningID > 0)
            {
                if (AssigningBLL.AssigningType.AssigningTypeID == (int)AssigningsTypesEnum.Internal)
                {
                    OrgName = ((InternalAssigningBLL)AssigningBLL).Organization.FullOrganizationName;
                }
                else
                {
                    OrgName = ((ExternalAssigningBLL)AssigningBLL).ExternalOrganization;
                }
            }

            return(OrgName);
        }
Exemple #7
0
        public ActionResult GetAssignings()
        {
            BaseAssigningsBLL AssigningBLL = AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);

            AssigningBLL.Search   = Search;
            AssigningBLL.Order    = Order;
            AssigningBLL.OrderDir = OrderDir;
            AssigningBLL.StartRec = StartRec;
            AssigningBLL.PageSize = PageSize;

            var data = AssigningBLL.GetAssignings(out TotalRecordsOut, out RecFilterOut).Select(x => new
            {
                x.AssigningID,
                EmployeeCodeNo     = x.EmployeeCareerHistory.EmployeeCode.EmployeeCodeNo,
                EmployeeNameAr     = x.EmployeeCareerHistory.EmployeeCode.Employee.EmployeeNameAr,
                AssigningStartDate = x.AssigningStartDate,
                AssigningEndDate   = x.AssigningEndDate,
                IsFinished         = x.IsFinished,
            });

            return(Json(new { draw = Convert.ToInt32(Draw), recordsTotal = TotalRecordsOut, recordsFiltered = RecFilterOut, data = data }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult GetEmployeesUnderManagerByOrganization(int OrganizationID)
        {
            BaseAssigningsBLL           AssigningBLL = AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);
            List <InternalAssigningBLL> Employees    = new InternalAssigningBLL()
            {
                Organization = new OrganizationsStructuresBLL()
                {
                    OrganizationID = OrganizationID
                },
                Manager = new EmployeesCodesBLL()
                {
                    EmployeeCodeID = this.WindowsEmployeeCode.EmployeeCodeID
                }
            }.GetEmployeesUnderManagerByOrganization();

            if (Employees != null)
            {
                return(Json(new
                {
                    data = Employees.Select(x => new
                    {
                        AssigningID = x.AssigningID,
                        EmployeeCodeID = x.EmployeeCareerHistory?.EmployeeCode?.EmployeeCodeID,
                        EmployeeCodeNo = x.EmployeeCareerHistory?.EmployeeCode?.EmployeeCodeNo,
                        EmployeeIDNo = x.EmployeeCareerHistory?.EmployeeCode?.Employee?.EmployeeIDNo,
                        FullEmployeeName = x.EmployeeCareerHistory?.EmployeeCode?.Employee?.EmployeeNameAr,
                        OrganizationName = x.EmployeeCareerHistory != null ? x.Organization?.OrganizationName : string.Empty,
                        JobName = x.EmployeeCareerHistory != null ? x.Job?.JobName : string.Empty,
                        AssigningReason = x.AssigningReason?.AssigningReasonName,
                        CreatedDate = x.CreatedDate
                    })
                }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                throw new Exception();
            }
        }
        public HttpResponseMessage EndingEmployeeAssigning(AssigningsViewModel AssigningVM)
        {
            BaseAssigningsBLL assigning = (InternalAssigningBLL)AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);

            assigning.AssigningID   = AssigningVM.AssigningID;
            assigning.LoginIdentity = WindowsEmployeeCode;

            //assigning.EmployeeCareerHistory = new EmployeesCareersHistoryBLL() { EmployeeCode = new EmployeesCodesBLL() { emplo } }
            //assigning.AssigningEndDate = DateTime.Now;
            //assigning.AssigningEndReason = new AssigningsReasonsBLL() { AssigningReasonID = AssigningVM.EndAssigningReasonID };
            //assigning.Notes = AssigningVM.Notes;

            Result result = assigning.BreakLastAssigning(AssigningVM.EmployeeCodeID, DateTime.Now, (AssigningsReasonsEnum)AssigningVM.EndAssigningReasonID, assigning.Notes);

            if (result.EnumMember == OrganizationStructureValidationEnum.RejectedBecauseOfPlacementPeriodFinished.ToString())
            {
                throw new CustomException(Resources.Globalization.EmployeesPlacementPeriodFinishedText);
            }
            else
            {
                return(new HttpResponseMessage(HttpStatusCode.OK));
            }
        }
Exemple #10
0
        public ActionResult EditAssigning(AssigningsViewModel AssigningVM)
        {
            if (AssigningVM.AssigningType.AssigningTypeID == (Int32)AssigningsTypesEnum.Internal)
            {
                InternalAssigningBLL assigning = (InternalAssigningBLL)AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);
                assigning.AssigningID   = AssigningVM.AssigningID;
                assigning.AssigningType = new AssigningsTypesBLL()
                {
                    AssigningTypeID = (Int32)AssigningsTypesEnum.Internal
                };
                assigning.AssigningStartDate = AssigningVM.AssginingStartDate.Value.Date;
                //assigning.AssigningEndDate = AssigningVM.AssginingEndDate.HasValue ? AssigningVM.AssginingEndDate.Value.Date : (DateTime?)null;
                //assigning.IsFinished = AssigningVM.IsFinished;
                assigning.EmployeeCareerHistory = new EmployeesCareersHistoryBLL()
                {
                    EmployeeCareerHistoryID = AssigningVM.EmployeeCareerHistoryID
                };
                assigning.Job = new JobsBLL()
                {
                    JobID = AssigningVM.JobID.HasValue ? AssigningVM.JobID.Value : 0
                };
                assigning.Organization = new OrganizationsStructuresBLL()
                {
                    OrganizationID = AssigningVM.OrganizationID.Value
                };
                assigning.Manager = AssigningVM.ManagerCodeID.HasValue ? new EmployeesCodesBLL()
                {
                    EmployeeCodeID = AssigningVM.ManagerCodeID.Value
                } : null;

                assigning.AssigningReason = new AssigningsReasonsBLL()
                {
                    AssigningReasonID = AssigningVM.AssigningReason.AssigningReasonID
                };
                assigning.LoginIdentity = new EmployeesCodesBLL()
                {
                    EmployeeCodeID = int.Parse(Session["EmployeeCodeID"].ToString())
                };
                assigning.AssigningReasonOther = AssigningVM.AssigningReasonOther;

                Result result = assigning.Update();
                if ((System.Type)result.EnumType == typeof(AssigningsValidationEnum))
                {
                    if (result.EnumMember == AssigningsValidationEnum.Done.ToString())
                    {
                        BaseAssigningsBLL assgining = (BaseAssigningsBLL)result.Entity;
                        Session["AssigningID"] = ((InternalAssigningBLL)result.Entity).AssigningID;
                    }

                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfAlreadyFinished.ToString())
                    {
                        throw new CustomException(Resources.Globalization.ValidationBecauseOfAssigningAlreadyFinishedText);
                    }
                    //else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfActivePreviousAssigning.ToString())
                    //{
                    //    BaseAssigningsBLL assgining = (BaseAssigningsBLL)result.Entity;
                    //    throw new CustomException(Resources.Globalization.MustEndPreviousAssigningText + "NewLine" + "تاريخ اخر تكليف : " + assgining.AssigningStartDate.ToShortDateString());
                    //}
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfConflictWithLenders.ToString())
                    {
                        LendersBLL Lender = ((LendersBLL)result.Entity);
                        throw new CustomException(string.Format(Resources.Globalization.ValidationConflictWithLenderText,
                                                                Lender.LenderStartDate.ToShortDateString(), Lender.LenderEndDate.ToShortDateString()));
                    }
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfEndDateIsLessThanCreationDate.ToString())
                    {
                        throw new CustomException(Resources.Globalization.ValidationBecauseOfEndDateIsLessThanCreationDateText);
                    }
                }
            }
            else if (AssigningVM.AssigningType.AssigningTypeID == (Int32)AssigningsTypesEnum.External)
            {
                ExternalAssigningBLL assigning = (ExternalAssigningBLL)AssigingsFactory.CreateAssigning(AssigningsTypesEnum.External);
                assigning.AssigningID   = AssigningVM.AssigningID;
                assigning.AssigningType = new AssigningsTypesBLL()
                {
                    AssigningTypeID = (Int32)AssigningsTypesEnum.External
                };
                assigning.AssigningStartDate = AssigningVM.AssginingStartDate.Value.Date;
                //assigning.AssigningEndDate = AssigningVM.AssginingEndDate.HasValue ? AssigningVM.AssginingEndDate.Value.Date : (DateTime?)null;
                //assigning.IsFinished = AssigningVM.IsFinished;
                //assigning.Employee = new EmployeesCodesBLL() { EmployeeCodeID = AssigningVM.EmployeeCodeID };
                assigning.EmployeeCareerHistory = new EmployeesCareersHistoryBLL()
                {
                    EmployeeCareerHistoryID = AssigningVM.EmployeeCareerHistoryID
                };
                assigning.ExternalKSACity = new KSACitiesBLL()
                {
                    KSACityID = AssigningVM.ExternalKSACity.KSACityID
                };
                assigning.ExternalOrganization = AssigningVM.ExternalOrganization;
                assigning.AssigningReason      = new AssigningsReasonsBLL()
                {
                    AssigningReasonID = AssigningVM.AssigningReason.AssigningReasonID
                };
                assigning.LoginIdentity = new EmployeesCodesBLL()
                {
                    EmployeeCodeID = int.Parse(Session["EmployeeCodeID"].ToString())
                };
                assigning.AssigningReasonOther = AssigningVM.AssigningReasonOther;

                Result result = assigning.Update();
                if ((System.Type)result.EnumType == typeof(AssigningsValidationEnum))
                {
                    if (result.EnumMember == AssigningsValidationEnum.Done.ToString())
                    {
                        BaseAssigningsBLL assgining = (BaseAssigningsBLL)result.Entity;
                        Session["AssigningID"] = ((ExternalAssigningBLL)result.Entity).AssigningID;
                    }
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfActivePreviousAssigning.ToString())
                    {
                        BaseAssigningsBLL assgining = (BaseAssigningsBLL)result.Entity;
                        throw new CustomException(Resources.Globalization.MustEndPreviousAssigningText + "NewLine" + Resources.Globalization.LastAssigningStartDateText + assgining.AssigningStartDate.ToShortDateString());
                    }
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfConflictWithLenders.ToString())
                    {
                        LendersBLL Lender = ((LendersBLL)result.Entity);
                        throw new CustomException(string.Format(Resources.Globalization.ValidationConflictWithLenderText,
                                                                Lender.LenderStartDate.ToShortDateString(), Lender.LenderEndDate.ToShortDateString()));
                    }
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfEndDateIsLessThanCreationDate.ToString())
                    {
                        throw new CustomException(Resources.Globalization.ValidationBecauseOfEndDateIsLessThanCreationDateText);
                    }
                }
            }
            return(View(this.GetByAssigningID(AssigningVM.AssigningID)));
        }
Exemple #11
0
        public ActionResult Create(AssigningsViewModel AssigningVM)
        {
            if (AssigningVM.AssigningType.AssigningTypeID == (Int32)AssigningsTypesEnum.Internal)
            {
                InternalAssigningBLL assigning = (InternalAssigningBLL)AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal);
                assigning.AssigningType = new AssigningsTypesBLL()
                {
                    AssigningTypeID = (int)AssigningsTypesEnum.Internal
                };
                assigning.AssigningStartDate    = AssigningVM.AssginingStartDate.Value.Date;
                assigning.AssigningEndDate      = AssigningVM.AssginingEndDate.HasValue ? AssigningVM.AssginingEndDate.Value.Date : (DateTime?)null;
                assigning.EmployeeCareerHistory = new EmployeesCareersHistoryBLL().GetActiveByEmployeeCareerHistoryID(AssigningVM.EmployeeCareerHistoryID);
                assigning.Manager = AssigningVM.ManagerCodeID.HasValue ? new EmployeesCodesBLL()
                {
                    EmployeeCodeID = AssigningVM.ManagerCodeID.Value
                } : null;
                assigning.Job = new JobsBLL()
                {
                    JobID = AssigningVM.JobID.HasValue ? AssigningVM.JobID.Value : 0
                };
                if (AssigningVM.OrganizationID.HasValue)
                {
                    assigning.Organization = new OrganizationsStructuresBLL()
                    {
                        OrganizationID = AssigningVM.OrganizationID.Value
                    }
                }
                ;
                assigning.AssigningReason = new AssigningsReasonsBLL()
                {
                    AssigningReasonID = AssigningVM.AssigningReason.AssigningReasonID
                };
                assigning.AssigningReasonOther = AssigningVM.AssigningReasonOther;
                assigning.LoginIdentity        = this.UserIdentity;

                Result result = assigning.Add();
                if ((System.Type)result.EnumType == typeof(NoConflictWithOtherProcessValidationEnum))
                {
                    Classes.Helpers.CommonHelper.ConflictValidationMessage(result);
                }
                if ((System.Type)result.EnumType == typeof(AssigningsValidationEnum))
                {
                    if (result.EnumMember == AssigningsValidationEnum.Done.ToString())
                    {
                        BaseAssigningsBLL assgining = (BaseAssigningsBLL)result.Entity;
                        Session["AssigningID"] = ((InternalAssigningBLL)result.Entity).AssigningID;
                    }
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfActivePreviousAssigning.ToString())
                    {
                        BaseAssigningsBLL assgining = (BaseAssigningsBLL)result.Entity;
                        throw new CustomException(Resources.Globalization.MustEndPreviousAssigningText + "NewLine" + "تاريخ اخر تكليف : " + assgining.AssigningStartDate.ToShortDateString());
                    }
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfConflictWithLenders.ToString())
                    {
                        LendersBLL Lender = ((LendersBLL)result.Entity);
                        throw new CustomException(string.Format(Resources.Globalization.ValidationConflictWithLenderText,
                                                                Lender.LenderStartDate.ToShortDateString(), Lender.LenderEndDate.ToShortDateString()));
                    }
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfEndDateIsLessThanCreationDate.ToString())
                    {
                        throw new CustomException(Resources.Globalization.ValidationBecauseOfEndDateIsLessThanCreationDateText);
                    }
                }
            }
            else if (AssigningVM.AssigningType.AssigningTypeID == (Int32)AssigningsTypesEnum.External)
            {
                ExternalAssigningBLL assigning = (ExternalAssigningBLL)AssigingsFactory.CreateAssigning(AssigningsTypesEnum.External);
                assigning.AssigningType = new AssigningsTypesBLL()
                {
                    AssigningTypeID = (int)AssigningsTypesEnum.External
                };
                assigning.AssigningStartDate    = AssigningVM.AssginingStartDate.Value.Date;
                assigning.AssigningEndDate      = AssigningVM.AssginingEndDate.HasValue ? AssigningVM.AssginingEndDate.Value.Date : (DateTime?)null;
                assigning.EmployeeCareerHistory = new EmployeesCareersHistoryBLL().GetActiveByEmployeeCareerHistoryID(AssigningVM.EmployeeCareerHistoryID);
                assigning.ExternalKSACity       = new KSACitiesBLL()
                {
                    KSACityID = AssigningVM.ExternalKSACity.KSACityID
                };
                assigning.ExternalOrganization = AssigningVM.ExternalOrganization;
                assigning.AssigningReason      = new AssigningsReasonsBLL()
                {
                    AssigningReasonID = AssigningVM.AssigningReason.AssigningReasonID
                };
                assigning.AssigningReasonOther = AssigningVM.AssigningReasonOther;
                assigning.LoginIdentity        = this.UserIdentity;

                Result result = assigning.Add();
                if ((System.Type)result.EnumType == typeof(NoConflictWithOtherProcessValidationEnum))
                {
                    Classes.Helpers.CommonHelper.ConflictValidationMessage(result);
                }
                if ((System.Type)result.EnumType == typeof(AssigningsValidationEnum))
                {
                    if (result.EnumMember == AssigningsValidationEnum.Done.ToString())
                    {
                        BaseAssigningsBLL assgining = (BaseAssigningsBLL)result.Entity;
                        Session["AssigningID"] = ((ExternalAssigningBLL)result.Entity).AssigningID;
                    }
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfActivePreviousAssigning.ToString())
                    {
                        BaseAssigningsBLL assgining = (BaseAssigningsBLL)result.Entity;
                        throw new CustomException(Resources.Globalization.MustEndPreviousAssigningText + "NewLine" + "تاريخ اخر تكليف : " + assgining.AssigningStartDate.ToShortDateString());
                    }
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfConflictWithLenders.ToString())
                    {
                        LendersBLL Lender = ((LendersBLL)result.Entity);
                        throw new CustomException(string.Format(Resources.Globalization.ValidationConflictWithLenderText,
                                                                Lender.LenderStartDate.ToShortDateString(), Lender.LenderEndDate.ToShortDateString()));
                    }
                    else if (result.EnumMember == AssigningsValidationEnum.RejectedBecauseOfEndDateIsLessThanCreationDate.ToString())
                    {
                        throw new CustomException(Resources.Globalization.ValidationBecauseOfEndDateIsLessThanCreationDateText);
                    }
                }
            }

            return(View(AssigningVM));
        }