450 lines
20 KiB
C#
450 lines
20 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Configuration;
|
|
using System.Collections;
|
|
using System.Web;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Web.UI.WebControls.WebParts;
|
|
using System.Web.UI.HtmlControls;
|
|
using GThinking.N_MODEL.Page;
|
|
using GThinking.N_CONTROL;
|
|
using GThinking.N_MISPRO.Utility;
|
|
using GThinking.N_MISPRO.Data;
|
|
using System.Text;
|
|
using GThinking.N_WORKFLOW;
|
|
|
|
namespace GThinking.N_XLXSBJ
|
|
{
|
|
public partial class CX_RBJLCCZList : SingleGridBase
|
|
{
|
|
|
|
CX_RBJLCCZ entity = new CX_RBJLCCZ();
|
|
CX_RBJLCCZ_M qryEntity = new CX_RBJLCCZ_M();
|
|
|
|
static private string sFJLM = "";
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
this.UMID = 100860070;
|
|
this.UMName = "日报价流程处置查询";
|
|
this.CurMaster = Master;
|
|
this.ModuleGV = ContentGrid;
|
|
this.CurEntity = entity;
|
|
this.CurQueryEntity = qryEntity;
|
|
this.sQueryURLTarget = "CX_RBJLCCZQuery.aspx";
|
|
this.PageHeight = 600;
|
|
this.PageWidth = 750;
|
|
|
|
|
|
Master.EnableNewBtn = false;
|
|
Master.EnableEditBtn = false;
|
|
Master.EnableCopyBtn = false;
|
|
Master.EnableDeleteBtn = false;
|
|
Master.EnableViewBtn = false;
|
|
|
|
if (!IsPostBack)
|
|
{
|
|
//查询条件赋初值
|
|
DateTime dtNow = DateTime.Now;
|
|
string dateNow = dtNow.ToShortDateString().Trim();
|
|
string dateFirst = dateNow.Split('-')[0] + "-" + dateNow.Split('-')[1] + "-01";
|
|
CurQueryEntity.FieldByName("BJRQS").Value = dateFirst;
|
|
CurQueryEntity.FieldByName("BJRQZ").Value = dateNow;
|
|
|
|
string dfWFID = GetDefaultWFID();
|
|
if (!dfWFID.Equals(""))
|
|
{
|
|
CurQueryEntity.FieldByName("WFID").Value = dfWFID;
|
|
}
|
|
|
|
}
|
|
|
|
base.InitPage();
|
|
|
|
InitGridView();
|
|
this.ModuleGV.OnClientDblClick = "return false;";
|
|
|
|
if (!IsPostBack)
|
|
{
|
|
if (IsDefaultExecute)
|
|
Master_OnStandardQuery(null, null);
|
|
}
|
|
|
|
}
|
|
|
|
#region 模板事件继承
|
|
|
|
protected override void Master_OnStandardQuery(object sender, EventArgs e)
|
|
{
|
|
base.InitEntityByCondition();
|
|
entity.EntityTable.QuerySelSql = GetSQL();
|
|
InitGridView();
|
|
base.Master_OnStandardQuery(sender, e);
|
|
entity.GridDataBind(ContentGrid, tSession);
|
|
}
|
|
|
|
protected override void moduleGV_PageIndexChanging(object sender, GridViewPageEventArgs e)
|
|
{
|
|
base.InitEntityByCondition();
|
|
entity.EntityTable.QuerySelSql = GetSQL();
|
|
ContentGrid.SelectedIndex = -1;
|
|
InitGridView();
|
|
base.moduleGV_PageIndexChanging(sender, e);
|
|
}
|
|
|
|
protected override void moduleGV_RowDataBound(object sender, GridViewRowEventArgs e)
|
|
{
|
|
|
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
base.moduleGV_RowDataBound(sender, e);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 自定义函数
|
|
|
|
|
|
private string GetDefaultWFID()
|
|
{
|
|
string rWFID = "";
|
|
TWorkflow awf = new TWorkflow(tSession, Cache);
|
|
ArrayList WFIDList = new ArrayList();
|
|
ArrayList WFNAMEList = new ArrayList();
|
|
awf.GetWFListALL("XLXSBJ_BJD", ref WFIDList, ref WFNAMEList);
|
|
if (WFIDList.Count == 1)
|
|
{
|
|
rWFID = WFIDList[0].ToString().Trim();
|
|
}
|
|
return rWFID;
|
|
}
|
|
private string GetSQL()
|
|
{
|
|
InitGridView();
|
|
string sCondition = "";
|
|
sCondition += CMISproDataBase.GetTimeConditionSQL("XLXSBJD_BJRQ",
|
|
CurQueryEntity.FieldByName("BJRQS").Value.ToString().Trim(),
|
|
CurQueryEntity.FieldByName("BJRQZ").Value.ToString().Trim(),
|
|
DateTimeType.dtDate, DateTimeType.dtDate);
|
|
if (!CurQueryEntity.FieldByName("WFID").Value.Trim().Equals(""))
|
|
{
|
|
sCondition += " and XLXSBJD_WFID = '" + CurQueryEntity.FieldByName("WFID").Value.Trim() + "'";
|
|
}
|
|
if (!CurQueryEntity.FieldByName("SQR").Value.Trim().Equals(""))
|
|
{
|
|
sCondition += " and XLXSBJD_SQRGH = '" + CurQueryEntity.FieldByName("SQR").Value.Trim() + "'";
|
|
}
|
|
if (!CurQueryEntity.FieldByName("BJFLID").Value.Trim().Equals(""))
|
|
{
|
|
sCondition += " and " + CMISproDataBase.GetWhereEqual("XLXSBJD_BJFLID", CurQueryEntity.FieldByName("BJFLID").Value.Trim());
|
|
}
|
|
|
|
StringBuilder sSQL = new StringBuilder();
|
|
sSQL.AppendLine( "select ");
|
|
sSQL.AppendLine( " isnull(ZDS,0) as ZDS,isnull(ZMXS,0) as ZMXS, ");
|
|
sSQL.AppendLine( " isnull(JSDS,0) as JSDS,isnull(JSMXS,0) as JSMXS, ");
|
|
sSQL.AppendLine( " isnull(FJDS,0) as FJDS,isnull(FJMXS,0) as FJMXS, ");
|
|
foreach (string sWFID in sFJLM.Split(','))
|
|
{
|
|
string sDSLM = "DS_" + sWFID;
|
|
string sMXSLM = "MXS_" + sWFID;
|
|
sSQL.AppendLine(" isnull(" + sDSLM + ",0) as " + sDSLM + ",isnull(" + sMXSLM + ",0) as " + sMXSLM + ", ");
|
|
}
|
|
sSQL.AppendLine( " SQR ");
|
|
sSQL.AppendLine( " from ");
|
|
//总单数
|
|
sSQL.AppendLine(" (select COUNT(1) as ZDS,rtrim(XLXSBJD_SQRGH) || '|' || XLXSBJD_SQR as SQR,isnull(XLXSBJD_SQRGH,' ') as XLXSBJD_SQRGH ");
|
|
sSQL.AppendLine( " from XLXSBJD where 1=1 " + sCondition);
|
|
sSQL.AppendLine( " group by XLXSBJD_SQRGH,XLXSBJD_SQR) ZD ");
|
|
//总明细数
|
|
sSQL.AppendLine( " left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as ZMXS,isnull(XLXSBJD_SQRGH,' ') as XLXSBJD_SQRGH ");
|
|
sSQL.AppendLine( " from XLXSBJDMX ");
|
|
sSQL.AppendLine( " left join XLXSBJD on XLXSBJD_BJDID = XLXSBJDMX_BJDID ");
|
|
sSQL.AppendLine( " where 1=1 " + sCondition);
|
|
sSQL.AppendLine( " group by XLXSBJD_SQRGH) ZMX ");
|
|
sSQL.AppendLine( " on ZMX.XLXSBJD_SQRGH = ZD.XLXSBJD_SQRGH ");
|
|
//结束单数
|
|
sSQL.AppendLine( " left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as JSDS,isnull(XLXSBJD_SQRGH,' ') as XLXSBJD_SQRGH ");
|
|
sSQL.AppendLine( " from XLXSBJD where XLXSBJD_WPID='ZZZZ' " + sCondition);
|
|
sSQL.AppendLine( " group by XLXSBJD_SQRGH) JSD ");
|
|
sSQL.AppendLine(" on JSD.XLXSBJD_SQRGH = ZD.XLXSBJD_SQRGH ");
|
|
//结束明细
|
|
sSQL.AppendLine( " left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as JSMXS,isnull(XLXSBJD_SQRGH,' ') as XLXSBJD_SQRGH ");
|
|
sSQL.AppendLine( " from XLXSBJDMX ");
|
|
sSQL.AppendLine( " left join XLXSBJD on XLXSBJD_BJDID = XLXSBJDMX_BJDID ");
|
|
sSQL.AppendLine( " where XLXSBJD_WPID='ZZZZ' " + sCondition);
|
|
sSQL.AppendLine( " group by XLXSBJD_SQRGH) JSMX ");
|
|
sSQL.AppendLine(" on JSMX.XLXSBJD_SQRGH = ZD.XLXSBJD_SQRGH ");
|
|
//否决单数
|
|
sSQL.AppendLine( " left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as FJDS,isnull(XLXSBJD_SQRGH,' ') as XLXSBJD_SQRGH ");
|
|
sSQL.AppendLine( " from XLXSBJD where XLXSBJD_WPID='ZZZY' " + sCondition);
|
|
sSQL.AppendLine( " group by XLXSBJD_SQRGH) FJD ");
|
|
sSQL.AppendLine(" on FJD.XLXSBJD_SQRGH = ZD.XLXSBJD_SQRGH ");
|
|
//否决明细
|
|
sSQL.AppendLine( " left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as FJMXS,isnull(XLXSBJD_SQRGH,' ') as XLXSBJD_SQRGH ");
|
|
sSQL.AppendLine( " from XLXSBJDMX ");
|
|
sSQL.AppendLine( " left join XLXSBJD on XLXSBJD_BJDID = XLXSBJDMX_BJDID ");
|
|
sSQL.AppendLine( " where XLXSBJD_WPID='ZZZY' " + sCondition);
|
|
sSQL.AppendLine( " group by XLXSBJD_SQRGH) FJMX ");
|
|
sSQL.AppendLine(" on FJMX.XLXSBJD_SQRGH = ZD.XLXSBJD_SQRGH ");
|
|
foreach (string sWFID in sFJLM.Split(','))
|
|
{
|
|
string sDSLM = "DS_" + sWFID;
|
|
string sMXSLM = "MXS_" + sWFID;
|
|
|
|
//单数
|
|
sSQL.AppendLine( " left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as " + sDSLM + ",isnull(XLXSBJD_SQRGH,' ') as XLXSBJD_SQRGH ");
|
|
sSQL.AppendLine( " from XLXSBJD where XLXSBJD_WPID='" + sWFID + "' " + sCondition);
|
|
sSQL.AppendLine( " group by XLXSBJD_SQRGH) D" + sWFID);
|
|
sSQL.AppendLine( " on D" + sWFID + ".XLXSBJD_SQRGH = ZD.XLXSBJD_SQRGH ");
|
|
//明细数
|
|
sSQL.AppendLine( " left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as " + sMXSLM + ",isnull(XLXSBJD_SQRGH,' ') as XLXSBJD_SQRGH ");
|
|
sSQL.AppendLine( " from XLXSBJDMX ");
|
|
sSQL.AppendLine( " left join XLXSBJD on XLXSBJD_BJDID = XLXSBJDMX_BJDID ");
|
|
sSQL.AppendLine( " where XLXSBJD_WPID='" + sWFID + "' " + sCondition);
|
|
sSQL.AppendLine( " group by XLXSBJD_SQRGH) MX" + sWFID);
|
|
sSQL.AppendLine( " on MX" + sWFID + ".XLXSBJD_SQRGH = ZD.XLXSBJD_SQRGH ");
|
|
}
|
|
|
|
sSQL.AppendLine(" union all ");
|
|
sSQL.AppendLine("select ");
|
|
sSQL.AppendLine(" isnull(ZDS,0) as ZDS,isnull(ZMXS,0) as ZMXS, ");
|
|
sSQL.AppendLine(" isnull(JSDS,0) as JSDS,isnull(JSMXS,0) as JSMXS, ");
|
|
sSQL.AppendLine(" isnull(FJDS,0) as FJDS,isnull(FJMXS,0) as FJMXS, ");
|
|
foreach (string sWFID in sFJLM.Split(','))
|
|
{
|
|
string sDSLM = "DS_" + sWFID;
|
|
string sMXSLM = "MXS_" + sWFID;
|
|
sSQL.AppendLine(" isnull(" + sDSLM + ",0) as " + sDSLM + ",isnull(" + sMXSLM + ",0) as " + sMXSLM + ", ");
|
|
}
|
|
sSQL.AppendLine(" SQR ");
|
|
sSQL.AppendLine(" from ");
|
|
//总单数
|
|
sSQL.AppendLine(" (select COUNT(1) as ZDS,'合计' as SQR");
|
|
sSQL.AppendLine(" from XLXSBJD where 1=1 " + sCondition);
|
|
sSQL.AppendLine(" ) ZD ");
|
|
//总明细数
|
|
sSQL.AppendLine(" left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as ZMXS ");
|
|
sSQL.AppendLine(" from XLXSBJDMX ");
|
|
sSQL.AppendLine(" left join XLXSBJD on XLXSBJD_BJDID = XLXSBJDMX_BJDID ");
|
|
sSQL.AppendLine(" where 1=1 " + sCondition);
|
|
sSQL.AppendLine(" ) ZMX ");
|
|
sSQL.AppendLine(" on 1=1 ");
|
|
//结束单数
|
|
sSQL.AppendLine(" left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as JSDS ");
|
|
sSQL.AppendLine(" from XLXSBJD where XLXSBJD_WPID='ZZZZ' " + sCondition);
|
|
sSQL.AppendLine(" ) JSD ");
|
|
sSQL.AppendLine(" on 1=1 ");
|
|
//结束明细
|
|
sSQL.AppendLine(" left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as JSMXS ");
|
|
sSQL.AppendLine(" from XLXSBJDMX ");
|
|
sSQL.AppendLine(" left join XLXSBJD on XLXSBJD_BJDID = XLXSBJDMX_BJDID ");
|
|
sSQL.AppendLine(" where XLXSBJD_WPID='ZZZZ' " + sCondition);
|
|
sSQL.AppendLine(" ) JSMX ");
|
|
sSQL.AppendLine(" on 1=1 ");
|
|
//否决单数
|
|
sSQL.AppendLine(" left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as FJDS ");
|
|
sSQL.AppendLine(" from XLXSBJD where XLXSBJD_WPID='ZZZY' " + sCondition);
|
|
sSQL.AppendLine(" ) FJD ");
|
|
sSQL.AppendLine(" on 1=1 ");
|
|
//否决明细
|
|
sSQL.AppendLine(" left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as FJMXS ");
|
|
sSQL.AppendLine(" from XLXSBJDMX ");
|
|
sSQL.AppendLine(" left join XLXSBJD on XLXSBJD_BJDID = XLXSBJDMX_BJDID ");
|
|
sSQL.AppendLine(" where XLXSBJD_WPID='ZZZY' " + sCondition);
|
|
sSQL.AppendLine(" ) FJMX ");
|
|
sSQL.AppendLine(" on 1=1 ");
|
|
foreach (string sWFID in sFJLM.Split(','))
|
|
{
|
|
string sDSLM = "DS_" + sWFID;
|
|
string sMXSLM = "MXS_" + sWFID;
|
|
|
|
//单数
|
|
sSQL.AppendLine(" left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as " + sDSLM + " ");
|
|
sSQL.AppendLine(" from XLXSBJD where XLXSBJD_WPID='" + sWFID + "' " + sCondition);
|
|
sSQL.AppendLine(" ) D" + sWFID);
|
|
sSQL.AppendLine(" on 1=1 ");
|
|
//明细数
|
|
sSQL.AppendLine(" left join ");
|
|
sSQL.AppendLine(" (select COUNT(1) as " + sMXSLM + " ");
|
|
sSQL.AppendLine(" from XLXSBJDMX ");
|
|
sSQL.AppendLine(" left join XLXSBJD on XLXSBJD_BJDID = XLXSBJDMX_BJDID ");
|
|
sSQL.AppendLine(" where XLXSBJD_WPID='" + sWFID + "' " + sCondition);
|
|
sSQL.AppendLine(" ) MX" + sWFID);
|
|
sSQL.AppendLine(" on 1=1 ");
|
|
}
|
|
return sSQL.ToString().Trim();
|
|
}
|
|
|
|
private void InitGridView()
|
|
{
|
|
ContentGrid.Columns.Clear();
|
|
ContentGrid.ColumnsEx.Clear();
|
|
|
|
sFJLM = "";
|
|
string sSQL = " ";
|
|
sSQL+= CMISproDataBase.GetTimeConditionSQL("XLXSBJD_BJRQ",
|
|
CurQueryEntity.FieldByName("BJRQS").Value.ToString().Trim(),
|
|
CurQueryEntity.FieldByName("BJRQZ").Value.ToString().Trim(),
|
|
DateTimeType.dtDate, DateTimeType.dtDate);
|
|
if (!CurQueryEntity.FieldByName("WFID").Value.Trim().Equals(""))
|
|
{
|
|
sSQL+= " and XLXSBJD_WFID = '" + CurQueryEntity.FieldByName("WFID").Value.Trim() + "'";
|
|
}
|
|
if (!CurQueryEntity.FieldByName("SQR").Value.Trim().Equals(""))
|
|
{
|
|
sSQL+= " and XLXSBJD_SQRGH = '" + CurQueryEntity.FieldByName("SQR").Value.Trim() + "'";
|
|
}
|
|
if (!CurQueryEntity.FieldByName("BJFLID").Value.Trim().Equals(""))
|
|
{
|
|
sSQL += " and " + CMISproDataBase.GetWhereEqual("XLXSBJD_BJFLID", CurQueryEntity.FieldByName("BJFLID").Value.Trim());
|
|
}
|
|
|
|
AddColumn("SQR", "申请人", 100);
|
|
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
|
TSQL SQL = new TSQL(dberp);
|
|
SQL.Clear();
|
|
SQL.Add(" select distinct WFPWPID,WFPNAME ");
|
|
SQL.Add(" from WFPROC ");
|
|
SQL.Add(" where WFPWFID =:pWFPWFID ");
|
|
SQL.Add(" and isnull(WFPWPID,' ') <> ' ' and isnull(WFPWPID,' ') <> 'ZZZZ' and isnull(WFPWPID,' ') <> '0000' ");
|
|
SQL.Add(" order by WFPWPID");
|
|
SQL.ParamByName("pWFPWFID").Value = CurQueryEntity.FieldByName("WFID").Value.Trim();
|
|
DataSet ds = dberp.OpenDataSet(SQL);
|
|
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
|
{
|
|
AddColumn("DS_" + ds.Tables[0].Rows[i]["WFPWPID"].ToString().Trim(), ds.Tables[0].Rows[i]["WFPNAME"].ToString().Trim() + "单数", 0, 100, false, false);
|
|
AddColumn("MXS_" + ds.Tables[0].Rows[i]["WFPWPID"].ToString().Trim(), ds.Tables[0].Rows[i]["WFPNAME"].ToString().Trim() + "明细数", 0, 100, false, false);
|
|
sFJLM += ds.Tables[0].Rows[i]["WFPWPID"].ToString().Trim() + ",";
|
|
sFJLM.TrimEnd(',');
|
|
}
|
|
|
|
AddColumn("JSDS", "结束单数", 0, 100, false, false);
|
|
AddColumn("JSMXS", "结束明细数", 0, 100, false, false);
|
|
AddColumn("FJDS", "否决单数", 0, 100, false, false);
|
|
AddColumn("FJMXS", "否决明细数", 0, 100, false, false);
|
|
AddColumn("ZDS", "总单数", 0, 100, false, false);
|
|
AddColumn("ZMXS", "总明细数", 0, 100, false, false);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region GridView增加列
|
|
|
|
/// <summary>
|
|
/// 设置etCheckBox列的属性
|
|
/// </summary>
|
|
/// <param name="sDataField"></param>
|
|
/// <param name="HeadText"></param>
|
|
/// <param name="Width"></param>
|
|
/// <param name="CheckBox"></param>
|
|
private void AddColumn(string sDataField, string HeadText, int Width, TEditType CheckBox)
|
|
{
|
|
BoundField Column = new BoundField();
|
|
Column.DataField = sDataField;
|
|
Column.HeaderText = HeadText;
|
|
Column.ItemStyle.Width = (Unit)Width;
|
|
Column.HeaderStyle.Width = (Unit)Width;
|
|
ContentGrid.Columns.Add(Column);
|
|
|
|
gtGridView_Column ColumnEx = new gtGridView_Column();
|
|
ColumnEx.DataField = sDataField;
|
|
ColumnEx.EditType = TEditType.etCheckBox;
|
|
ContentGrid.ColumnsEx.Insert(0, ColumnEx);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 设置etString列的属性
|
|
/// </summary>
|
|
/// <param name="sDataField"></param>
|
|
/// <param name="HeadText"></param>
|
|
/// <param name="Width"></param>
|
|
private void AddColumn(string sDataField, string HeadText, int Width)
|
|
{
|
|
BoundField Column = new BoundField();
|
|
Column.DataField = sDataField;
|
|
Column.HeaderText = HeadText;
|
|
Column.ItemStyle.Width = (Unit)Width;
|
|
Column.HeaderStyle.Width = (Unit)Width;
|
|
ContentGrid.Columns.Add(Column);
|
|
|
|
gtGridView_Column ColumnEx = new gtGridView_Column();
|
|
ColumnEx.DataField = sDataField;
|
|
ColumnEx.EditType = TEditType.etString;
|
|
ColumnEx.ShowHint = true;
|
|
ContentGrid.ColumnsEx.Insert(0, ColumnEx);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 设置etNumber列的属
|
|
/// </summary>
|
|
/// <param name="sDataField"></param>
|
|
/// <param name="HeadText"></param>
|
|
/// <param name="NumberDecimalPlace"></param>
|
|
/// <param name="Width"></param>
|
|
private void AddColumn(string sDataField, string HeadText, int NumberDecimalPlace, int Width, bool ShowSubBit, bool ShowZero)
|
|
{
|
|
BoundField Column = new BoundField();
|
|
Column.DataField = sDataField;
|
|
Column.HeaderText = HeadText;
|
|
Column.ItemStyle.Width = (Unit)Width;
|
|
Column.HeaderStyle.Width = (Unit)Width;
|
|
Column.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
|
|
ContentGrid.Columns.Add(Column);
|
|
|
|
gtGridView_Column ColumnEx = new gtGridView_Column();
|
|
ColumnEx.DataField = sDataField;
|
|
ColumnEx.EditType = TEditType.etNumber;
|
|
ColumnEx.NumberDecimalPlace = NumberDecimalPlace;
|
|
ColumnEx.ShowSubBit = ShowSubBit;
|
|
ColumnEx.ShowZero = ShowZero;
|
|
ContentGrid.ColumnsEx.Insert(0, ColumnEx);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 设置etDateTime列的属性
|
|
/// </summary>
|
|
/// <param name="sDataField"></param>
|
|
/// <param name="HeadText"></param>
|
|
/// <param name="DateTimeKind"></param>
|
|
/// <param name="Width"></param>
|
|
private void AddColumn(string sDataField, string HeadText, TDateTimeEditKinds DateTimeKind)
|
|
{
|
|
BoundField Column = new BoundField();
|
|
Column.DataField = sDataField;
|
|
Column.HeaderText = HeadText;
|
|
Column.ItemStyle.Width = (Unit)(DateTimeKind == TDateTimeEditKinds.dtDateTime ? 125 : 72);
|
|
Column.HeaderStyle.Width = (Unit)(DateTimeKind == TDateTimeEditKinds.dtDateTime ? 125 : 72);
|
|
ContentGrid.Columns.Add(Column);
|
|
|
|
gtGridView_Column ColumnEx = new gtGridView_Column();
|
|
ColumnEx.DataField = sDataField;
|
|
ColumnEx.EditType = TEditType.etDateTime;
|
|
ColumnEx.DateTimeEditKins = DateTimeKind;
|
|
ContentGrid.ColumnsEx.Insert(0, ColumnEx);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|