Beispiel #1
0
 private List <HiringTracking> GetTarget()
 {
     if (cmbFinalStatus.SelectedIndex == 0)
     {
         if (Position != SystemManager.strTotal)
         {
             return(DataCenter.GetHiringTrackByPosition(Position));
         }
         else
         {
             return(DataCenter.GetHiringTrackingDataSet());
         }
     }
     else
     {
         HiringTracking.FinalStatusEnum FinalStatus = (HiringTracking.FinalStatusEnum)cmbFinalStatus.SelectedIndex - 1;
         if (Position != SystemManager.strTotal)
         {
             return(DataCenter.GetHiringTrackByPosition(Position, FinalStatus));
         }
         else
         {
             return(DataCenter.GetHiringTrackByFinalStatus(FinalStatus));
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// 根据职位获得Hiring
        /// </summary>
        /// <param name="Position"></param>
        /// <returns></returns>
        public static List <HiringTracking> GetHiringTrackByFinalStatus(HiringTracking.FinalStatusEnum status)
        {
            var pos = from p in HiringTrackingDataSet
                      where p.FinalStatus == status && !p.IsDel
                      select p;

            return(pos.ToList());
        }
        /// <summary>
        /// Refresh
        /// </summary>
        /// <param name="strTitle"></param>
        private void RefreshChanel(string strTitle)
        {
            //图形化初始化
            chartResult.Series.Clear();
            chartResult.Titles.Clear();
            var SeriesResult = new Series(strTitle);
            List <HiringTracking> Target;

            if (cmbPhase.SelectedIndex == 0)
            {
                if (Position == SystemManager.strTotal)
                {
                    Target = DataCenter.HiringTrackingDataSet;
                }
                else
                {
                    Target = DataCenter.GetHiringTrackByPosition(Position);
                }
            }
            else
            {
                HiringTracking.FinalStatusEnum FinalStatus = (HiringTracking.FinalStatusEnum)cmbPhase.SelectedIndex - 1;
                if (Position == SystemManager.strTotal)
                {
                    Target = DataCenter.GetHiringTrackByFinalStatus(FinalStatus);
                }
                else
                {
                    Target = DataCenter.GetHiringTrackByPosition(Position, FinalStatus);
                }
            }

            foreach (HiringTracking.ChannelEnum item in Enum.GetValues(typeof(HiringTracking.ChannelEnum)))
            {
                DataPoint ColPoint;
                ColPoint = new DataPoint(0, Target.Count((x) =>
                {
                    return(x.Channel == item);
                }));
                if (Target.Count() == 0)
                {
                    ColPoint.LegendText = item.ToString() + "(0%)";
                }
                else
                {
                    ColPoint.LegendText = item.ToString() + "(" + Math.Round((ColPoint.YValues[0] / (double)Target.Count()) * 100, 2) + "%" + ")";
                }
                ColPoint.LabelToolTip = item.ToString();
                ColPoint.ToolTip      = item.ToString();
                SeriesResult.Points.Add(ColPoint);
            }
            //图形化加载
            SeriesResult.ChartType = SeriesChartType.Pie;
            chartResult.Series.Add(SeriesResult);
            chartResult.Titles.Add(strTitle);
        }
        /// <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));
                }
            }
        }
Beispiel #5
0
        /// <summary>
        /// cmbFinalStatus Select Index Changed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmbFinalStatus_SelectedIndexChanged(object sender, EventArgs e)
        {
            var target = GetTarget();

            if (cmbFinalStatus.SelectedIndex != 0)
            {
                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;
                }
            }
            ViewControl.FillHiringTrackingListView(lstHiringTracking, target, condition);
        }
Beispiel #6
0
        /// <summary>
        /// 根据职位获得Hiring
        /// </summary>
        /// <param name="Position"></param>
        /// <returns></returns>
        public static List <HiringTracking> GetHiringTrackByPosition(string Position, HiringTracking.FinalStatusEnum FinalStatus)
        {
            var pos = from p in HiringTrackingDataSet
                      where p.Position == Position && p.FinalStatus == FinalStatus && !p.IsDel
                      select p;

            return(pos.ToList());
        }