예제 #1
0
    private void FillListBoxPerfection()
    {
        PIKCV.BUS.Job objJob          = new PIKCV.BUS.Job();
        DataTable     dtJobPerfection = objJob.GetJobPerfection(this.smJobID);

        DataBindHelper.BindListbox(ref lbSelectedPerfection, dtJobPerfection, "PerfectionName", "PerfectionID");

        DataTable dtPerfection    = this.cmbPerfection;
        DataTable dtPerfectionNew = new DataTable();

        if (dtJobPerfection.Rows.Count > 0)
        {
            dtPerfectionNew.Columns.Add("PerfectionID");
            dtPerfectionNew.Columns.Add("PerfectionName");

            bool add = true;
            foreach (DataRow drCache in dtPerfection.Rows)
            {
                add = true;
                foreach (DataRow dr in dtJobPerfection.Rows)
                {
                    if (dr["PerfectionID"].ToString() == drCache["PerfectionID"].ToString())
                    {
                        add = false;
                        break;
                    }
                }
                if (add)
                {
                    DataRow drNew = dtPerfectionNew.NewRow();
                    drNew["PerfectionID"]   = drCache["PerfectionID"].ToString();
                    drNew["PerfectionName"] = drCache["PerfectionName"].ToString();
                    dtPerfectionNew.Rows.Add(drNew);
                }
            }
        }
        else
        {
            dtPerfectionNew = dtPerfection.Copy();
        }

        DataBindHelper.BindListbox(ref lbPerfection, dtPerfectionNew, "PerfectionName", "PerfectionID", "");
    }
예제 #2
0
    private void FillData()
    {
        this.dtJob = PIKCV.BUS.Job.GetJobDetail(this.JobID);
        if (dtJob.Rows.Count < 1)
        {
            this.GoToDefaultPage();
        }

        PIKCV.BUS.Company objCompany = new PIKCV.BUS.Company();
        DataTable         dtCompany  = objCompany.GetCompanyInfo(Convert.ToInt32(this.dtJob.Rows[0]["CompanyID"]));

        ltlCompanyName.Text = dtCompany.Rows[0]["CompanyName"].ToString();

        string PositionName = dtJob.Rows[0]["PositionName"].ToString();

        this.PositonType = (PIKCV.COM.EnumDB.EmployeeTypes)Convert.ToInt32(DataTableHelper.Filter(this.cmbPositions, "PositionID", dtJob.Rows[0]["PositionID"].ToString()).Rows[0]["PositionTypeCode"]);

        ltlPositionName.Text = PositionName;
        ltlRefNo.Text        = dtJob.Rows[0]["ReferenceNumber"].ToString();

        if (dtJob.Rows[0]["PhotoFileName"].ToString().Trim() == String.Empty)
        {
            imgLogo.Visible = false;
        }
        else
        {
            imgLogo.ImageUrl = "~/" + this.Config(PIKCV.COM.EnumUtil.Config.CompanyImagePath) + dtJob.Rows[0]["PhotoFileName"].ToString();
        }

        ltlJobTitle.Text = dtJob.Rows[0]["JobTitle"].ToString();

        ltlNumberOfWorkers.Text = dtJob.Rows[0]["NumberOfWorkers"].ToString();
        ltlStartDate.Text       = Convert.ToDateTime(dtJob.Rows[0]["StartDate"]).ToShortDateString();
        ltlEndDate.Text         = Convert.ToDateTime(dtJob.Rows[0]["EndDate"]).ToShortDateString();

        PIKCV.BUS.Job objJob = new PIKCV.BUS.Job();
        DataBindHelper.BindRepeater(ref rptJobSectors, objJob.GetJobSectorNames(this.JobID));

        DataBindHelper.BindRepeater(ref rptJobPlaces, objJob.GetJobPlaceNames(this.JobID, PIKCV.COM.EnumDB.Places.TurkeyPlaceID));
        DataBindHelper.BindRepeater(ref rptJobCountries, objJob.GetJobPlaceNames(this.JobID, PIKCV.COM.EnumDB.Places.CountriesParentID));

        ltlJobDescription.Text = Util.Nl2Br(dtJob.Rows[0]["JobDescription"].ToString());
        DataBindHelper.BindRepeater(ref rptEducationLevels, objJob.GetJobEducationLevels(this.JobID, PIKCV.COM.EnumDB.LanguageID.Turkish));
        DataBindHelper.BindRepeater(ref rptJobQualitySectors, objJob.GetJobQualitySectorNames(this.JobID));

        DataBindHelper.BindRepeater(ref rptJobQualityPositions, objJob.GetJobQualityPositionNames(this.JobID));

        DataBindHelper.BindRepeater(ref rptPerfections, objJob.GetJobPerfection(this.JobID));
        ltlJobLabouringTypeName.Text = DataTableHelper.Filter(this.cmbLabouringTypes, "LabouringTypeID", dtJob.Rows[0]["LabouringTypeID"].ToString()).Rows[0]["LabouringTypeName"].ToString();

        ltlDisabled.Visible       = Convert.ToBoolean(dtJob.Rows[0]["IsDisabled"]);
        ltlOldConvicted.Visible   = Convert.ToBoolean(dtJob.Rows[0]["IsOldConvicted"]);
        ltlMartyrRelative.Visible = Convert.ToBoolean(dtJob.Rows[0]["IsMartyrRelative"]);
        ltlTerrorWronged.Visible  = Convert.ToBoolean(dtJob.Rows[0]["IsTerrorWronged"]);

        dvJobProperties.Visible = ((ltlMartyrRelative.Visible) || (ltlDisabled.Visible) || (ltlOldConvicted.Visible) || (ltlTerrorWronged.Visible));

        PIKCV.COM.EnumDB.SexCode JobSexCode = (PIKCV.COM.EnumDB.SexCode)Convert.ToInt32(dtJob.Rows[0]["Gender"]);
        switch (JobSexCode)
        {
        case PIKCV.COM.EnumDB.SexCode.Male:
            ltlSex.Text = "Erkek";
            break;

        case PIKCV.COM.EnumDB.SexCode.Female:
            ltlSex.Text = "Kadýn";
            break;

        case PIKCV.COM.EnumDB.SexCode.Both:
            ltlSex.Text = "Erkek - Kadýn";
            break;
        }

        PIKCV.COM.EnumDB.AgeRange Age = (PIKCV.COM.EnumDB.AgeRange)Convert.ToInt32(dtJob.Rows[0]["AgeRange"]);
        switch (Age)
        {
        case PIKCV.COM.EnumDB.AgeRange.age_18_24:
            ltlAgeRange.Text = "18-24";
            break;

        case PIKCV.COM.EnumDB.AgeRange.age_25_29:
            ltlAgeRange.Text = "25-29";
            break;

        case PIKCV.COM.EnumDB.AgeRange.age_30_34:
            ltlAgeRange.Text = "30-34";
            break;

        case PIKCV.COM.EnumDB.AgeRange.age_35_39:
            ltlAgeRange.Text = "35-39";
            break;

        case PIKCV.COM.EnumDB.AgeRange.age_40_44:
            ltlAgeRange.Text = "40-44";
            break;

        case PIKCV.COM.EnumDB.AgeRange.age_45_55:
            ltlAgeRange.Text = "45-55";
            break;

        case PIKCV.COM.EnumDB.AgeRange.age_56over:
            ltlAgeRange.Text = "56+";
            break;

        case PIKCV.COM.EnumDB.AgeRange.age_All:
            ltlAgeRange.Text = "Farketmez";
            break;
        }

        DataBindHelper.BindRepeater(ref rptForeignLanguages, objJob.GetJobForeignLanguages(this.JobID, PIKCV.COM.EnumDB.LanguageID.Turkish));
        DataBindHelper.BindRepeater(ref rptComputerKnowledges, objJob.GetJobComputerKnowledge(this.JobID, PIKCV.COM.EnumDB.LanguageID.Turkish));

        if (PIKCV.BUS.JobApplicants.ApplicantCtrl(this.smUserID, this.JobID))
        {
            ImgBtnApply.Visible        = false;
            ltlNoButtonMessage.Visible = true;
            ltlNoButtonMessage.Text    = PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.ApplicantCtrl);
        }

        if (!this.smIsLogin)
        {
            ImgBtnApply.Visible           = false;
            pnlApplicantCtrlLogin.Visible = true;
            //ltlNoButtonMessage.Text = PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.ApplicantCtrLogin);
        }

        if (ImgBtnApply.Visible)
        {
            //if (!this.smIsLogin) { ImgBtnApply.Visible = false; ImgBtnApply.OnClientClick = "alert('Ýlanlara baþvurmak için üye olmanýz gereklidir.'); window.location.href='Pikcv.aspx?Pik=Employee-Membership-UserInfo';window.location.href('" + this.PageReferer + "');"; }
            //else if (!this.smIsCvActive) ImgBtnApply.OnClientClick = "alert('Ýlana baþvurabilmek için özgeçminizin aktif olmasý gerekmektedir'); return false;";
            if (this.smMemberType == PIKCV.COM.EnumDB.MemberTypes.Company)
            {
                ImgBtnApply.Visible = false;
            }
            else if (this.PositonType != this.smEmployeeType)
            {
                ImgBtnApply.Visible = false;
            }
            else if (!this.smIsCvConfirmed)
            {
                ImgBtnApply.Visible = false; ImgBtnApply.OnClientClick = "alert('Üyeliðiniz onay için beklemektedir, onay sonrasýnda ilanlara baþvuru yapabileceksiniz, üyelik onayýnýz e-posta adresinize iletilecektir'); return false;";
            }
            else
            {
                ImgBtnApply.CommandArgument = this.JobID.ToString();
            }
        }

        if (this.smMemberType == PIKCV.COM.EnumDB.MemberTypes.Company)
        {
            liSendFriend.Visible = false;
        }
        else
        {
            hlSendFriend.NavigateUrl = "javascript:SendFriend(" + ((int)PIKCV.COM.EnumDB.SendFriendType.Job).ToString() + ", " + this.JobID.ToString() + ")";
        }
    }