Example #1
0
    bool IBaseControl.LoginControl(string Email, string Password)
    {
        PIKCV.BUS.User objUser = new PIKCV.BUS.User();

        if (objUser.LoginControl(Email, Password))
        {
            this.smUserID           = objUser.UserID;
            this.smIsLogin          = true;
            this.smEmployeeType     = objUser.EmployeeType;
            this.smFirstName        = objUser.FirstName;
            this.smIsEmailConfirmed = objUser.IsEmailConfirmed;
            this.smIsCvActive       = objUser.IsCVActive;
            this.smIsCvConfirmed    = objUser.IsCVConfirmed;
            this.smLastLoginDate    = objUser.LastLoginDate;
            this.smLastName         = objUser.LastName;
            this.smUserEmail        = objUser.Email;
            this.smMemberType       = PIKCV.COM.EnumDB.MemberTypes.Employee;

            PIKCV.BUS.UserCVs objUserCvs = new PIKCV.BUS.UserCVs();
            DataTable         dtUserCV   = objUserCvs.GetUserCV(this.smUserID);
            if (dtUserCV.Rows.Count < 1)
            {
                this.smCVFocus       = PIKCV.COM.EnumDB.CVFocusCode.PersonalInfo;
                this.smPhotoFileName = String.Empty;
            }
            else
            {
                this.smCVFocus       = (PIKCV.COM.EnumDB.CVFocusCode)(Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]));
                this.smPhotoFileName = dtUserCV.Rows[0]["PhotoFileName"].ToString().Trim();
            }
            return(true);
        }
        return(false);
    }
Example #2
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);

        if (dtUserCV.Rows.Count > 0)
        {
            FillData(dtUserCV);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         hlAddSchool.NavigateUrl = hlAddSchool.NavigateUrl.Replace("||ST||", ((int)this.EducationType).ToString());
         UEducationNav1.SelectEducationTypes(this.EducationType);
         PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
         DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);
         ImgBtnContinue.Visible = !(Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]) > (int)PIKCV.COM.EnumDB.CVFocusCode.References);
     }
 }
Example #4
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        PIKCV.BUS.UserCVs objUserComputerKnowledges = new PIKCV.BUS.UserCVs();
        DataTable         dtUserComputerKnowledges  = objUserComputerKnowledges.GetUserComputerKnowledges(this.smUserID, (int)this.smLanguageID);

        DataBindHelper.BindListbox(ref lbSelectedComputerKnowledgeTypes, dtUserComputerKnowledges, "ComputerKnowledgeTypeName", "ComputerKnowledgeTypeID");

        DataTable dtComputerKnowledgeTypes   = this.cmbComputerKnowledgeTypes;
        DataTable dtComputerKnowledgeTypeNew = new DataTable();

        if (dtUserComputerKnowledges.Rows.Count > 0)
        {
            dtComputerKnowledgeTypeNew.Columns.Add("ComputerKnowledgeTypeID");
            dtComputerKnowledgeTypeNew.Columns.Add("ComputerKnowledgeTypeName");

            bool add = true;
            foreach (DataRow drCache in dtComputerKnowledgeTypes.Rows)
            {
                add = true;
                foreach (DataRow dr in dtUserComputerKnowledges.Rows)
                {
                    if (dr["ComputerKnowledgeTypeID"].ToString() == drCache["ComputerKnowledgeTypeID"].ToString())
                    {
                        add = false;
                        break;
                    }
                }
                if (add)
                {
                    DataRow drNew = dtComputerKnowledgeTypeNew.NewRow();
                    drNew["ComputerKnowledgeTypeID"]   = drCache["ComputerKnowledgeTypeID"].ToString();
                    drNew["ComputerKnowledgeTypeName"] = drCache["ComputerKnowledgeTypeName"].ToString();
                    dtComputerKnowledgeTypeNew.Rows.Add(drNew);
                }
            }
        }
        else
        {
            dtComputerKnowledgeTypeNew = dtComputerKnowledgeTypes.Copy();
        }

        DataBindHelper.BindListbox(ref lbComputerKnowledgeTypes, dtComputerKnowledgeTypeNew, "ComputerKnowledgeTypeName", "ComputerKnowledgeTypeID", "");
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);

        ImgBtnSave.Visible     = (Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]) > (int)PIKCV.COM.EnumDB.CVFocusCode.References);
        ImgBtnContinue.Visible = !(ImgBtnSave.Visible);

        dvScript.InnerHtml = "<script>OtherDown('" + lbComputerKnowledgeTypes.ClientID + "', " + ((int)PIKCV.COM.EnumDB.OtherComputerKnowledgeID.Other).ToString() + ")</script>";
    }
Example #5
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        PIKCV.BUS.UserCVs objUserProhibitedCompanies = new PIKCV.BUS.UserCVs();
        DataTable         dtUserProhibitedCompanies  = objUserProhibitedCompanies.GetUserProhibitedCompanies(this.smUserID);

        DataBindHelper.BindListbox(ref lbSelectedCompanies, dtUserProhibitedCompanies, "CompanyName", "CompanyID");


        DataTable dtAllCompanies = this.cmbCompanies;
        DataTable dtCompaniesNew = new DataTable();

        if (dtAllCompanies.Rows.Count > 0)
        {
            dtCompaniesNew.Columns.Add("CompanyID");
            dtCompaniesNew.Columns.Add("CompanyName");

            bool add = true;
            foreach (DataRow drCache in dtAllCompanies.Rows)
            {
                add = true;
                foreach (DataRow dr in dtUserProhibitedCompanies.Rows)
                {
                    if (dr["CompanyID"].ToString() == drCache["CompanyID"].ToString())
                    {
                        add = false;
                        break;
                    }
                }
                if (add)
                {
                    DataRow drNew = dtCompaniesNew.NewRow();
                    drNew["CompanyID"]   = drCache["CompanyID"].ToString();
                    drNew["CompanyName"] = drCache["CompanyName"].ToString();
                    dtCompaniesNew.Rows.Add(drNew);
                }
            }
        }
        else
        {
            dtCompaniesNew = dtAllCompanies.Copy();
        }

        DataBindHelper.BindListbox(ref lbCompanies, dtCompaniesNew, "CompanyName", "CompanyID", "");

        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);

        ImgBtnSave.Visible     = (Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]) > (int)PIKCV.COM.EnumDB.CVFocusCode.References);
        ImgBtnContinue.Visible = !(ImgBtnSave.Visible);
    }
Example #6
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        PIKCV.BUS.UserCVs objUserReferences = new PIKCV.BUS.UserCVs();
        DataTable         dtUserReferences  = objUserReferences.GetUserReferences(this.smUserID);

        pnlNoRecord.Visible      = (dtUserReferences.Rows.Count < 1);
        pnlReferences.Visible    = !pnlNoRecord.Visible;
        rptReferences.DataSource = dtUserReferences;
        rptReferences.DataBind();
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);

        ImgBtnContinue.Visible = !(Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]) > (int)PIKCV.COM.EnumDB.CVFocusCode.References);
    }
Example #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
         DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);
         if (dtUserCV.Rows.Count > 0)
         {
             txtClubs.Text          = dtUserCV.Rows[0]["Clubs"].ToString();
             ImgBtnSave.Visible     = (Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]) > (int)PIKCV.COM.EnumDB.CVFocusCode.References);
             ImgBtnContinue.Visible = !(ImgBtnSave.Visible);
         }
         UCharacteristicAndSocialLifeNav1.SelectNavigatorLink(PIKCV.COM.EnumDB.CVFocusCode.Clubs);
     }
 }
Example #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     hlAddSchool.Visible       = true;
     hlAddMiddleSchool.Visible = true;
     if (!IsPostBack)
     {
         PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
         this.dtUserCV = objUserCV.GetUserCV(this.smUserID);
         if (dtUserCV.Rows.Count > 0)
         {
             FillData(this.dtUserCV);
             ddlEducationTypes.SelectedValue = this.dtUserCV.Rows[0]["EducationTypeCode"].ToString();
         }
     }
 }
Example #9
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        PIKCV.BUS.UserCVs objUserLanguages = new PIKCV.BUS.UserCVs();
        DataTable         dtUserLanguages  = objUserLanguages.GetUserLanguages(this.smUserID, (int)this.smLanguageID);

        pnlNoRecord.Visible            = (dtUserLanguages.Rows.Count < 1);
        pnlForeignLanguages.Visible    = !pnlNoRecord.Visible;
        rptForeignLanguages.DataSource = dtUserLanguages;
        rptForeignLanguages.DataBind();
        UCharacteristicAndSocialLifeNav1.SelectNavigatorLink(PIKCV.COM.EnumDB.CVFocusCode.ForeignLanguages);
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);

        ImgBtnContinue.Visible = !(Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]) > (int)PIKCV.COM.EnumDB.CVFocusCode.References);
    }
Example #10
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        PIKCV.BUS.UserCVs objUserEmployment = new PIKCV.BUS.UserCVs();
        DataTable         dtUserEmployment  = objUserEmployment.GetUserEmployment(this.smUserID, (int)this.smLanguageID);

        pnlNoRecord.Visible      = (dtUserEmployment.Rows.Count < 1);
        pnlEmployment.Visible    = !pnlNoRecord.Visible;
        rptEmployment.DataSource = dtUserEmployment;
        rptEmployment.DataBind();

        DataBindHelper.LoadNumberDDL(ref ddlTotalWorkExperience, 60, 1, 0);
        ddlTotalWorkExperience.Items.Insert(0, new ListItem(PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.InitialText), "-1"));

        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);

        ddlTotalWorkExperience.SelectedValue = dtUserCV.Rows[0]["TotalWorkExperience"].ToString();
        ImgBtnContinue.Visible = !(Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]) > (int)PIKCV.COM.EnumDB.CVFocusCode.References);
    }
Example #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            hlPersonalInfo.NavigateUrl = hlPersonalInfo.NavigateUrl.Replace("||FocusNo||", ((int)PIKCV.COM.EnumDB.CVFocusCode.PersonalInfo).ToString());

            DataBindHelper.BindDDL(ref ddlHomeCountry, this.cmbCountries, "PlaceName", "PlaceID", "-1", PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.InitialText), "-1");
            DataBindHelper.BindDDL(ref ddlHomeCity, this.cmbTurkeyCities, "PlaceName", "PlaceID", "-1", PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.InitialText), "-1");

            PIKCV.COM.Data.RemoveOtherItems(ref ddlHomeCity, (int)PIKCV.COM.EnumDB.Places.OtherPlaceID);

            PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
            DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);
            if (dtUserCV.Rows.Count > 0)
            {
                FillData(dtUserCV);
            }
        }
        ddlHomeCity.Attributes.Add("onchange", "OpenCloseOther(" + ((int)PIKCV.COM.EnumDB.Places.OtherPlaceID).ToString() + ", '" + ddlHomeCity.ClientID + "', 'dvOther')");
    }
Example #12
0
    private void GetTestScore()
    {
        if (this.smMemberType == PIKCV.COM.EnumDB.MemberTypes.Company)
        {
            PIKCV.BUS.User objUser = new PIKCV.BUS.User();
            this.EmployeeType = (PIKCV.COM.EnumDB.EmployeeTypes)Convert.ToInt32(objUser.GetUserDetail(this.smUserID).Rows[0]["EmployeeTypeCode"]);
        }
        else
        {
            this.EmployeeType = this.smEmployeeType;
        }

        this.dtTestScore = PIKCV.BUS.Test.GetTestScore(PIKCV.COM.EnumDB.TestTypeCode.General, this.smUserID, this.smLanguageID, EmployeeType);
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        try
        {
            this.TestDate = Convert.ToDateTime(objUserCV.GetUserCV(this.smUserID).Rows[0]["TestMatDate"]);
        }
        catch (Exception) { }
    }
Example #13
0
    private void GetData()
    {
        PIKCV.BUS.User    objUser   = new PIKCV.BUS.User();
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();

        this.dtUser   = objUser.GetUserDetail(this.smUserID);
        this.dtUserCV = objUserCV.GetUserCV(this.smUserID);
        this.dtUserComputerKnowledge = objUserCV.GetUserComputerKnowledges(this.smUserID, (int)this.smLanguageID);

        this.dtUserEducationUniversity0 = objUserCV.GetUserEducations(this.smUserID, PIKCV.COM.EnumDB.EducationTypes.University0, PIKCV.COM.EnumDB.LanguageID.Turkish, false);
        this.dtUserEducationUniversity1 = objUserCV.GetUserEducations(this.smUserID, PIKCV.COM.EnumDB.EducationTypes.University1, PIKCV.COM.EnumDB.LanguageID.Turkish, false);
        this.dtUserEducationUniversity2 = objUserCV.GetUserEducations(this.smUserID, PIKCV.COM.EnumDB.EducationTypes.University2, PIKCV.COM.EnumDB.LanguageID.Turkish, false);
        this.dtUserEducationDoktorate   = objUserCV.GetUserEducations(this.smUserID, PIKCV.COM.EnumDB.EducationTypes.Doktorate, PIKCV.COM.EnumDB.LanguageID.Turkish, false);

        this.dtUserEmployment           = objUserCV.GetUserEmployment(this.smUserID, (int)this.smLanguageID);
        this.dtUserLabouringTypes       = objUserCV.GetUserLabouringTypes(this.smUserID, (int)this.smLanguageID);
        this.dtUserLanguages            = objUserCV.GetUserLanguages(this.smUserID, (int)this.smLanguageID);
        this.dtUserPlacementPreferences = objUserCV.GetUserPlaces(this.smUserID, (int)this.smLanguageID);
        this.dtUserPositions            = objUserCV.GetUserPositions(this.smUserID, (int)this.smLanguageID);
        this.dtUserReferences           = objUserCV.GetUserReferences(this.smUserID);
        this.dtUserSectors = objUserCV.GetUserSectors(this.smUserID, (int)this.smLanguageID);
    }
Example #14
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            FillControls();
        }
        int StartYear = int.Parse(this.Config(PIKCV.COM.EnumUtil.Config.StartYear));
        int EndYear   = DateTime.Now.AddYears(int.Parse(this.Config(PIKCV.COM.EnumUtil.Config.MinAge)) * -1).Year;

        UDate1.YearDataBind(StartYear, EndYear);
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);

        if (dtUserCV.Rows.Count > 0)
        {
            FillData(dtUserCV);
        }

        if (Script != String.Empty)
        {
            dvScript.InnerHtml = "<script>" + Script + "<script>";
        }
    }
Example #15
0
 protected void LinkButton1_Click(object sender, EventArgs e)
 {
     if (this.cookPageType == PIKCV.COM.Enumerations.PageType.Employee)
     {
         if (this.LoginControl("*****@*****.**", "126132"))
         {
             PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
             if ((objUserCV.GetUserCV(this.smUserID).Rows.Count < 1) || (((int)(objUserCV.CVFocus(this.smUserID)) < (int)PIKCV.COM.EnumDB.CVFocusCode.References)))
             {
                 this.Redirect("Employee-Membership-CV");
             }
             else if (PIKCV.BUS.Test.UserTestCtrl(this.smUserID))
             {
                 this.Redirect("Employee-Membership-Tests");
             }
             else
             {
                 this.GoToLogonPage();
             }
         }
         else
         {
             ShowModal.Show(UserControls_Common_uModalPopup.Icons.error, PIKCV.COM.Data.GetErrorMessageTitleCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.UserNotExist), PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.UserNotExist), false);
         }
     }
     else
     {
         if (this.LoginControl("*****@*****.**", "buraks"))
         {
             this.GoToLogonPage();
         }
         else
         {
             ShowModal.Show(UserControls_Common_uModalPopup.Icons.error, PIKCV.COM.Data.GetErrorMessageTitleCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.UserNotExist), PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.UserNotExist), false);
         }
     }
 }
Example #16
0
    private void CheckIfTestIsDone()
    {
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);

        if (dtUserCV.Rows.Count > 0)
        {
            if (Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]) > (int)PIKCV.COM.EnumDB.CVFocusCode.References)
            {
                if (this.smEmployeeType == PIKCV.COM.EnumDB.EmployeeTypes.Pikpool)
                {
                    if (PIKCV.BUS.Test.UserTestCtrl(this.smUserID))
                    {
                        aTestResults.HRef   = "#" + this.smMemberType.ToString() + "-Membership-Tests";
                        ltlTestResults.Text = "Testler";
                    }
                }
                else if (this.smEmployeeType == PIKCV.COM.EnumDB.EmployeeTypes.Goodpik)
                {
                    if (PIKCV.BUS.Test.UserTestCtrl(this.smUserID) && PIKCV.BUS.Test.UserTestPerfectionCtrl(this.smUserID))
                    {
                        aTestResults.HRef   = "#" + this.smMemberType.ToString() + "-Membership-Tests";
                        ltlTestResults.Text = "Testler";
                    }
                }
            }
            else
            {
                aTestResults.HRef = "#" + this.smMemberType.ToString() + "-Membership-UserInfo";
            }
        }
        else
        {
            aTestResults.HRef = "#" + this.smMemberType.ToString() + "-Membership-UserInfo";
        }
    }
    protected void Page_PreRender(object sender, EventArgs e)
    {
        PIKCV.BUS.UserCVs objUserPlaces   = new PIKCV.BUS.UserCVs();
        DataTable         dtUserPlacesAll = objUserPlaces.GetUserPlaces(this.smUserID, (int)this.smLanguageID);

        PIKCV.BUS.UserCVs objUserLabouringTypes = new PIKCV.BUS.UserCVs();
        DataTable         dtUserLabouringTypes  = objUserLabouringTypes.GetUserLabouringTypes(this.smUserID, (int)this.smLanguageID);


        foreach (DataRow dr in dtUserLabouringTypes.Rows)
        {
            foreach (ListItem li in chLabouringTypes.Items)
            {
                if (li.Value == dr["LabouringTypeID"].ToString())
                {
                    li.Selected = true;
                    break;
                }
            }
        }

        DataTable dtUserPlaceCountries = new DataTable();

        dtUserPlaceCountries.Columns.Add("PlaceID");
        dtUserPlaceCountries.Columns.Add("PlaceName");

        DataTable dtUserPlaceCities = dtUserPlaceCountries.Clone();

        foreach (DataRow dr in dtUserPlacesAll.Rows)
        {
            if (dr["PlaceTypeCode"].ToString() == ((int)PIKCV.COM.EnumDB.PlaceTypes.Country).ToString())
            {
                DataRow drNew = dtUserPlaceCountries.NewRow();
                drNew["PlaceID"]   = dr["PlaceID"].ToString();
                drNew["PlaceName"] = dr["PlaceName"].ToString();
                dtUserPlaceCountries.Rows.Add(drNew);
            }
            else
            {
                DataRow drNew = dtUserPlaceCities.NewRow();
                drNew["PlaceID"]   = dr["PlaceID"].ToString();
                drNew["PlaceName"] = dr["PlaceName"].ToString();
                dtUserPlaceCities.Rows.Add(drNew);
            }
        }

        DataBindHelper.BindListbox(ref lbSelectedCountries, dtUserPlaceCountries, "PlaceName", "PlaceID", "");
        DataBindHelper.BindListbox(ref lbSelectedCities, dtUserPlaceCities, "PlaceName", "PlaceID", "");


        DataTable dtCountries    = this.cmbCountries;
        DataTable dtCountriesNew = new DataTable();

        if (dtUserPlaceCountries.Rows.Count > 0)
        {
            dtCountriesNew.Columns.Add("PlaceID");
            dtCountriesNew.Columns.Add("PlaceName");

            bool add = true;
            foreach (DataRow drCache in dtCountries.Rows)
            {
                add = true;
                foreach (DataRow dr in dtUserPlaceCountries.Rows)
                {
                    if (dr["PlaceID"].ToString() == drCache["PlaceID"].ToString())
                    {
                        add = false;
                        break;
                    }
                }
                if (add)
                {
                    DataRow drNew = dtCountriesNew.NewRow();
                    drNew["PlaceID"]   = drCache["PlaceID"].ToString();
                    drNew["PlaceName"] = drCache["PlaceName"].ToString();
                    dtCountriesNew.Rows.Add(drNew);
                }
            }
        }
        else
        {
            dtCountriesNew = dtCountries.Copy();
        }

        DataTable dtTurkeyCities = this.cmbTurkeyCities;
        DataTable dtCitiesNew    = new DataTable();

        if (dtUserPlaceCities.Rows.Count > 0)
        {
            dtCitiesNew.Columns.Add("PlaceID");
            dtCitiesNew.Columns.Add("PlaceName");

            bool add = true;
            foreach (DataRow drCache in dtTurkeyCities.Rows)
            {
                add = true;
                foreach (DataRow dr in dtUserPlaceCities.Rows)
                {
                    if (dr["PlaceID"].ToString() == drCache["PlaceID"].ToString())
                    {
                        add = false;
                        break;
                    }
                }
                if (add)
                {
                    DataRow drNew = dtCitiesNew.NewRow();
                    drNew["PlaceID"]   = drCache["PlaceID"].ToString();
                    drNew["PlaceName"] = drCache["PlaceName"].ToString();
                    dtCitiesNew.Rows.Add(drNew);
                }
            }
        }
        else
        {
            dtCitiesNew = dtTurkeyCities.Copy();
        }

        DataBindHelper.BindListbox(ref lbCountries, dtCountriesNew, "PlaceName", "PlaceID", "");
        DataBindHelper.BindListbox(ref lbCities, dtCitiesNew, "PlaceName", "PlaceID", "");

        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();

        DataTable dtUserCV = objUserCV.GetUserCV(this.smUserID);

        bool HasTravelDifficulty = Convert.ToBoolean(dtUserCV.Rows[0]["HasTravelDifficulty"]);

        rdHasTravelDifficultyYes.Checked = HasTravelDifficulty;
        rdHasTravelDifficultyNo.Checked  = !HasTravelDifficulty;

        bool IsSmoking = Convert.ToBoolean(dtUserCV.Rows[0]["IsSmoking"]);

        rdIsSmokingYes.Checked = IsSmoking;
        rdIsSmokingNo.Checked  = !IsSmoking;

        ImgBtnSave.Visible     = (Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]) > (int)PIKCV.COM.EnumDB.CVFocusCode.References);
        ImgBtnContinue.Visible = !(ImgBtnSave.Visible);

        dvScript.InnerHtml = "<script>OtherDown('" + lbCities.ClientID + "', " + ((int)PIKCV.COM.EnumDB.Places.OtherPlaceID).ToString() + ")</script>";
    }
Example #18
0
    private void NotificationCtrl()
    {
        DataRow drError = null;

        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();

        //CV si var mý?
        if (objUserCV.GetUserCV(this.smUserID).Rows.Count < 1)
        {
            pnlCVCtrl.Visible     = true;
            drError               = PIKCV.COM.Data.GetErrorCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.NoticeNOCV);
            ltlCVCtrlTitle.Text   = drError["ErrorTitle"].ToString();
            ltlCVCtrlMessage.Text = drError["Message"].ToString();
        }
        else
        {
            //Test Çözülmüþ mü Kontrol
            if (PIKCV.BUS.Test.UserTestCtrl(this.smUserID))
            {
                pnlTestCtrl.Visible = true;
                if (this.smEmployeeType == PIKCV.COM.EnumDB.EmployeeTypes.Pikpool)
                {
                    drError = PIKCV.COM.Data.GetErrorCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.NoticeTestCtrl);
                }
                else
                {
                    drError = PIKCV.COM.Data.GetErrorCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.NoticeTestCtrlForGoodPik);
                }
                ltlTestTitle.Text   = drError["ErrorTitle"].ToString();
                ltlTestMessage.Text = drError["Message"].ToString();
            }
            else if (this.smIsCvConfirmed)
            {
                //CV Güncel Kontrol
                DataTable dtUserCV     = objUserCV.GetUserCV(this.smUserID);
                DateTime  CVModifyDate = Convert.ToDateTime(dtUserCV.Rows[0]["ModifyDate"]);
                if (CVModifyDate < DateTime.Now.AddMonths((int.Parse(this.Config(PIKCV.COM.EnumUtil.Config.CVActualMonth))) * -1))
                {
                    pnlActualCtrl.Visible = true;
                    drError               = PIKCV.COM.Data.GetErrorCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.NoticeActualCtrl);
                    ltlActualTitle.Text   = drError["ErrorTitle"].ToString();
                    ltlActualMessage.Text = drError["Message"].ToString();
                }

                //CV Aktiflik Kontrol
                PIKCV.BUS.User objUser = new PIKCV.BUS.User();
                if (!Convert.ToBoolean(objUser.GetUserDetail(this.smUserID).Rows[0]["IsCVActive"]))
                {
                    pnlCVActive.Visible     = true;
                    drError                 = PIKCV.COM.Data.GetErrorCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.NoticeCvActiveCtrl);
                    ltlCVActiveTitle.Text   = drError["ErrorTitle"].ToString();
                    ltlCVActiveMessage.Text = drError["Message"].ToString();
                }
                else
                {
                    pnlCVActive.Visible = false;
                }
            }
        }
        pnlNotification.Visible = true;
        pnlNotification.Visible = (!((!pnlCVCtrl.Visible) && (!pnlActualCtrl.Visible) && (!pnlTestCtrl.Visible) && (!pnlCVActive.Visible)));
    }
Example #19
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        PIKCV.BUS.UserCVs objUserEmploymentChooices = new PIKCV.BUS.UserCVs();

        DataTable dtUserSectors   = objUserEmploymentChooices.GetUserSectors(this.smUserID, (int)this.smLanguageID);
        DataTable dtUserPositions = objUserEmploymentChooices.GetUserPositions(this.smUserID, (int)this.smLanguageID);

        DataBindHelper.BindListbox(ref lbSelectedSectors, dtUserSectors, "SectorName", "SectorID");
        DataBindHelper.BindListbox(ref lbSelectedPositions, dtUserPositions, "PositionName", "PositionID");

        DataTable dtSectors    = this.cmbSectors;
        DataTable dtSectorsNew = new DataTable();

        if (dtUserSectors.Rows.Count > 0)
        {
            dtSectorsNew.Columns.Add("SectorID");
            dtSectorsNew.Columns.Add("SectorName");

            bool add = true;
            foreach (DataRow drCache in dtSectors.Rows)
            {
                add = true;
                foreach (DataRow dr in dtUserSectors.Rows)
                {
                    if (dr["SectorID"].ToString() == drCache["SectorID"].ToString())
                    {
                        add = false;
                        break;
                    }
                }
                if (add)
                {
                    DataRow drNew = dtSectorsNew.NewRow();
                    drNew["SectorID"]   = drCache["SectorID"].ToString();
                    drNew["SectorName"] = drCache["SectorName"].ToString();
                    dtSectorsNew.Rows.Add(drNew);
                }
            }
        }
        else
        {
            dtSectorsNew = dtSectors.Copy();
        }


        DataTable dtPositions    = this.cmbPositions;
        DataTable dtPositionsNew = new DataTable();

        if (dtPositions.Rows.Count > 0)
        {
            dtPositionsNew.Columns.Add("PositionID");
            dtPositionsNew.Columns.Add("PositionName");

            bool add = true;
            foreach (DataRow drCache in dtPositions.Rows)
            {
                add = true;
                foreach (DataRow dr in dtUserPositions.Rows)
                {
                    if (dr["PositionID"].ToString() == drCache["PositionID"].ToString())
                    {
                        add = false;
                        break;
                    }
                    if ((this.smEmployeeType != PIKCV.COM.EnumDB.EmployeeTypes.Unknown) && ((PIKCV.COM.EnumDB.EmployeeTypes)(Convert.ToInt32(drCache["PositionTypeCode"])) != this.smEmployeeType))
                    {
                        add = false;
                        break;
                    }
                }
                if (add)
                {
                    DataRow drNew;
                    if (this.smEmployeeType != PIKCV.COM.EnumDB.EmployeeTypes.Unknown)
                    {
                        if (this.smEmployeeType == (PIKCV.COM.EnumDB.EmployeeTypes)(Convert.ToInt16(drCache["PositionTypeCode"])))
                        {
                            drNew = dtPositionsNew.NewRow();
                            drNew["PositionID"]   = drCache["PositionID"].ToString();
                            drNew["PositionName"] = drCache["PositionName"].ToString();
                            dtPositionsNew.Rows.Add(drNew);
                        }
                    }
                    else
                    {
                        drNew = dtPositionsNew.NewRow();
                        drNew["PositionID"]   = drCache["PositionTypeCode"] + "_||" + drCache["PositionID"].ToString();
                        drNew["PositionName"] = drCache["PositionName"].ToString();
                        dtPositionsNew.Rows.Add(drNew);
                    }
                }
            }
        }
        else
        {
            dtPositionsNew = dtPositions.Copy();
        }

        DataBindHelper.BindListbox(ref lbSectors, dtSectorsNew, "SectorName", "SectorID", "0");
        DataBindHelper.BindListbox(ref lbPositions, dtPositionsNew, "PositionName", "PositionID", "0");
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        DataTable         dtUserCV  = objUserCV.GetUserCV(this.smUserID);

        ImgBtnSave.Visible     = (Convert.ToInt32(dtUserCV.Rows[0]["CvFocusCode"]) > (int)PIKCV.COM.EnumDB.CVFocusCode.References);
        ImgBtnContinue.Visible = !(ImgBtnSave.Visible);
    }
Example #20
0
    protected void btnLogin_Click(object sender, ImageClickEventArgs e)
    {
        if (this.cookPageType == PIKCV.COM.Enumerations.PageType.Employee)
        {
            if (this.LoginControl(txtEmail.Text, txtPassword.Text))
            {
                if (this.ExistLogin())
                {
                    this.LogOut();
                    this.GoToFeedback(PIKCV.COM.EnumDB.ErrorTypes.ExistLogin);
                }

                PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
                if ((objUserCV.GetUserCV(this.smUserID).Rows.Count < 1) || (((int)(objUserCV.CVFocus(this.smUserID)) < (int)PIKCV.COM.EnumDB.CVFocusCode.References)))
                {
                    this.Redirect("Employee-Membership-CV");
                }
                else if (PIKCV.BUS.Test.UserTestCtrl(this.smUserID))
                {
                    this.Redirect("Employee-Membership-Tests");
                }
                else
                {
                    this.GoToLogonPage();
                }
            }
            else
            {
                txtEmail.Text = "";
                ShowModal.Show(UserControls_Common_uModalPopup.Icons.error, PIKCV.COM.Data.GetErrorMessageTitleCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.UserNotExist), PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.UserNotExist), false);
            }
        }
        else
        {
            if (this.smSecurityImage == txtSecurityCode.Text.Trim())
            {
                if (this.LoginControl(txtEmail.Text, txtPassword.Text))
                {
                    if (this.ExistLogin())
                    {
                        this.LogOut();
                        this.GoToFeedback(PIKCV.COM.EnumDB.ErrorTypes.ExistLogin);
                    }

                    if (this.smIsFirstLogin)
                    {
                        this.Redirect("Company-Membership-ChangePassword");
                    }
                    this.GoToLogonPage();
                }
                else
                {
                    txtEmail.Text = "";
                    ShowModal.Show(UserControls_Common_uModalPopup.Icons.error, PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.UserNotExist), PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.UserNotExist), false);
                }
            }
            else
            {
                ShowModal.Show(UserControls_Common_uModalPopup.Icons.error, PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.SecurityCodeIsNotTrue), PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.SecurityCodeIsNotTrue), false);
            }
        }
    }
    private void GetTestScore()
    {
        if (this.smMemberType == PIKCV.COM.EnumDB.MemberTypes.Company)
        {
            PIKCV.BUS.User objUser = new PIKCV.BUS.User();
            this.EmployeeType = (PIKCV.COM.EnumDB.EmployeeTypes)Convert.ToInt32(objUser.GetUserDetail(this.smUserID).Rows[0]["EmployeeTypeCode"]);
        }
        else
        {
            this.EmployeeType = this.smEmployeeType;
        }

        this.dtTestScore = PIKCV.BUS.Test.GetTestPerfectionScore(this.smUserID);
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
        try
        {
            this.TestDate = Convert.ToDateTime(objUserCV.GetUserCV(this.smUserID).Rows[0]["TestYetDate"]);
        }
        catch (Exception) { }

        int ActiveRowIndex = 0;

        float GroupLevelScore1 = 0;
        float GroupLevelScore2 = 0;
        float GroupLevelScore3 = 0;

        string Description  = String.Empty;
        int    PerfectionID = 0;
        int    LevelID      = 0;

        DataRow   dr;
        DataTable dtScoreResult;

        for (int i = 0; i <= 30; i = i + 6)
        {
            GroupLevelScore1 = ReturnLevelPoint(i);
            GroupLevelScore2 = ReturnLevelPoint(i + 2);
            GroupLevelScore3 = ReturnLevelPoint(i + 4);

            if (GroupLevelScore1 > GroupLevelScore2)
            {
                ActiveRowIndex = i;
            }
            else if (GroupLevelScore1 < GroupLevelScore2)
            {
                ActiveRowIndex = i + 2;
            }
            else if ((GetSmallPoint(i)) > (GetSmallPoint(i + 2)))
            {
                ActiveRowIndex = i;
            }
            else
            {
                ActiveRowIndex = i + 2;
            }

            if (ActiveRowIndex == i)
            {
                if (GroupLevelScore1 > GroupLevelScore3)
                {
                    ActiveRowIndex = i;
                }
                else if (GroupLevelScore1 < GroupLevelScore3)
                {
                    ActiveRowIndex = i + 4;
                }
                else if ((GetSmallPoint(i)) > (GetSmallPoint(i + 4)))
                {
                    ActiveRowIndex = i;
                }
                else
                {
                    ActiveRowIndex = i + 4;
                }
            }

            if (ActiveRowIndex == i + 2)
            {
                if (GroupLevelScore2 > GroupLevelScore3)
                {
                    ActiveRowIndex = i + 2;
                }
                else if (GroupLevelScore2 > GroupLevelScore3)
                {
                    ActiveRowIndex = i + 4;
                }
                else if ((GetSmallPoint(i + 2)) > (GetSmallPoint(i + 4)))
                {
                    ActiveRowIndex = i + 2;
                }
                else
                {
                    ActiveRowIndex = i + 4;
                }
            }


            dr = this.dtTestScore.Rows[ActiveRowIndex];

            PerfectionID = Convert.ToInt32(dr["PerfectionID"]);
            LevelID      = Convert.ToInt32(dr["TestLevelID"]);

            dtScoreResult = PIKCV.BUS.Test.GetTestPerfectionResult(this.EmployeeType, this.smLanguageID, PerfectionID, LevelID);
            Description   = dtScoreResult.Rows[0]["Description"].ToString();

            AddDtAllInfo(PerfectionID, dr["PerfectionName"].ToString(), LevelID, dr["LevelCode"].ToString(), Description);
        }
    }
Example #22
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        PIKCV.BUS.User objUser = new PIKCV.BUS.User();
        if (this.smIsLogin)
        {
            DataTable dtUser = objUser.GetUserDetail(this.smUserID);
            if (dtUser.Rows.Count > 0)
            {
                if (this.smMemberType == PIKCV.COM.EnumDB.MemberTypes.Employee)
                {
                    txtName.Text = dtUser.Rows[0]["FirstName"].ToString();
                    txtSurName.Text = dtUser.Rows[0]["LastName"].ToString();
                    txtEMail.Text = dtUser.Rows[0]["Email"].ToString();
                    txtIdentityNo.Text = dtUser.Rows[0]["IdentityNo"].ToString();
                    txtPrivateQuestion.Text = dtUser.Rows[0]["SecretQuestion"].ToString();
                    txtPrivateAnswer.Text = dtUser.Rows[0]["SecretAnswer"].ToString();
                    chIsWantedSMS.Checked = Convert.ToBoolean(dtUser.Rows[0]["IsWantedSMS"]);
                    dvScript.InnerHtml = "<script>document.getElementById('chAggreement').checked = true; document.getElementById('chPrivacy').checked = true;</script>";
                    rqrPass.Enabled = false;
                    rqrPass2.Enabled = false;
                    CustomValidatorPassword.Enabled = false;
                    pnlCompany.Visible = false;
                    pnlEmployee.Visible = true;

                    ltlTitle.Visible = false;
                    ltlTitle2.Visible = false;
                    ltlTitle3.Visible = true;
                }
                else if (this.smMemberType == PIKCV.COM.EnumDB.MemberTypes.Company || this.smMemberType == PIKCV.COM.EnumDB.MemberTypes.TemporaryUser)
                {
                    lblPersonnelNameHeader.Text = "Adý:";
                    lblPersonnelSurnameHeader.Text = "Soyadý:";

                    trMsg.Visible = false;
                    lblName.Text = dtUser.Rows[0]["FirstName"].ToString();
                    lblSurName.Text = dtUser.Rows[0]["LastName"].ToString();

                    ltlTitle.Visible = false;
                    ltlTitle2.Visible = true;
                    ltlTitle2.Text = Util.SpecialName(lblName.Text + " " + lblSurName.Text);
                    ltlTitle3.Visible = false;

                    pnlEmployee.Visible = false;
                    pnlCompany.Visible = true;

                    // Get Company Folders
                    DataTable dtCOmpanyFolders = new DataTable();
                    PIKCV.BUS.Company Comp = new PIKCV.BUS.Company();
                    dtCOmpanyFolders = Comp.GetCompanyFolders(this.smCompanyID, false, false);
                    CARETTA.COM.DataBindHelper.BindDDL(ref ddlCompanyFolders, dtCOmpanyFolders, "FolderName", "FolderID", "", PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.SendFolder), "0");
                    
                    // Önceden bu herifin bilgileri alýnmýþ mý?
                    if (this.smMemberType == PIKCV.COM.EnumDB.MemberTypes.Company)
                    {
                        imgBuyContactInfo.Visible = !(CheckBuyContactInfo(this.smCompanyID, this.smUserID));
                        liInterview.Visible = !(imgBuyContactInfo.Visible);
                        liSendMessage.Visible = !(imgBuyContactInfo.Visible);
                    }
                    else
                    {
                        imgBuyContactInfo.Visible = false;
                        liInterview.Visible = false;
                        liSendMessage.Visible = false;
                        ddlCompanyFolders.Visible = false;
                        liSentToFile.Visible = false;
                    }
                    
                    // Pozisyon
                    PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();
                    DataTable dtUserPositions = new DataTable();
                    dtUserPositions = objUserCV.GetUserPositions(this.smUserID, (int)this.smLanguageID);
                    DataBindHelper.BindRepeater(ref rptUserPositions, dtUserPositions);
                    
                    // Tecrübe
                    DataTable dtUserCV = new DataTable();
                    dtUserCV = objUserCV.GetUserCV(this.smUserID);
                    int UserAge = DateTime.Now.Year - (Convert.ToDateTime(dtUserCV.Rows[0]["BirthDate"]).Year);
                    lblAge.Text = UserAge.ToString();

                    if (!imgBuyContactInfo.Visible)
                    {
                        trAddress.Visible = true;
                        trEmail.Visible = true;
                        trPhoto.Visible = true;
                        lblAddress.Text = dtUserCV.Rows[0]["HomeAddress"].ToString();
                        lblPhone.Text = dtUserCV.Rows[0]["HomePhone"].ToString();
                        lblEmail.Text = dtUser.Rows[0]["Email"].ToString();
                    }
                    else {
                        trAddress.Visible = false;
                        trEmail.Visible = false;
                        trPhoto.Visible = false;
                    }

                    ltlTotalWorkExperience.Text = dtUserCV.Rows[0]["TotalWorkExperience"].ToString();
                    this.smPhotoFileName = dtUserCV.Rows[0]["PhotoFileName"].ToString();
                }
            }
        }

        imgUserPhoto.ImageUrl += this.smPhotoFileName;
        if (!(System.IO.File.Exists(Request.MapPath(imgUserPhoto.ImageUrl))))
        {
            imgUserPhoto.ImageUrl = "~/Images/UserImages/0.png";
        }

        //txtPassword.Text = "Pass" + Util.CreateRandomNumber(6);
        //txtPassword2.Text = txtPassword.Text;
        //txtIdentityNo.Text = Util.CreateRandomNumber(11);
        //txtPrivateQuestion.Text = "Soru" + Util.CreateRandomNumber(5);
        //txtPrivateAnswer.Text = "Cevap" + Util.CreateRandomNumber(5);
    }