lu
2025-03-17 ca2aef7370cbfa419e3a0f0ea7467fa2c85f6c43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using DevExpress.XtraEditors;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
namespace Gs.DevApp.DevFrm.Sys
{
    public partial class EasyRptEdt : DevExpress.XtraEditors.XtraForm
    {
        public EasyRptEdt()
        {
            InitializeComponent();
            GetList();
        }
 
        private void GetList()
        {
            var _obj = new
            {
 
            };
            var strReturn = "";
            try
            {
                strReturn = UtilityHelper.HttpPost("", "Report/GetTemplateList",
                    JsonConvert.SerializeObject(_obj));
                ReturnModel<DataTable> dd = UtilityHelper.ReturnToList(strReturn);
                DataTable dt = dd.rtnData;
                foreach (DataRow row in dt.Rows)
                {
                    SimpleButton btn = new DevExpress.XtraEditors.SimpleButton();
                    btn.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.printarea_32x32;
                    btn.ImageOptions.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.TopCenter;
                    btn.Name = Guid.NewGuid().ToString();
                    btn.Size = new System.Drawing.Size(150, 150);
                    btn.TabIndex = 1;
                    btn.Text = row["reportName"].ToString()+"(" + row["reportType"].ToString() + ")";
                    btn.Margin = new System.Windows.Forms.Padding(20);
                    this.flowLayoutPanel1.Controls.Add(btn);
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}