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);
|
}
|
}
|
}
|
}
|