/// <summary>
    /// Gets all the information this class needs and sets the active page
    /// </summary>
    public override void CheckTypeAndFill()
    {
        if (!LoginCheck.LoggedIn || user == null)
            Response.Redirect("login.aspx");
        else if (user.UserCompany.CompanyID == 0 && user.UserCv.CvID != 0)
        {
            service = new MatchyService();
            JobMapping jobMapping = new JobMapping();
            CompanyMapping compMapping = new CompanyMapping();
            user.UserCompany = compMapping.MapFromService(service.GetCompany(getURL())[0]);

            MatchyBackend.Job[] jobs = service.GetJobByCompany(user.UserCompany.CompanyID);
            job = new Job[jobs.Length];
            for (int i = 0; i < jobs.Length; i++)
                job[i] = jobMapping.mapFromService(jobs[i]);
        }
        else
        {
            var contentPlaceHolder = (ContentPlaceHolder)Master.FindControl("contentPlaceholderHeader");
            var profileLink = (LinkButton)contentPlaceHolder.FindControl("profileLink");
            profileLink.CssClass = "active";

            service = new MatchyService();
            JobMapping mapping = new JobMapping();
            MatchyBackend.Job[] jobs = service.GetJobByCompany(user.UserCompany.CompanyID);
            job = new Job[jobs.Length];
            for (int i = 0; i < jobs.Length; i++)
                job[i] = mapping.mapFromService(jobs[i]);

            Session["JobList"] = job;
        }
    }
Beispiel #2
0
        public MMCS_CompanyDetailView MMCS_CompanyDetailView(int?companyid, int?productID)
        {
            MMCS_CompanyDetailView MMCS_CompanyDetailViewRecords = new MMCS_CompanyDetailView();

            List <MMCS_CompanyDetailsView_Result> MMCS_CompanyView = db.MMCS_CompanyDetailsView(companyid, productID).ToList();

            if (MMCS_CompanyView == null)
            {
                return(MMCS_CompanyDetailViewRecords);
            }

            MMCS_CompanyDetailViewRecords = CompanyMapping.MMCS_CompanyDetailViewMapping(MMCS_CompanyView);

            return(MMCS_CompanyDetailViewRecords);
        }
    public User mapFromService(MatchyBackend.User user)
    {
        CompanyMapping companyMapping = new CompanyMapping();
        CvMapping cvMapping = new CvMapping();

        return new User()
        {
            BirthDay = user.BirthDay,
            Email = user.Email,
            MayLogin = user.MayLogin,
            Pass = user.Pass,
            Type = user.Type,
            UserCompany = companyMapping.MapFromService(user.UserCompany),
            UserCv = cvMapping.mapFromService(user.UserCv),
            ProfileId = user.ProfileId
        };
    }
Beispiel #4
0
    public Job mapFromService(MatchyBackend.Job job)
    {
        CompanyMapping companyMapping = new CompanyMapping();
        EducationMapper educationMapping = new EducationMapper();
        DetailJobMapper detailMapping = new DetailJobMapper();

        return new Job()
        {
            JobID = job.JobID,
            Company = companyMapping.MapFromService(job.Company),
            Education = educationMapping.MapFromService(job.Education),
            DetailJob = detailMapping.MapFromService(job.DetailJob),
            JobTitle = job.JobTitle,
            JobDescription = job.JobDescription,
            JobPlaceDate = job.JobPlaceDate,
            JobHours = job.JobHours
        };
    }
    public MatchyBackend.User mapToService(User user)
    {
        CompanyMapping companyMapping = new CompanyMapping();
        CvMapping cvMapping = new CvMapping();

        MatchyBackend.User backEndUser = new MatchyBackend.User()
        {
            BirthDay = user.BirthDay,
            Email = user.Email,
            MayLogin = user.MayLogin,
            Pass = user.Pass,
            Type = user.Type,
            UserCompany = companyMapping.MapToService(user.UserCompany),
            UserCv = cvMapping.mapToService(user.UserCv),
            ProfileId = user.ProfileId
        };

        return backEndUser;
    }
Beispiel #6
0
        public List <MMCS_PackageListReport> MMCS_GetPackageListReport(int?productID)
        {
            List <MMCS_PackageListReport> packageListReportValue = null;

            try
            {
                List <MMCS_packageListReport_Result> packageListReport = db.MMCS_packageListReport(productID).ToList();

                packageListReportValue = CompanyMapping.PackageListValue(packageListReport);
                if (packageListReportValue == null)
                {
                    return(packageListReportValue);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(packageListReportValue);
        }
Beispiel #7
0
        public List <MMCS_CompanyListFeatureForReport> MMCS_GetCompanyListFeatureForReports(int?productID, int?companyID, int?reportID)
        {
            List <MMCS_CompanyListFeatureForReport> companyListFeatureForReport = null;

            try
            {
                List <MMcs_CompanyListFeatureForReport_Result> companyFeatureForReport = db.MMcs_CompanyListFeatureForReport(productID, companyID, reportID).ToList();

                companyListFeatureForReport = CompanyMapping.ListofCompanyFeatureForReport(companyFeatureForReport);
                if (companyListFeatureForReport == null)
                {
                    return(companyListFeatureForReport);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(companyListFeatureForReport);
        }
Beispiel #8
0
        public List <MMCS_CompanyListAllCurrent> MMCS_GetCompanyListAllCurrent()
        {
            List <MMCS_CompanyListAllCurrent> companyListAllCurrent = null;

            try
            {
                List <MMcs_CompanyListAllCurrent_Result> companyList = db.MMcs_CompanyListAllCurrent().ToList();

                companyListAllCurrent = CompanyMapping.ListofCompanyinCurrentMapping(companyList);
                if (companyList == null)
                {
                    return(companyListAllCurrent);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(companyListAllCurrent);
        }
Beispiel #9
0
        public MMCS_CompanyView MMCS_CompanyView(int?companyID)
        {
            MMCS_CompanyView MMCS_ViewCompany = new MMCS_CompanyView();

            try
            {
                List <MMCS_CompanyGet_Result> MMCS_CompanyGetValue = db.MMCS_CompanyGet(companyID).ToList();

                MMCS_ViewCompany = CompanyMapping.MMCS_CompanyViewMapping(MMCS_CompanyGetValue);
                if (MMCS_CompanyGetValue == null)
                {
                    return(MMCS_ViewCompany);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(MMCS_ViewCompany);
        }
Beispiel #10
0
        public List <MMCS_CompanyListClasses> MMCS_CompanyListClasses(int?companyID)
        {
            List <MMCS_CompanyListClasses> companyListClassValue = null;

            try
            {
                List <MMCS_CompanyListClasses_Result> companyListReport = db.MMCS_CompanyListClasses(companyID).ToList();

                companyListClassValue = CompanyMapping.CompanyListProductValue(companyListReport);
                if (companyListClassValue == null)
                {
                    return(companyListClassValue);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(companyListClassValue);
        }