Example #1
0
 //导出操作
 public void WriteExcel(string path)
 {
     //文件流
     using (FileStream fsWrite = new FileStream(path, FileMode.Create, FileAccess.Write))
     {
         //创建工作表
         XSSFWorkbook work = new XSSFWorkbook();
         //创建页
         ISheet sheet = work.CreateSheet();
         //读取会员信息
         List <MemberInfo> list = memDal.GetAllMemberInfoByDelFlag(0);
         //创建行
         for (int i = 0; i < list.Count; i++)
         {
             //创建行
             IRow row = sheet.CreateRow(i);
             //只要名字和电话
             row.CreateCell(0, CellType.String).SetCellValue(list[i].MemName);
             row.CreateCell(1, CellType.String).SetCellValue(list[i].MemMobilePhone);
         }
         work.Write(fsWrite);//写入文件
     }
 }
Example #2
0
 /// <summary>
 /// 根据删除标志查询结果
 /// </summary>
 /// <param name="delFlag">0: 未删除;1: 删除</param>
 /// <returns></returns>
 public List <MemberInfo> GetAllMemberInfoByDelFlag(int delFlag)
 {
     return(dal.GetAllMemberInfoByDelFlag(delFlag));
 }
Example #3
0
 /// <summary>
 /// 根据删除标识查询所有的会员信息
 /// </summary>
 /// <param name="memmberId">删除标识0---没删除,1---删除</param>
 /// <returns>会员信息集合(对象)</returns>
 public List <MemberInfo> GetAllMemberInfoByDelFlag(int memmberId)
 {
     return(dal.GetAllMemberInfoByDelFlag(memmberId));
 }