Example #1
0
    private void FillDetails()
    {
        PIKCV.BUS.Job obj       = new PIKCV.BUS.Job();
        DataTable     dtJobInfo = obj.GetJobInfo(this.smJobID);

        if (dtJobInfo.Rows.Count > 0)
        {
            PIKCV.COM.EnumDB.EmployeeTypes EmployeeType = PIKCV.COM.EnumDB.EmployeeTypes.Unknown;
            EmployeeType = (PIKCV.COM.EnumDB.EmployeeTypes)Convert.ToInt32(dtJobInfo.Rows[0]["UserTypeID"]);
            DataBindHelper.BindDDL(ref drpPositions, PIKCV.BUS.Position.GetPositions(EmployeeType, this.smLanguageID, false), "PositionName", "PositionID", "", "Lütfen Seçiniz...", "0");
            txtReferanceNumber.Text = dtJobInfo.Rows[0]["ReferenceNumber"].ToString();
            txtJobDescription.Text  = dtJobInfo.Rows[0]["JobDescription"].ToString();
            if (dtJobInfo.Rows[0]["NumberOfWorkers"].ToString() == "0")
            {
                txtNumberOfWorkers.Text = "";
            }
            else
            {
                txtNumberOfWorkers.Text = dtJobInfo.Rows[0]["NumberOfWorkers"].ToString();
            }

            //drpNumberOfWorkers.SelectedValue = dtJobInfo.Rows[0]["NumberOfWorkers"].ToString();

            drpPositions.SelectedValue = dtJobInfo.Rows[0]["PositionID"].ToString();
        }
    }
Example #2
0
File: User.cs Project: jiqsaw/pikcv
 public bool LoginControl(string Email, string Password)
 {
     Email    = Util.ClearString(Email.Trim());
     Password = Encryption.Encrypt(CARETTA.COM.Util.ClearString(Password.Trim()));
     PIKCV.DAL.User objUser = new PIKCV.DAL.User();
     objUser.Where.Email.Value            = Email;
     objUser.Where.Password.Value         = Password;
     objUser.Where.IsEmailConfirmed.Value = true;
     objUser.Where.IsActive.Value         = true;
     objUser.Where.IsDeleted.Value        = false;
     objUser.Query.Load();
     if (!objUser.EOF)
     {
         this.m_UserID           = objUser.UserID;
         this.m_ActivationNumber = objUser.ActivationNumber;
         this.m_CreateDate       = objUser.CreateDate;
         this.m_Email            = objUser.Email;
         this.m_EmployeeType     = (PIKCV.COM.EnumDB.EmployeeTypes)((int)objUser.EmployeeTypeCode);
         this.m_FirstName        = objUser.FirstName;
         this.m_IdentityNo       = objUser.IdentityNo;
         this.m_IsActive         = objUser.IsActive;
         this.m_IsCVActive       = objUser.IsCVActive;
         this.m_IsCVConfirmed    = objUser.IsCVConfirmed;
         this.m_IsDeleted        = objUser.IsDeleted;
         this.m_IsEmailConfirmed = objUser.IsEmailConfirmed;
         this.m_LastName         = objUser.LastName;
         this.m_ModifyDate       = objUser.ModifyDate;
         this.m_Password         = objUser.Password;
         this.m_LastLoginDate    = objUser.LastLoginDate;
         UpdateLastLoginDate(UserID);
         return(true);
     }
     return(false);
 }
Example #3
0
File: Test.cs Project: jiqsaw/pikcv
 //Yetkinlik Testini Getir
 public static DataTable GetPerfectionTest(PIKCV.COM.EnumDB.EmployeeTypes EmployeeType, PIKCV.COM.EnumDB.EmployeeTypes BothTestType, PIKCV.COM.EnumDB.LanguageID LanguageID)
 {
     try
     {
         PIKCV.DAL.TestPerfection obj = new PIKCV.DAL.TestPerfection();
         return(obj.GetPerfectionTest((int)EmployeeType, (int)BothTestType, (int)LanguageID));
     }
     catch (Exception)
     {
         throw;
     }
     return(null);
 }
Example #4
0
File: Test.cs Project: jiqsaw/pikcv
 public static DataTable GetTestPerfectionResult(PIKCV.COM.EnumDB.EmployeeTypes EmployeeTypeCode, PIKCV.COM.EnumDB.LanguageID LanguageID, int PerfectionID, int TestLevelID)
 {
     try
     {
         PIKCV.DAL.TestPerfection obj = new PIKCV.DAL.TestPerfection();
         return(obj.GetTestPerfectionResult((int)EmployeeTypeCode, (int)LanguageID, PerfectionID, TestLevelID));
     }
     catch (Exception)
     {
         throw;
     }
     return(null);
 }
Example #5
0
File: Test.cs Project: jiqsaw/pikcv
 //Test skorunu getir
 public static DataTable GetTestScore(PIKCV.COM.EnumDB.TestTypeCode TestTypeCode, int UserID,
                                      PIKCV.COM.EnumDB.LanguageID LanguageID, PIKCV.COM.EnumDB.EmployeeTypes EmployeeTypeCode)
 {
     try
     {
         PIKCV.DAL.TestAnswers obj = new PIKCV.DAL.TestAnswers();
         return(obj.GetTestScore((int)TestTypeCode, UserID, (int)LanguageID, (int)EmployeeTypeCode));
     }
     catch (Exception)
     {
         throw;
     }
     return(null);
 }
Example #6
0
        public static DataTable GetPositions(PIKCV.COM.EnumDB.EmployeeTypes EmployeeType, PIKCV.COM.EnumDB.LanguageID LanguageID, bool IsDeleted)
        {
            DataTable dt;

            try
            {
                PIKCV.DAL.Positions obj = new PIKCV.DAL.Positions();
                dt = obj.GetPositions((int)EmployeeType, (int)LanguageID, IsDeleted);
            }
            catch (Exception)
            {
                dt = null;
                throw;
            }
            return(dt);
        }
Example #7
0
    protected void ImgBtnContinue_Click(object sender, ImageClickEventArgs e)
    {
        PIKCV.BUS.UserCVs objUserCV = new PIKCV.BUS.UserCVs();

        ArrayList arrSelectedSectors   = new ArrayList();
        ArrayList arrSelectedPositions = new ArrayList();

        if (Request.Form[lbSelectedSectors.UniqueID] != null)
        {
            arrSelectedSectors.AddRange(Request.Form[lbSelectedSectors.UniqueID].Split(','));
        }

        if (Request.Form[lbSelectedPositions.UniqueID] != null)
        {
            arrSelectedPositions.AddRange(Request.Form[lbSelectedPositions.UniqueID].Split(','));
        }

        if (this.smEmployeeType == PIKCV.COM.EnumDB.EmployeeTypes.Unknown)
        {
            PIKCV.COM.EnumDB.EmployeeTypes EmployeeType = (PIKCV.COM.EnumDB.EmployeeTypes)(int.Parse(Util.Left(arrSelectedPositions[0].ToString(), 1)));
            for (int i = 0; i < arrSelectedPositions.Count; i++)
            {
                arrSelectedPositions[i] = arrSelectedPositions[i].ToString().Substring(arrSelectedPositions[i].ToString().IndexOf("_||") + 3);
            }
            this.smEmployeeType = EmployeeType;
        }

        if (objUserCV.SaveEmploymentChooices(this.smUserID, arrSelectedSectors, arrSelectedPositions, this.smEmployeeType))
        {
            if (ImgBtnContinue.Visible == true)
            {
                this.smCVFocus = objUserCV.CVFocus(this.smUserID);
                this.Redirect("Employee-Membership-CV&CVFocus=" + ((int)PIKCV.COM.EnumDB.CVFocusCode.PlacementPreferences).ToString());
            }
            else
            {
                ShowModal.Show(UserControls_Common_uModalPopup.Icons.alert, PIKCV.COM.EnumDB.ErrorTypes.UpdateCV);
            }
        }
        else
        {
            ShowModal.Show(UserControls_Common_uModalPopup.Icons.alert, PIKCV.COM.EnumDB.ErrorTypes.NoUpdateCV);
        }
    }
Example #8
0
    protected void btnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        DataRow drOrderType = PIKCV.BUS.Orders.GetOrderTypesDetails(Convert.ToInt32(rblJobListType.SelectedValue));

        if (drOrderType != null)
        {
            PIKCV.COM.EnumDB.EmployeeTypes JobListType = (PIKCV.COM.EnumDB.EmployeeTypes)(Convert.ToInt32(rblEmployeeTypes.SelectedValue));
            switch (JobListType)
            {
            case PIKCV.COM.EnumDB.EmployeeTypes.Pikpool:
                CompanyCreditControl(Convert.ToInt32(drOrderType["PikPoolCredit"]));
                break;

            case PIKCV.COM.EnumDB.EmployeeTypes.Goodpik:
                CompanyCreditControl(Convert.ToInt32(drOrderType["GoodPikCredit"]));
                break;
            }
        }
        Job objJob   = new Job();
        int SavedJob = objJob.SaveJobType(this.smJobID, this.smCompanyID, rblJobListType.SelectedValue, rblEmployeeTypes.SelectedValue,
                                          chkMartyrRelative.Checked, chkDisabled.Checked, chkOldConvicted.Checked, chkTerrorWronged.Checked);

        if (SavedJob != 0)
        {
            pnlError.Visible = false;
            if (this.smJobSaveType == PIKCV.COM.Enumerations.JobSaveType.NewJobEntry)
            {
                this.smJobID    = SavedJob;
                this.smJobFocus = PIKCV.COM.EnumDB.JobsFocusCode.PositionDefinition;
                this.Redirect("Company-Jobs-Jobs&JobFocus=" + ((int)PIKCV.COM.EnumDB.JobsFocusCode.PositionDefinition).ToString());
            }
            else
            {
                Response.Write("<script>alert('Yapmýþ olduðunuz deðiþiklikler kaydedilmiþtir');window.location.href('pikcv.aspx?pik=Company-Jobs-Jobs&JobFocus=" + ((int)PIKCV.COM.EnumDB.JobsFocusCode.JobType).ToString() + "');</script>");
            }
        }
        else
        {
            pnlError.Visible = true;
            ltlError.Text    = "Kayýt sýrasýnda bir hata oluþtu lütfen tekrar deneyin";
        }
    }
Example #9
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) { }
    }
    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 #11
0
File: Test.cs Project: jiqsaw/pikcv
 //Test Toplam Skoru Bilgileri
 public static DataTable GetTestTotalScoreInfo(float TotalPoint, PIKCV.COM.EnumDB.LanguageID LanguageID, PIKCV.COM.EnumDB.EmployeeTypes EmployeeType)
 {
     try
     {
         PIKCV.DAL.TestTotalScoreScale obj = new PIKCV.DAL.TestTotalScoreScale();
         return(obj.GetTestTotalScoreInfo(TotalPoint, (int)LanguageID, (int)EmployeeType));
     }
     catch (Exception)
     {
         throw;
     }
     return(null);
 }
Example #12
0
        public bool SaveEmploymentChooices(int UserID, ArrayList arrSelectedSectors, ArrayList arrSelectedPositions, PIKCV.COM.EnumDB.EmployeeTypes EmployeeType)
        {
            PIKCV.DAO.TransactionMgr Tran = PIKCV.DAO.TransactionMgr.ThreadTransactionMgr();

            try
            {
                PIKCV.DAL.UserSectors   objSectors   = new PIKCV.DAL.UserSectors();
                PIKCV.DAL.UserPositions objPositions = new PIKCV.DAL.UserPositions();
                PIKCV.DAL.UserCVs       ObjCV        = new PIKCV.DAL.UserCVs();
                PIKCV.DAL.User          ObjUser      = new PIKCV.DAL.User();

                objSectors.Where.UserID.Value   = UserID;
                objPositions.Where.UserID.Value = UserID;
                objSectors.Query.Load();
                objPositions.Query.Load();

                Tran.BeginTransaction();

                objSectors.DeleteAll();
                objSectors.Save();

                objPositions.DeleteAll();
                objPositions.Save();

                for (int i = 0; i < arrSelectedPositions.Count; i++)
                {
                    objPositions.AddNew();
                    objPositions.UserID     = UserID;
                    objPositions.PositionID = Convert.ToInt32(arrSelectedPositions[i]);
                    objPositions.Save();
                }

                for (int i = 0; i < arrSelectedSectors.Count; i++)
                {
                    objSectors.AddNew();
                    objSectors.UserID   = UserID;
                    objSectors.SectorID = Convert.ToInt32(arrSelectedSectors[i]);
                    objSectors.Save();
                }

                ObjCV.Where.UserID.Value = UserID;
                ObjCV.Query.Load();

                ObjCV.ModifyDate = DateTime.Now;
                if (ObjCV.CvFocusCode < (int)PIKCV.COM.EnumDB.CVFocusCode.PlacementPreferences)
                {
                    ObjCV.CvFocusCode = (int)PIKCV.COM.EnumDB.CVFocusCode.PlacementPreferences;
                }
                ObjCV.Save();

                ObjUser.LoadByPrimaryKey(UserID);
                ObjUser.EmployeeTypeCode = (int)EmployeeType;
                ObjUser.Save();

                Tran.CommitTransaction();

                return(true);
            }
            catch (Exception)
            {
                Tran.RollbackTransaction();
                PIKCV.DAO.TransactionMgr.ThreadTransactionMgrReset();
                return(false);
            }
        }
Example #13
0
        public int SaveApproval(int CompanyID, int JobID, int JobStatus, bool IsCompanyNameHidden, ref int NewCredit)
        {
            PIKCV.DAO.TransactionMgr Tran = PIKCV.DAO.TransactionMgr.ThreadTransactionMgr();

            try
            {
                Tran.BeginTransaction();

                PIKCV.DAL.Jobs obj = new PIKCV.DAL.Jobs();
                obj.LoadByPrimaryKey(JobID);

                if (JobStatus != (int)PIKCV.COM.EnumDB.JobStatus.Draft)
                {
                    //ilanýn pik kredisini þirketten düþelim
                    PIKCV.DAL.OrderTypes objOrderType = new PIKCV.DAL.OrderTypes();
                    objOrderType.LoadByPrimaryKey(obj.JobListType);

                    int CreditsSpend = 0;

                    PIKCV.COM.EnumDB.EmployeeTypes EmployeeTypes = (PIKCV.COM.EnumDB.EmployeeTypes)(obj.UserTypeID);
                    switch (EmployeeTypes)
                    {
                    case PIKCV.COM.EnumDB.EmployeeTypes.Pikpool:
                        CreditsSpend = objOrderType.PikPoolCredit;
                        break;

                    case PIKCV.COM.EnumDB.EmployeeTypes.Goodpik:
                        CreditsSpend = objOrderType.GoodPikCredit;
                        break;
                    }


                    PIKCV.DAL.Companies objCompany = new PIKCV.DAL.Companies();
                    objCompany.LoadByPrimaryKey(CompanyID);

                    NewCredit          = objCompany.Credits - CreditsSpend;
                    objCompany.Credits = NewCredit;
                    objCompany.Save();

                    PIKCV.DAL.Orders objOrders = new PIKCV.DAL.Orders();
                    objOrders.AddNew();
                    objOrders.CompanyID        = CompanyID;
                    objOrders.OrderDate        = DateTime.Now;
                    objOrders.OrderTypeID      = obj.JobListType;
                    objOrders.ProcessTypeCode  = (int)PIKCV.COM.EnumDB.OrderProcessTypeCode.paid;
                    objOrders.IsConfirmed      = true;
                    objOrders.Price            = 0;
                    objOrders.TotalCreditsUsed = CreditsSpend;
                    objOrders.Save();
                    int LastOrderID = objOrders.OrderID;

                    PIKCV.DAL.OrderLineItems objOL = new PIKCV.DAL.OrderLineItems();
                    objOL.AddNew();
                    objOL.CreditUsed = CreditsSpend;
                    objOL.JobID      = JobID;
                    objOL.OrderID    = LastOrderID;
                    objOL.Price      = 0;
                    objOL.UserID     = 0;
                    objOL.Save();

                    //ilanýn pik kredisi düþürüldü þimdi ilaný kaydedelim
                }
                obj.JobStatus           = JobStatus;
                obj.IsCompanyNameHidden = IsCompanyNameHidden;
                obj.ModifyDate          = DateTime.Now;
                obj.Save();

                Tran.CommitTransaction();
                return(obj.JobID);
            }
            catch (Exception)
            {
                Tran.RollbackTransaction();
                PIKCV.DAO.TransactionMgr.ThreadTransactionMgrReset();
                return(0);
            }
        }
Example #14
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() + ")";
        }
    }
Example #15
0
    private void UpdateJobStatus(PIKCV.COM.Enumerations.JobsTabs JobStatus)
    {
        switch (JobStatus)
        {
        case PIKCV.COM.Enumerations.JobsTabs.PublicJobs:
            if (CARETTA.COM.Util.IsNumeric(Request.QueryString["JobID"]))
            {
                int           JobID = Convert.ToInt32(Request.QueryString["JobID"]);
                PIKCV.BUS.Job obj   = new PIKCV.BUS.Job();
                DataTable     dt    = obj.GetJobInfo(JobID);
                if (dt.Rows.Count > 0)
                {
                    if (Convert.ToInt32(dt.Rows[0]["CompanyID"]) == this.smCompanyID)
                    {
                        int     Credits     = 0;
                        DataRow drOrderType = PIKCV.BUS.Orders.GetOrderTypesDetails(Convert.ToInt32(dt.Rows[0]["JobListType"]));
                        if (drOrderType != null)
                        {
                            PIKCV.COM.EnumDB.EmployeeTypes EmployeeType = (PIKCV.COM.EnumDB.EmployeeTypes)(Convert.ToInt32(dt.Rows[0]["UserTypeID"]));
                            switch (EmployeeType)
                            {
                            case PIKCV.COM.EnumDB.EmployeeTypes.Pikpool:
                                CompanyCreditControl(Convert.ToInt32(drOrderType["PikPoolCredit"]));
                                Credits = Convert.ToInt32(drOrderType["PikPoolCredit"]);
                                break;

                            case PIKCV.COM.EnumDB.EmployeeTypes.Goodpik:
                                CompanyCreditControl(Convert.ToInt32(drOrderType["GoodPikCredit"]));
                                Credits = Convert.ToInt32(drOrderType["PikPoolCredit"]);
                                break;
                            }
                        }
                        DateTime JobEndDate = Convert.ToDateTime(dt.Rows[0]["EndDate"]);
                        PIKCV.COM.EnumDB.JobStatus CurrentJobStatus = (PIKCV.COM.EnumDB.JobStatus)(Convert.ToInt32(dt.Rows[0]["JobStatus"]));
                        if (obj.ChangeJobStatus(this.smCompanyID, JobID, PIKCV.COM.EnumDB.JobStatus.Active, Credits, Convert.ToInt32(dt.Rows[0]["JobListType"]), JobEndDate, CurrentJobStatus) > 0)
                        {
                            if ((CurrentJobStatus == PIKCV.COM.EnumDB.JobStatus.Draft) || (JobEndDate < DateTime.Now))
                            {
                                Credits         = int.Parse(this.smPikCredi) - Credits;
                                this.smPikCredi = Credits.ToString();
                            }
                            dvScript.InnerHtml = "<script>alert('Ýlanýnýz  þu andan itibaren yayýndadýr, yayýndaki ilanlar bölümünden takip edebilirsiniz')</script>";
                        }
                        else
                        {
                            dvScript.InnerHtml = "<script>alert('Ýlanýnýz yayýna konulurken bir hata oluþtu')</script>";
                        }
                    }
                }
            }
            break;

        case PIKCV.COM.Enumerations.JobsTabs.JobArchive:
            if (CARETTA.COM.Util.IsNumeric(Request.QueryString["JobID"]))
            {
                int           JobID = Convert.ToInt32(Request.QueryString["JobID"]);
                PIKCV.BUS.Job obj   = new PIKCV.BUS.Job();
                DataTable     dt    = obj.GetJobInfo(JobID);
                if (dt.Rows.Count > 0)
                {
                    if (Convert.ToInt32(dt.Rows[0]["CompanyID"]) == this.smCompanyID)
                    {
                        obj.ChangeJobStatus(JobID, PIKCV.COM.EnumDB.JobStatus.Archive);
                    }
                }
            }
            break;

        case PIKCV.COM.Enumerations.JobsTabs.Draft:
            if (CARETTA.COM.Util.IsNumeric(Request.QueryString["JobID"]))
            {
                int           JobID = Convert.ToInt32(Request.QueryString["JobID"]);
                PIKCV.BUS.Job obj   = new PIKCV.BUS.Job();
                DataTable     dt    = obj.GetJobInfo(JobID);
                if (dt.Rows.Count > 0)
                {
                    if (Convert.ToInt32(dt.Rows[0]["CompanyID"]) == this.smCompanyID)
                    {
                        if (obj.ChangeJobStatus(JobID, PIKCV.COM.EnumDB.JobStatus.Deleted) > 0)
                        {
                            dvScript.InnerHtml = "<script>alert('Ýlanýnýz  silinmiþtir.')</script>";
                        }
                        else
                        {
                            dvScript.InnerHtml = "<script>alert('Ýlanýnýz  silinirken bir hata oluþtu!')</script>";
                        }
                    }
                }
            }
            break;
        }
    }