public override Result Update()
        {
            try
            {
                Result result = base.Update();
                if (result != null)
                {
                    return(result);
                }

                result = new Result();
                InternshipScholarships InternshipScholarship = DALInstance;
                InternshipScholarship.CountryID     = this.Country.CountryID;
                InternshipScholarship.LastUpdatedBy = this.LoginIdentity.EmployeeCodeID;
                this.InternshipScholarshipID        = new InternshipScholarshipsDAL().Update(InternshipScholarship);
                if (this.InternshipScholarshipID != 0)
                {
                    result.Entity     = this;
                    result.EnumType   = typeof(InternshipScholarshipsValidationEnum);
                    result.EnumMember = InternshipScholarshipsValidationEnum.Done.ToString();
                }
                return(result);
            }
            catch
            {
                throw;
            }
        }
예제 #2
0
        internal BaseInternshipScholarshipsBLL MapInternshipScholarship(InternshipScholarships InternshipScholarship)
        {
            try
            {
                BaseInternshipScholarshipsBLL InternshipScholarshipBLL = null;
                if (InternshipScholarship != null)
                {
                    KSACitiesBLL KSACity1 = InternshipScholarship.KSACities != null ? new KSACitiesBLL().MapKSACity(InternshipScholarship.KSACities) : null;
                    CountriesBLL Country1 = InternshipScholarship.Countries != null ? new CountriesBLL().MapCountry(InternshipScholarship.Countries) : null;
                    if (InternshipScholarship.InternshipScholarshipTypeID == (Int32)InternshipScholarshipsTypesEnum.Internal)
                    {
                        InternshipScholarshipBLL = new InternalInternshipScholarshipsBLL()
                        {
                            KSACity = KSACity1,
                        };
                    }
                    else if (InternshipScholarship.InternshipScholarshipTypeID == (int)InternshipScholarshipsTypesEnum.External)
                    {
                        InternshipScholarshipBLL = new ExternalInternshipScholarshipsBLL()
                        {
                            Country = Country1,
                        };
                    }

                    InternshipScholarshipBLL.InternshipScholarshipID        = InternshipScholarship.InternshipScholarshipID;
                    InternshipScholarshipBLL.InternshipScholarshipType      = new InternshipScholarshipsTypesBLL().MapInternshipScholarshipType(InternshipScholarship.InternshipScholarshipsTypes);
                    InternshipScholarshipBLL.InternshipScholarshipStartDate = InternshipScholarship.InternshipScholarshipStartDate;
                    InternshipScholarshipBLL.InternshipScholarshipEndDate   = InternshipScholarship.InternshipScholarshipEndDate;
                    InternshipScholarshipBLL.InternshipScholarshipReason    = InternshipScholarship.InternshipScholarshipReason;
                    InternshipScholarshipBLL.InternshipScholarshipLocation  = InternshipScholarship.InternshipScholarshipLocation;
                    InternshipScholarshipBLL.CreatedBy   = new EmployeesCodesBLL().MapEmployeeCode(InternshipScholarship.CreatedByNav);
                    InternshipScholarshipBLL.CreatedDate = InternshipScholarship.CreatedDate;
                    //InternshipScholarshipBLL.LastUpdatedBy = new EmployeesCodesBLL().MapEmployeeCode(InternshipScholarship.EmployeesCodes1);
                    //InternshipScholarshipBLL.LastUpdatedDate = InternshipScholarship.LastUpdatedDate;
                }
                return(InternshipScholarshipBLL);
            }
            catch
            {
                throw;
            }
        }