}  //提供数据的方法

    public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p)
    {
        dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult();
        result.page  = p.page; //设定当前返回的页号
        result.total = 100;    //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际

        WarehouseInvenModel rm = new WarehouseInvenModel();



        string Type = "";

        if (p.extParam.ContainsKey("Type"))
        {
            Type = p.extParam["Type"];
        }
        string STime = "";

        if (p.extParam.ContainsKey("STime"))
        {
            STime = p.extParam["STime"];
        }
        string ETime = "";

        if (p.extParam.ContainsKey("ETime"))
        {
            ETime = p.extParam["ETime"];
        }
        int pageSize = p.rp;

        result.table = rm.finMedicineTransferInfor(Type, STime, ETime);

        return(result);
    }
    protected void ExportReportQuery_Click(object sender, EventArgs e)
    {
        string type             = Type.Value;
        string sTime            = STime.Value;
        string eTime            = ETime.Value;
        WarehouseInvenModel hm1 = new WarehouseInvenModel();

        // DataBaseLayer db = new DataBaseLayer();
        //    string str = "select * from lossiInfor where type ='" + type + "'";
        DataTable dt = hm1.finMedicineTransferInfor(type, sTime, eTime);

        System.DateTime currentTime = new System.DateTime();
        currentTime = System.DateTime.Now;
        string now = currentTime.ToString("yyyyMMdd");

        CreateExcel(dt, "application/ms-excel", "药方报单查询" + now);
    }