Ejemplo n.º 1
0
        //填充学生报告的基本信息
        public static Microsoft.Office.Interop.Word.Table BaseInfo(Microsoft.Office.Interop.Word.Table tb1, Entity.GaoKaoCard infoGaoKaoCard, Entity.Join_Student infoStudent)
        {
            string strProvinceName = "";

            Entity.Province infoProvince = DAL.Province.ProvinceEntityGet(infoStudent.ProvinceId);
            if (infoProvince != null)
            {
                strProvinceName = infoProvince.ProvinceName;
            }

            if (tb1.Rows.Count == 4)
            {
                //在指定单元格填值
                //第1行
                tb1.Cell(1, 2).Range.Text = infoStudent.StudentName;
                tb1.Cell(1, 4).Range.Text = (infoStudent.Sex == 1 ? "女" : "男");
                //第2行
                tb1.Cell(2, 2).Range.Text = infoStudent.SchoolName;
                tb1.Cell(2, 4).Range.Text = (infoStudent.WenLi == 1 ? "文史" : "理工");
                //第3行
                tb1.Cell(3, 2).Range.Text = strProvinceName;
                tb1.Cell(3, 4).Range.Text = infoStudent.GKYear.ToString();
                //第4行
                tb1.Cell(4, 2).Range.Text = infoGaoKaoCard.KaHao;
                tb1.Cell(4, 4).Range.Text = Basic.TypeConverter.StrToDateStr(DateTime.Now.ToString());
            }
            return(tb1);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 删除数据
        /// </summary>
        /// <param name="item">系统角色实体</param>
        /// <returns></returns>
        protected override int DoDelete(Entity.Province item)
        {
            int affectRows = base.DoDelete(item);

            if (affectRows > 0)
            {
                operateHistoryManager.Insert(item.Id, item, DataOperationType.Delete);
            }
            return(affectRows);
        }