Пример #1
0
 /// <summary>
 /// OK
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnOK_Click(object sender, EventArgs e)
 {
     basic.No            = (DataCenter.PositionBasicDataSet.Count + 1).ToString();
     basic.Position      = txtPosition.Text;
     basic.HiringManager = cmbHiringManager.Text;
     basic.ApprovedDate  = DataPickerApprovedDate.Value;
     basic.OpenDate      = DataPickerOpenDate.Value;
     basic.Target        = (int)NumTarget.Value;
     basic.isOpen        = true;
     basic.BandHBound    = (PositionBasicInfo.BandEnum)cmbHBound.SelectedIndex;
     basic.BandLBound    = (PositionBasicInfo.BandEnum)cmbLBound.SelectedIndex;
     basic.HiringType    = (PositionBasicInfo.HiringTypeEnum)cmbHiringType.SelectedIndex;
     if (IsCreate)
     {
         DataCenter.PositionBasicDataSet.Add(basic);
     }
     DataCenter.SaveBasicPosition();
     Close();
 }
Пример #2
0
        /// <summary>
        /// OK
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnOK_Click(object sender, EventArgs e)
        {
            PositionBasicInfo basic = new PositionBasicInfo();

            basic.No            = (DataCenter.PositionBasicDataSet.Count + 1).ToString();
            basic.Position      = txtPosition.Text;
            basic.HiringManager = cmbHiringManager.Text;
            basic.ApprovedDate  = DataPickerApprovedDate.Value;
            basic.OpenDate      = DataPickerOpenDate.Value;
            basic.Target        = (int)NumTarget.Value;
            basic.isOpen        = true;
            basic.BandHBound    = (PositionBasicInfo.BandEnum)cmbHBound.SelectedIndex;
            basic.BandLBound    = (PositionBasicInfo.BandEnum)cmbLBound.SelectedIndex;
            basic.HiringType    = (PositionBasicInfo.HiringTypeEnum)cmbHiringType.SelectedIndex;
            DataCenter.PositionBasicDataSet.Add(basic);
            XmlSerializer xml = new XmlSerializer(typeof(List <PositionBasicInfo>));

            xml.Serialize(new StreamWriter(SystemManager.PositionBasicInfoXmlFilename), DataCenter.PositionBasicDataSet);
            DataCenter.ReCompute();
            Close();
        }
        /// <summary>
        /// cmbFinalStatus Select Index Changed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmbFinalStatus_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbFinalStatus.SelectedIndex == 0)
            {
                if (Position != SystemManager.strTotal)
                {
                    ViewControl.FillHiringTrackingListView(lstHiringTracking, DataCenter.GetHiringTrackByPosition(Position));
                }
                else
                {
                    ViewControl.FillHiringTrackingListView(lstHiringTracking, DataCenter.GetHiringTrackingDataSet());
                }
            }
            else
            {
                HiringTracking.FinalStatusEnum FinalStatus = (HiringTracking.FinalStatusEnum)cmbFinalStatus.SelectedIndex - 1;
                ViewControl.ResetHiringTrackingField();
                switch (FinalStatus)
                {
                case HiringTracking.FinalStatusEnum.OpenOffer:
                case HiringTracking.FinalStatusEnum.ANOB:
                case HiringTracking.FinalStatusEnum.Onboard:
                    ViewControl.CurrentHiringTrackingFields = ViewStyleSheet.HiringTracking_OnboardSytle;
                    break;

                case HiringTracking.FinalStatusEnum.RejectOffer:
                    ViewControl.CurrentHiringTrackingFields = ViewStyleSheet.HiringTracking_RejectOfferSytle;
                    break;
                }
                if (Position != SystemManager.strTotal)
                {
                    ViewControl.FillHiringTrackingListView(lstHiringTracking, DataCenter.GetHiringTrackByPosition(Position, FinalStatus));
                }
                else
                {
                    ViewControl.FillHiringTrackingListView(lstHiringTracking, DataCenter.GetHiringTrackByFinalStatus(FinalStatus));
                }
            }
        }
Пример #4
0
 private void frmReclye_Load(object sender, EventArgs e)
 {
     ViewControl.FillHiringTrackingListView(lstHiringTracking, DataCenter.GetHiringTrackingDataSet(true));
 }
Пример #5
0
        /// <summary>
        /// Import Data From GOM
        /// </summary>
        /// <param name="workbook"></param>
        private void ImportData(dynamic workbook)
        {
            List <HiringTracking> rawData = new List <HiringTracking>();
            dynamic ActiveSheet           = workbook.Sheets(1);
            int     rowCount = 4;

            while (!string.IsNullOrEmpty(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.No).Text))
            {
                HiringTracking Rec = new HiringTracking();
                Rec.No       = ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.No).Text;
                Rec.Name     = ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.Name).Text;
                Rec.Position = ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.Position).Text;
                Rec.Position = Rec.Position.Trim();

                Rec.Channel    = Utility.GetEnum <HiringTracking.ChannelEnum>(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.Channel).Text, HiringTracking.ChannelEnum.Agency);
                Rec.Contact    = ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.PhoneNumber).Text;
                Rec.University = ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.University).Text;

                if (!string.IsNullOrEmpty(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.Language_EN).Text))
                {
                    Rec.Language = Rec.Language | HiringTracking.LanguageEnum.EN;
                }
                if (!string.IsNullOrEmpty(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.Language_CN).Text))
                {
                    Rec.Language = Rec.Language | HiringTracking.LanguageEnum.CN;
                }
                if (!string.IsNullOrEmpty(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.Language_JP).Text))
                {
                    Rec.Language = Rec.Language | HiringTracking.LanguageEnum.JP;
                }
                if (!string.IsNullOrEmpty(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.Language_KR).Text))
                {
                    Rec.Language = Rec.Language | HiringTracking.LanguageEnum.KR;
                }
                if (!string.IsNullOrEmpty(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.Language_Other).Text))
                {
                    Rec.Language = Rec.Language | HiringTracking.LanguageEnum.Other;
                }
                Rec.ITBackground     = !string.IsNullOrEmpty(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.ITBakcground).Text);
                Rec.MarketBackground = !string.IsNullOrEmpty(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.MarketBackground).Text);

                Rec.ScreenDate = Utility.GetDate(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.ScreenData));

                Rec.FirstInterviewDate   = Utility.GetDate(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.firstInterviewDate));
                Rec.FirstInterviewer     = ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.firstInterviewer).Text;
                Rec.FirstInterviewResult = Utility.GetEnum <HiringTracking.InterviewResultEnum>(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.firstInterviewresult).Text, HiringTracking.InterviewResultEnum.NotAvaliable);

                Rec.SecondInterviewDate   = Utility.GetDate(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.secondInterviewDate));
                Rec.SecondInterviewer     = ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.secondInterviewer).Text;
                Rec.SecondInterviewResult = Utility.GetEnum <HiringTracking.InterviewResultEnum>(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.secondInterviewresult).Text, HiringTracking.InterviewResultEnum.NotAvaliable);

                Rec.ThirdInterviewDate   = Utility.GetDate(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.thirdInterviewDate));
                Rec.ThirdInterviewer     = ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.thirdInterviewer).Text;
                Rec.ThirdInterviewResult = Utility.GetEnum <HiringTracking.InterviewResultEnum>(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.thirdInterviewresult).Text, HiringTracking.InterviewResultEnum.NotAvaliable);

                Rec.OfferOfferDate    = Utility.GetDate(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.offerofferdate));
                Rec.OnboardDate       = Utility.GetDate(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.onboarddate));
                Rec.RejectOfferReason = ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.rejectofferreason).Text;

                Rec.FinalStatus = Utility.GetEnum <HiringTracking.FinalStatusEnum>(ActiveSheet.Cells(rowCount, ViewStyleSheet.ColPos.finalstatus).Text, HiringTracking.FinalStatusEnum.UnderScreen);
                rawData.Add(Rec);
                rowCount++;
            }
            XmlSerializer xml = new XmlSerializer(typeof(List <HiringTracking>));

            xml.Serialize(new StreamWriter(SystemManager.HiringTrackingXmlFilename), rawData);
            DataCenter.HiringTrackingDataSet = rawData;
            DataCenter.ReCalulatePositionStatisti((x) => { return(true); });
        }
Пример #6
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     ViewControl.FillHiringTrackingListView(lstHiringTracking, DataCenter.GetHiringTrackByScreenDate(WeekStart.Value, WeekEnd.Value));
 }
Пример #7
0
 private void frmPipelineWeekInfo_Load(object sender, EventArgs e)
 {
     ViewControl.FillHiringTrackingListView(lstHiringTracking, DataCenter.GetHiringTrackByScreenDate(System.DateTime.Now, System.DateTime.Now));
 }
        /// <summary>
        /// Phase图
        /// </summary>
        private void InitPhaseChart()
        {
            if (DataCenter.HiringTrackingDataSet.Count == 0)
            {
                return;
            }
            var QuerySeries = new Series("Pileline")
            {
                ChartType  = SeriesChartType.Line,
                XValueType = ChartValueType.String,
                YValueType = ChartValueType.Int32
            };

            PhaseChart.Series.Clear();
            PhaseChart.Series.Add(QuerySeries);

            List <HiringTracking> Target;

            if (Position == SystemManager.strTotal)
            {
                Target = DataCenter.GetHiringTrackingDataSet();
            }
            else
            {
                Target = DataCenter.GetHiringTrackByPosition(Position);
            }

            var queryPoint = new DataPoint();

            queryPoint.SetValueXY("Pipeline", Target.Count());
            PhaseChart.Series[0].Points.Add(queryPoint);


            queryPoint = new DataPoint();
            queryPoint.SetValueXY("ScreenPass", Target.Count((x) =>
            {
                return(!string.IsNullOrEmpty(x.FirstInterviewer));
            }));
            PhaseChart.Series[0].Points.Add(queryPoint);

            queryPoint = new DataPoint();
            queryPoint.SetValueXY("1stPass", Target.Count((x) =>
            {
                return(HiringTracking.InterviewPassCheck(x.FirstInterviewResult));
            }));
            PhaseChart.Series[0].Points.Add(queryPoint);


            queryPoint = new DataPoint();
            queryPoint.SetValueXY("2ndPass", Target.Count((x) =>
            {
                return(HiringTracking.InterviewPassCheck(x.SecondInterviewResult));
            }));
            PhaseChart.Series[0].Points.Add(queryPoint);


            queryPoint = new DataPoint();
            queryPoint.SetValueXY("3rdPass", Target.Count((x) =>
            {
                return(HiringTracking.InterviewPassCheck(x.ThirdInterviewResult));
            }));
            PhaseChart.Series[0].Points.Add(queryPoint);

            queryPoint = new DataPoint();
            queryPoint.SetValueXY("OB", Target.Count((x) =>
            {
                return(x.FinalStatus == HiringTracking.FinalStatusEnum.Onboard);
            }));
            PhaseChart.Series[0].Points.Add(queryPoint);
        }
        /// <summary>
        /// Phase图
        /// </summary>
        private void InitHiringTrackingChart()
        {
            if (DataCenter.HiringTrackingDataSet.Count == 0)
            {
                return;
            }
            var QuerySeries = new Series("First Date")
            {
                ChartType  = SeriesChartType.Line,
                XValueType = ChartValueType.String,
                YValueType = ChartValueType.Int32
            };

            HiringTrackingchart.Series.Clear();
            HiringTrackingchart.Series.Add(QuerySeries);

            List <HiringTracking> Target;

            if (Position == SystemManager.strTotal)
            {
                return;
            }
            else
            {
                Target = DataCenter.GetHiringTrackByPosition(Position);
            }

            DateTime BaseDate = DataCenter.GetBasicPositionInfo(Position).OpenDate;

            var queryPoint = new DataPoint();

            queryPoint.SetValueXY("Screen", Target.Min <HiringTracking>((x) =>
            {
                if (x.ScreenDate == DateTime.MinValue)
                {
                    return(999);
                }
                else
                {
                    return((x.ScreenDate.Date - BaseDate.Date).Days);
                };
            }));
            HiringTrackingchart.Series[0].Points.Add(queryPoint);

            queryPoint = new DataPoint();
            queryPoint.SetValueXY("1st", Target.Min <HiringTracking>((x) =>
            {
                if (x.FirstInterviewDate == DateTime.MinValue)
                {
                    return(999);
                }
                else
                {
                    return((x.FirstInterviewDate.Date - BaseDate.Date).Days);
                };
            }));
            HiringTrackingchart.Series[0].Points.Add(queryPoint);

            queryPoint = new DataPoint();
            queryPoint.SetValueXY("2nd", Target.Min <HiringTracking>((x) =>
            {
                if (x.SecondInterviewDate == DateTime.MinValue)
                {
                    return(999);
                }
                else
                {
                    return((x.SecondInterviewDate.Date - BaseDate.Date).Days);
                };
            }));
            HiringTrackingchart.Series[0].Points.Add(queryPoint);

            queryPoint = new DataPoint();
            queryPoint.SetValueXY("3rd", Target.Min <HiringTracking>((x) =>
            {
                if (x.ThirdInterviewDate == DateTime.MinValue)
                {
                    return(999);
                }
                else
                {
                    return((x.ThirdInterviewDate.Date - BaseDate.Date).Days);
                };
            }));
            HiringTrackingchart.Series[0].Points.Add(queryPoint);

            queryPoint = new DataPoint();
            queryPoint.SetValueXY("ANOB", Target.Min <HiringTracking>((x) =>
            {
                if (x.OfferOfferDate == DateTime.MinValue)
                {
                    return(999);
                }
                else
                {
                    return((x.OfferOfferDate.Date - BaseDate.Date).Days);
                };
            }));
            HiringTrackingchart.Series[0].Points.Add(queryPoint);

            queryPoint = new DataPoint();
            queryPoint.SetValueXY("OB", Target.Min <HiringTracking>((x) =>
            {
                if (x.OnboardDate == DateTime.MinValue)
                {
                    return(999);
                }
                else
                {
                    return((x.OnboardDate.Date - BaseDate.Date).Days);
                };
            }));
            HiringTrackingchart.Series[0].Points.Add(queryPoint);
        }
Пример #10
0
 /// <summary>
 /// Init Data
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void initDataToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DataCenter.Init();
     MessageBox.Show("Complete");
     HiringtrackingStatisticInfo.RefreshData();
 }
Пример #11
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void backUpToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DataCenter.BackUp();
     MessageBox.Show("Complete");
 }
Пример #12
0
 private void WeekEnd_ValueChanged(object sender, EventArgs e)
 {
     ViewControl.FillHiringTrackingListView(lstHiringTracking, DataCenter.GetHiringTrackByScreenDate(WeekStart.Value, WeekEnd.Value), condition);
 }