示例#1
0
        public ActionResult ExportStatistics(LotteryRecordSearch condition)
        {
            string where = LotteryRecordSearch.StrWhere(condition);

            DataTable dt = ExportWay.ExcelDataTable("select  ActivityTitle,PrizeLevel,PrizeImgUrl,PrizeName,COUNT(*) num from LotteryRecord where 1=1 " + where + " group by    ActivityTitle,PrizeID,PrizeLevel,PrizeImgUrl,PrizeName ");

            string[] list = { "活动名称", "奖品等级", "奖品名称", "中奖数量" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "中奖纪录统计" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#2
0
        public ActionResult ExportExcel(jf_lpOrderSearch condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append("select OrderNo,OrderName,SumIntegral,OrderMan,OrderMobile,Remark from [jf_lpOrder] where 1=1 ");
            where.Append(jf_lpOrderSearch.StrWhere(condition));
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "订单单号", "订单名称", "总积分", "收货人", "电话", "备注" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "订单" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
        public ActionResult ExportExcel(SYSIntegralCodeSearch condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append("select WaterCode,IntegralCode from [SYSIntegralCode] where 1=1 ");
            where.Append(SYSIntegralCodeSearch.StrWhere(condition));
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "流水码", "防伪码" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "防伪码" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#4
0
        /// <summary>
        /// 导出
        /// </summary>
        /// <returns></returns>
        public FileResult ExportExcel(C_WxUserShowVM.Condition condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append("select UserName,NickName,TrueName,Mobile from [C_WxUser] where 1=1 ");
            where.Append(StrWhere(condition));
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "用户账号", "昵称", "姓名", "电话" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "客户" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#5
0
        public ActionResult ExportExcel(LotteryRecordSearch condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append("select [SerialNumber],[Dat],[IntegralCode],redMoney from [LotteryRecord] where 1=1 ");
            where.Append(LotteryRecordSearch.StrWhere(condition));
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "流水号", "中奖时间", "防伪码", "红包金额" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "中奖纪录" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#6
0
        public ActionResult ExportExcel(LotteryRecordSearch condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append("select [Dat],[IntegralCode],[ActivityTitle],[PrizeLevel],[PrizeName],Name,Phone,RecAddress,[States] from [LotteryRecord] where 1=1 ");
            where.Append(LotteryRecordSearch.StrWhere(condition));
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "中奖时间", "防伪码", "活动名称", "奖品等级", "奖品名称", "中奖人姓名", "电话", "地址", "发放状态" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "中奖纪录" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#7
0
        public FileResult ExportExcel(MProductSearch condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append("select ProductNumber,ProductName,Price,States,AddTime from [Product] where 1=1 ");
            where.Append(MProductSearch.StrWhere(condition));
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "产品编号", "产品名称", "零售价", "状态", "添加时间" };

            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "产品" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#8
0
        public ActionResult ExportExcel(SupplierSearch condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append("select Name,Address,Phone,Card,B_Name,AddTime from [Supplier] where 1=1 ");
            if (!string.IsNullOrWhiteSpace(condition.keyword))
            {
                where.Append(string.Format(" and (Name like '%{0}%' or Address like '%{0}%' or Phone like '%{0}%' or Card like '%{0}%')", condition.keyword));
            }
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "供应商", " 所属地区", "手机号", "身份证号", "添加人", "添加时间" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "供应商信息" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#9
0
        public ActionResult ExportExcel_NoRebate_tj(RebateSearch condition)
        {
            condition.State = "未发放";
            string where    = RebateSearch.StrWhere_tj(condition);
            PageJsonModel <C_UserRebate> page = GetPage(condition, where);

            string sql = @" select convert(varchar(20),年)+'年'+convert(varchar(20),月)+'月',Name,Phone,返利合计,[State] from " + page.strForm + " where 1=1 " + page.strWhere;

            DataTable dt = ExportWay.ExcelDataTable(sql);

            string[] list = { "月份", "返利人", "返利人手机号", "返利金额", "状态" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "未发放推荐返利" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#10
0
        public ActionResult ExportExcel(BigScaleSearch condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append("select BigCode,SmallCode,p.ProductName ProductName,s.DatCreate DatCreate,c.UserName UserName,c.Name Name,c.Province,c.City,c.Area from ScaleOutStoke s left join Product p on s.P_ID=p.ProductNumber left join C_User c on s.Consignee=c.UserName left join Supplier s1 on s1.ID=s.GID where 1=1 ");

            if (!string.IsNullOrWhiteSpace(condition.SmallCode))
            {
                where.Append(string.Format(" and (ProductName like '%{0}%' or c.UserName like '%{0}%' or c.Name like '%{0}%' or c.Province like '%{0}%' or SmallCode like '%{0}%' or BigCode like '%{0}%' )", condition.SmallCode));
            }
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "外箱条码", "产品条码", "产品名称", "出库时间", "客户编号", "客户名称", "省份", "城市", "乡镇" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "条码追踪信息" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#11
0
        public ActionResult ExportExcel(C_UserSearch condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append("select UserName,Name,wxNo,Phone,Province,City,Area,WxQRCode from [C_User] where 1=1 ");
            where.Append("and state='已审核'  and Chief=0  ");
            if (!string.IsNullOrWhiteSpace(condition.keyword))
            {
                where.Append(string.Format(" and (Name like '%{0}%' or Phone like '%{0}%' or Identifier like '%{0}%' or LevelName like '%{0}%')", condition.keyword));
            }
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "经销商编号", "经销商名称", "联系人", "联系方式", "省份", "市区", "城镇", "详细地址" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "直属客户信息" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#12
0
        public ActionResult ExportExcel(SelScale condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append("select SelScale.*,Scale.BigCode,Scale.SmallCode,Scale.SelectDate from SelScale left join Scale on SelScale.AntiCode=Scale.AntiCode where 1=1");
            //where.Append("and state='已审核'  and Chief=0  ");
            if (!string.IsNullOrWhiteSpace(condition.keyword))
            {
                where.Append(string.Format(" and (BigCode like '%{0}%' or SmallCode like '%{0}%' or SelScale.AntiCode like '%{0}%' or Address like '%{0}%')", condition.keyword));
            }
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "ID", "防伪码", "IP", "消费者查询省份", "消费者查询城市", "查询状态", "销售地区", "经销商编号", "外箱条码", "产品条码", "查询时间" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "防伪查询明细信息" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#13
0
        public ActionResult ExportExcel(C_UserSearch condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append(@"select p.ProductNumber ProductNumber,p.ProductName ProductName,count(*) count from Scale s 
left join Product p on s.ProductNo=p.ProductNumber where s.StateID in (6,7,9) group by ProductName,p.ProductImg,p.ProductNumber ");
            //where.Append("and state='已审核'  and Chief=0  ");
            if (!string.IsNullOrWhiteSpace(condition.keyword))
            {
                where.Append(string.Format(" and (ProductName like '%{0}%' )", condition.ProductName));
            }
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "产品编号", "产品名称", "数量" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "入库统计信息" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#14
0
        public ActionResult ExportExcel(C_UserSearch condition)
        {
            StringBuilder where = new StringBuilder();
            where.Append(@"select b.ProductNumber,b.ProductName,COUNT(SmallCode) as SmallCount,sum(b.kw) as [money]
                            from Scale as a left join Product as b on a.ProductNo=b.ProductNumber
                            where StateID in (6,9)");

            if (!string.IsNullOrWhiteSpace(condition.keyword))
            {
                where.Append(string.Format(" and (b.ProductName like '%{0}%' )", condition.keyword));
            }
            where.Append(@" group by b.ProductName,b.ProductNumber,b.ProductImg");

            DataTable dt = ExportWay.ExcelDataTable(where.ToString());

            string[] list = { "产品编号", "产品名称", "库存数量" };
            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "出库统计信息" + DateTime.Now.ToShortTimeString() + ".xls"));
        }
示例#15
0
        public ActionResult ExportExcel(OrderSearch condition)
        {
            StringBuilder where = new StringBuilder();
            string[] field = { "OrderNo", "OrderName", "SumPrice", "OrderMan", "OrderMobile", "Remark" };

            string[] list = { "订单编号", "订单名称", "订单金额", "收货人", "电话", "备注" };

            string url = "/OrderManage/Orders";

            exportHelper exhelper = exportHelper.getexport(field, list, url, CurrentUser.UserName);

            where.Append(string.Format("select {0} from [Order] where 1=1 ", string.Join(",", exhelper.field)));
            list = exhelper.list;
            where.Append(OrderSearch.StrWhere(condition));
            DataTable dt = ExportWay.ExcelDataTable(where.ToString());



            return(File(ExportWay.GetExcel(dt, list), "application/vnd.ms-excel", "订单" + DateTime.Now.ToShortTimeString() + ".xls"));
        }