Ejemplo n.º 1
0
        private void ExportItemInfoItem(XWPFTable tb)
        {
            int     i          = 0;
            decimal totalScore = 0;

            ExportItemByItemType(tb, ref i, ref totalScore);
            _ItemCount = _ItemCount > 0 ? _ItemCount : 1;
            SetParagraph(tb.GetRow(_ItemCount + 3 - 1).GetCell(2 - 1), decimal.Round(totalScore, 2).ToString());
            SetParagraph(tb.GetRow(_ItemCount + 4 - 1).GetCell(2 - 1), ExportAnnualAssessForm.GetAns(totalScore));
        }
Ejemplo n.º 2
0
        private void ExportALLInfo(DataTable dt)
        {
            int i;

            for (i = 0; i < _AssessActivityList.Count; i++)
            {
                DataRow dr = dt.NewRow();
                dt.Rows.Add(dr);
                ExportNormalInfo(i, dr);

                int submintInfoManageIndex = -1;
                int submintInfoHrIndex     = -1;
                int submintInfoSelfIndex   = -1;
                int submintInfoCeoIndex    = -1;
                GetIndex(_AssessActivityList[i], ref submintInfoSelfIndex, ref submintInfoManageIndex,
                         ref submintInfoHrIndex, ref submintInfoCeoIndex);
                if (submintInfoCeoIndex != -1)
                {
                    //建议工资
                    dr[6] = _AssessActivityList[i].ItsAssessActivityPaper.SubmitInfoes[submintInfoCeoIndex].SalaryChange.
                            ToString();
                }

                if (submintInfoSelfIndex != -1)
                {
                    //个人评分
                    dr[7] =
                        CalculateScore(
                            _AssessActivityList[i].ItsAssessActivityPaper.SubmitInfoes[submintInfoSelfIndex].
                            ItsAssessActivityItems);
                }
                if (submintInfoManageIndex != -1)
                {
                    //主管评分
                    dr[8] =
                        CalculateScore(
                            _AssessActivityList[i].ItsAssessActivityPaper.SubmitInfoes[submintInfoManageIndex].
                            ItsAssessActivityItems);
                    dr[_TotalScoreLocation + 3] =
                        _AssessActivityList[i].ItsAssessActivityPaper.SubmitInfoes[submintInfoManageIndex].Comment;
                    //主管总评
                }
                if (submintInfoHrIndex != -1)
                {
                    //目前工资
                    dr[5] =
                        _AssessActivityList[i].ItsAssessActivityPaper.SubmitInfoes[submintInfoHrIndex].SalaryNow.
                        ToString();
                    //导出人事项
                    for (int t = 0; t < _HrmisQuestion.Count; t++)
                    {
                        foreach (
                            AssessActivityItem item in
                            _AssessActivityList[i].ItsAssessActivityPaper.SubmitInfoes[submintInfoHrIndex].
                            ItsAssessActivityItems)
                        {
                            if (item.Question == _HrmisQuestion[t])
                            {
                                dr[12 + t - 1] = item.Grade * item.Weight;
                                break;
                            }
                        }
                    }
                }
                decimal totlescore = _AssessActivityList[i].ItsAssessActivityPaper.Score;
                dr[_TotalScoreLocation - 1] = totlescore;                                //年度总评分
                dr[_TotalScoreLocation]     = ExportAnnualAssessForm.GetAns(totlescore); //综合评价
                //360
                if (submintInfoSelfIndex != -1)
                {
                    //导出360项
                    for (int t = 0; t < _360Question.Count; t++)
                    {
                        foreach (
                            AssessActivityItem item in
                            _AssessActivityList[i].ItsAssessActivityPaper.SubmitInfoes[submintInfoSelfIndex].
                            ItsAssessActivityItems)
                        {
                            if (item.Question == _360Question[t])
                            {
                                dr[_TotalScoreLocation + 5 + t - 1] = item.AssessTemplateItemType ==
                                                                      AssessTemplateItemType.Open
                                                                                      ? item.Note
                                                                                      : item.Grade.ToString();
                                break;
                            }
                        }
                    }
                }
            }
            ////设置边框和列宽
            //Range range = excel.get_Range(excel.Cells[1, 1], excel.Cells[i + 1, _TotalScoreLocation + 4 + _360Question.Count]);
            //range.Cells.Borders.LineStyle = 1;
            //range.EntireColumn.AutoFit();
        }