WebUI/Commission/comlist.aspx.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace hyst.Commission
{
    using DBUtility;
    using System;
    using System.Data;
    using System.Text;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class comlist : Page
    {
        private BaseClass bc = new BaseClass();
        public string begin = "";
        public double bili = 0.0;
        protected Button Button1;
        protected HtmlForm form1;
        protected HtmlHead Head1;
        public double jine = 0.0;
        public string name = "";
        public string num = "";
        public string over = "";
        protected HtmlInputText txtbegin;
        protected HtmlInputText txtname;
        protected HtmlInputText txtnum;
        protected HtmlInputText txtover;

        protected void Button1_Click(object sender, EventArgs e)
        {
            string str = "用户提成统计" + this.txtbegin.Value + "至" + this.txtover.Value;
            ExportToSpreadsheet(this.load(), str);
        }

        public static void ExportToSpreadsheet(DataTable table, string name)
        {
            Random r = new Random();
            string rf = "";
            for (int j = 0; j < 10; j++)
            {
                rf = r.Next(0x7fffffff).ToString();
            }
            HttpContext context = HttpContext.Current;
            context.Response.Clear();
            context.Response.AppendHeader("content-disposition", "attachment;filename=\"" + HttpUtility.UrlEncode(name, Encoding.UTF8) + ".xls\"");
            context.Response.ContentEncoding = Encoding.GetEncoding("GB2312");
            context.Response.ContentType = "text/csv";
            context.Response.BinaryWrite(Encoding.UTF8.GetPreamble());
            foreach (DataColumn column in table.Columns)
            {
                context.Response.Write(column.ColumnName + ",");
            }
            context.Response.Write(Environment.NewLine);
            foreach (DataRow row in table.Rows)
            {
                for (int i = 0; i < table.Columns.Count; i++)
                {
                    double test;
                    string name2 = table.Columns[i].DataType.ToString();
                    if (name2 == null)
后面还有 110 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。