Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string inputValue = "<InputValue UserID=\"2\" /><RequestParams draw=\"1\"  start=\"0\"  length=\"1\"  Sys_ViewID=\"20\" />";
            DataSet data = new CCoreService().GetContextDataSet("", inputValue);

            ExcelPlusExport(data.Tables[0], Context);
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string sData = Context.Request.Form["data"];
            if (String.IsNullOrEmpty(sData)) { return; }
            try
            {
                string inputValue =string.Format( "<InputValue UserID=\"2\" /><RequestParams ListProductId=\"{0}\"  start=\"0\"  length=\"1\"  Sys_ViewID=\"23\" />",sData);
                DataSet data = new CCoreService().GetContextDataSet("", inputValue);

                ExcelPlusExport(data.Tables[0], Context);
                Response.Cookies["iscompleteexport"].Value = "true";
                //Export(sData);

            }
            catch (Exception ex)
            {
                Response.Cookies["iscompleteexport"].Value = "false";
                Response.Write(ex.ToString());
                Response.End();
                // Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "Exception", string.Format("alert('{0}')", ex.ToString()), true);
            }
        }