SVN r1214

SVN-Revision: r1214
This commit is contained in:
cyf
2026-06-18 06:01:39 +00:00
parent 35107222be
commit 19ae29f016
2 changed files with 217 additions and 80 deletions
+28 -25
View File
@@ -28,6 +28,7 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.ssc_main = new DevExpress.XtraEditors.SplitContainerControl();
this.ssc_main_top = new DevExpress.XtraEditors.SplitContainerControl();
this.pl_left = new DevExpress.XtraEditors.PanelControl();
@@ -40,7 +41,7 @@
this.pl_treeview_detault_search = new DevExpress.XtraEditors.PanelControl();
this.panelControl4 = new DevExpress.XtraEditors.PanelControl();
this.textEdit1 = new DevExpress.XtraEditors.TextEdit();
this.barManager1 = new DevExpress.XtraBars.BarManager();
this.barManager1 = new DevExpress.XtraBars.BarManager(this.components);
this.barDockControl1 = new DevExpress.XtraBars.BarDockControl();
this.barDockControl2 = new DevExpress.XtraBars.BarDockControl();
this.barDockControl3 = new DevExpress.XtraBars.BarDockControl();
@@ -50,7 +51,7 @@
this.btnTreeSearch = new DevExpress.XtraEditors.SimpleButton();
this.pl_main_bottom = new DevExpress.XtraEditors.PanelControl();
this.dbpFP = new DevExpress.XtraEditors.DropDownButton();
this.pmFP = new DevExpress.XtraBars.PopupMenu();
this.pmFP = new DevExpress.XtraBars.PopupMenu(this.components);
this.btnRefresh = new DevExpress.XtraEditors.SimpleButton();
this.btnHiding = new DevExpress.XtraEditors.SimpleButton();
this.btnHelp = new DevExpress.XtraEditors.SimpleButton();
@@ -63,15 +64,15 @@
this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
this.btn_input = new DevExpress.XtraEditors.SimpleButton();
this.dpbImport = new DevExpress.XtraEditors.DropDownButton();
this.pmBillExp = new DevExpress.XtraBars.PopupMenu();
this.pmBillExp = new DevExpress.XtraBars.PopupMenu(this.components);
this.btnBillAdd = new DevExpress.XtraEditors.SimpleButton();
this.btnBillApply = new DevExpress.XtraEditors.SimpleButton();
this.dpCopyBill = new DevExpress.XtraEditors.DropDownButton();
this.pmBill = new DevExpress.XtraBars.PopupMenu();
this.pmBill = new DevExpress.XtraBars.PopupMenu(this.components);
this.btnPrint = new DevExpress.XtraEditors.DropDownButton();
this.pMprint = new DevExpress.XtraBars.PopupMenu();
this.pMprint = new DevExpress.XtraBars.PopupMenu(this.components);
this.dpbTools = new DevExpress.XtraEditors.DropDownButton();
this.pMenu = new DevExpress.XtraBars.PopupMenu();
this.pMenu = new DevExpress.XtraBars.PopupMenu(this.components);
this.btnDelete = new DevExpress.XtraEditors.SimpleButton();
this.btnBillSave = new DevExpress.XtraEditors.SimpleButton();
this.pl_main_top = new DevExpress.XtraEditors.PanelControl();
@@ -265,10 +266,10 @@
this.pl_treeview_detault_search.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_treeview_detault_search.Controls.Add(this.panelControl4);
this.pl_treeview_detault_search.Controls.Add(this.panelControl3);
this.pl_treeview_detault_search.Location = new System.Drawing.Point(26, 69);
this.pl_treeview_detault_search.Location = new System.Drawing.Point(39, 104);
this.pl_treeview_detault_search.Margin = new System.Windows.Forms.Padding(5, 3, 5, 3);
this.pl_treeview_detault_search.Name = "pl_treeview_detault_search";
this.pl_treeview_detault_search.Size = new System.Drawing.Size(180, 19);
this.pl_treeview_detault_search.Size = new System.Drawing.Size(270, 29);
this.pl_treeview_detault_search.TabIndex = 24;
this.pl_treeview_detault_search.Visible = false;
//
@@ -281,7 +282,7 @@
this.panelControl4.Location = new System.Drawing.Point(0, 0);
this.panelControl4.Name = "panelControl4";
this.panelControl4.Padding = new System.Windows.Forms.Padding(2, 4, 2, 0);
this.panelControl4.Size = new System.Drawing.Size(84, 19);
this.panelControl4.Size = new System.Drawing.Size(206, 29);
this.panelControl4.TabIndex = 25;
//
// textEdit1
@@ -292,8 +293,9 @@
this.textEdit1.Name = "textEdit1";
this.textEdit1.Properties.Appearance.Font = new System.Drawing.Font("宋体", 10F);
this.textEdit1.Properties.Appearance.Options.UseFont = true;
this.textEdit1.Size = new System.Drawing.Size(0, 20);
this.textEdit1.Size = new System.Drawing.Size(91, 20);
this.textEdit1.TabIndex = 5;
this.textEdit1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnTreeConditionKeyDown);
//
// barManager1
//
@@ -335,6 +337,7 @@
// lceCombobox
//
this.lceCombobox.BackColor = System.Drawing.SystemColors.Control;
this.lceCombobox.BackgroundColor = System.Drawing.Color.Empty;
this.lceCombobox.Dock = System.Windows.Forms.DockStyle.Left;
this.lceCombobox.EditText = "";
this.lceCombobox.Font = new System.Drawing.Font("宋体", 9F);
@@ -347,7 +350,7 @@
this.lceCombobox.NullText = "";
this.lceCombobox.ReadOnly = false;
this.lceCombobox.Required = false;
this.lceCombobox.Size = new System.Drawing.Size(111, 15);
this.lceCombobox.Size = new System.Drawing.Size(111, 25);
this.lceCombobox.TabIndex = 4;
//
// panelControl3
@@ -355,10 +358,10 @@
this.panelControl3.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.panelControl3.Controls.Add(this.btnTreeSearch);
this.panelControl3.Dock = System.Windows.Forms.DockStyle.Right;
this.panelControl3.Location = new System.Drawing.Point(84, 0);
this.panelControl3.Location = new System.Drawing.Point(206, 0);
this.panelControl3.Name = "panelControl3";
this.panelControl3.Padding = new System.Windows.Forms.Padding(3);
this.panelControl3.Size = new System.Drawing.Size(96, 19);
this.panelControl3.Size = new System.Drawing.Size(64, 29);
this.panelControl3.TabIndex = 25;
//
// btnTreeSearch
@@ -367,9 +370,9 @@
this.btnTreeSearch.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnTreeSearch.Appearance.Options.UseFont = true;
this.btnTreeSearch.Dock = System.Windows.Forms.DockStyle.Right;
this.btnTreeSearch.Location = new System.Drawing.Point(33, 3);
this.btnTreeSearch.Location = new System.Drawing.Point(1, 3);
this.btnTreeSearch.Name = "btnTreeSearch";
this.btnTreeSearch.Size = new System.Drawing.Size(60, 13);
this.btnTreeSearch.Size = new System.Drawing.Size(60, 23);
this.btnTreeSearch.TabIndex = 21;
this.btnTreeSearch.Text = "查询";
this.btnTreeSearch.Click += new System.EventHandler(this.OnTreeSearchClick);
@@ -699,7 +702,7 @@
this.pl_main_top_center.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_main_top_center.Location = new System.Drawing.Point(162, 2);
this.pl_main_top_center.Name = "pl_main_top_center";
this.pl_main_top_center.Size = new System.Drawing.Size(864, 34);
this.pl_main_top_center.Size = new System.Drawing.Size(857, 34);
this.pl_main_top_center.TabIndex = 3;
//
// lbTitle
@@ -710,7 +713,7 @@
this.lbTitle.ForeColor = System.Drawing.Color.Blue;
this.lbTitle.Location = new System.Drawing.Point(0, 0);
this.lbTitle.Name = "lbTitle";
this.lbTitle.Size = new System.Drawing.Size(864, 34);
this.lbTitle.Size = new System.Drawing.Size(857, 34);
this.lbTitle.TabIndex = 1;
this.lbTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lbTitle.Paint += new System.Windows.Forms.PaintEventHandler(this.OnLabelTitlePaint);
@@ -723,9 +726,9 @@
this.pl_main_top_right.Controls.Add(this.lblOrderNo);
this.pl_main_top_right.Controls.Add(this.labelControl1);
this.pl_main_top_right.Dock = System.Windows.Forms.DockStyle.Right;
this.pl_main_top_right.Location = new System.Drawing.Point(1026, 2);
this.pl_main_top_right.Location = new System.Drawing.Point(1019, 2);
this.pl_main_top_right.Name = "pl_main_top_right";
this.pl_main_top_right.Size = new System.Drawing.Size(183, 34);
this.pl_main_top_right.Size = new System.Drawing.Size(190, 34);
this.pl_main_top_right.TabIndex = 2;
//
// lblOrderNo
@@ -914,11 +917,6 @@
private DevExpress.XtraEditors.PanelControl pl_main_center_detail;
private DevExpress.XtraEditors.XtraScrollableControl pl_main_center_master;
private DevExpress.XtraEditors.PanelControl pl_treeview_detault_search;
private DevExpress.XtraEditors.PanelControl panelControl4;
private DevExpress.XtraEditors.TextEdit textEdit1;
private Control.LabelComboxEdit lceCombobox;
private DevExpress.XtraEditors.PanelControl panelControl3;
private DevExpress.XtraEditors.SimpleButton btnTreeSearch;
public DevExpress.XtraEditors.PanelControl pl_main_bottom;
private DevExpress.XtraEditors.SimpleButton btnHelp;
private DevExpress.XtraEditors.PanelControl pl_templete;
@@ -937,4 +935,9 @@
private DevExpress.XtraEditors.SimpleButton btnDelete;
private DevExpress.XtraEditors.SimpleButton btnBillSave;
private DevExpress.XtraEditors.PanelControl pl_main_top;
private DevExpress
private DevExpress.XtraEditors.PanelControl pl_main_top_center;
private System.Windows.Forms.Label lbTitle;
private DevExpress.XtraEditors.PanelControl pl_main_top_right;
private DevExpress.XtraEditors.LabelControl lblOrderNo;
private DevExpress.XtraEditors.LabelControl labelControl1;
priva
+189 -55
View File
@@ -89,10 +89,7 @@ namespace Lskj.PubBill
/// </summary>
private DataTable _detailColumns;
private bool IsCopying = false;
/// <summary>
/// 单据来源明细拖拽删除当前行数据集合
/// </summary>
private List<DataRow> RemoveRowitem = new List<DataRow>();
protected DataRow BillRowItem;
/// <summary>
@@ -244,6 +241,16 @@ namespace Lskj.PubBill
/// 当前操作的ImageEdit
/// </summary>
private LabelImageEdit _imageEdit;
/// <summary>
/// 当前来源明细中变色行
/// </summary>
private HashSet<int> ColorHandles = new HashSet<int>();
/// <summary>
/// 保存验证条件表
/// </summary>
public DataTable SaveCondTab = new DataTable();
public BillModule()
{
@@ -493,6 +500,11 @@ namespace Lskj.PubBill
{
return BaseModuleImpl.GetBaseGridRightMenus("BILLDETAIL_" + dynamicModel.ModuleCode);//设置表格右键菜单
}));
Task<DataTable> saveCondTabTask = cachesDic.AddTask(this, "SaveCondTab", new Task<DataTable>(() =>
{
return BaseModuleImpl.GetClientCond(dynamicModel.ModuleCode);
}));
#endregion
if (billModel.PanelWidth > 0)
{
@@ -1206,6 +1218,11 @@ namespace Lskj.PubBill
this.gcMain.GridView.ShowingEditor += new CancelEventHandler(OnGridViewShowingEditor);
}
if (!dataCaches.GetValue(this, "SaveCondTab", out this.SaveCondTab))
{
this.SaveCondTab = BaseModuleImpl.GetClientCond(this.SysModel.ModuleCode);
}
if (this.BillModel.DefaultAddEmptyRow)
{
@@ -1251,6 +1268,18 @@ namespace Lskj.PubBill
{
string unioright = sender + "";
DataRow rightrowitem = this.gcMain.gridViewRightMenu.MenuTable.Rows.Cast<DataRow>().FirstOrDefault(x => (x["orderid"] + "").Equals(unioright));
GridRightMenuModel model = new GridRightMenuModel(rightrowitem);
DataRow rowItem = this.gcMain.GetViewFocusedDataRow();
if (!string.IsNullOrWhiteSpace(model.MenuCond))
{
//判断条件
DataRow row = this.gcMain.GridView.GetFocusedDataRow();
string cond = ReplaceHelper.ReplaceRowParam(row, model.MenuCond);
bool condResult = ValidateCond(cond, null);
if (!condResult) return;
}
CommonMenu menu = new CommonMenu(this.SysModel, ControlObj, this.gcMain);
menu.Apply(rightrowitem);
}
@@ -1783,6 +1812,9 @@ namespace Lskj.PubBill
DataTable masterTable = htTable["master"] as DataTable;
DataTable detailTable = htTable["detail"] as DataTable;
/*
* 1. ,()+,.
* 2. ,.
@@ -1825,6 +1857,25 @@ namespace Lskj.PubBill
controls = BaseModuleImpl.GetCustomQueryFields(model.FormKey);
}
if (false)
{
string menuCode = string.Empty;
DataRow modelRow = MainImpl.GetSystemdllTab(menuCode);//获取模块信息
ModuleModel sysModel = new ModuleModel(modelRow);
//设置主表sql
//model.SourceSql = sysModel.MenuSql;
//获取主表列
DataTable dtSourceColumns = BaseModuleImpl.GetBaseGridColumns(sysModel.ModeCode);
//获取明细消息
//明细sql
//model.DetailSql
}
XtraTabPage tabPage = new XtraTabPage();
tabPage.Text = model.UserName;
@@ -2173,6 +2224,7 @@ namespace Lskj.PubBill
{
GridDragGrid dragDetailGrid = new GridDragGrid(gridDetail.GridView, this.gcMain.GridView);
dragDetailGrid.OnDragComplete += new GridFragGridCompleteEventHandler(OnDragDetailGridCompleted);
if (this.BillModel.IsSelectSourceColor) gridDetail.GridView.CustomDrawCell += GridView_CustomDrawCell;
}
}
@@ -2274,8 +2326,6 @@ namespace Lskj.PubBill
/// <summary>
/// 单据来源拖拽到主表明细中(树表格拖拽到树表格)
/// </summary>
@@ -3537,7 +3587,6 @@ namespace Lskj.PubBill
if (model.GridControlObj != null) this.RefreshSource(model);
if (BillModel.drgFinishHide == "1")
{
RemoveRowitem.Clear();
if (model.ModelObj.SourceType == 1)
{
string sqlValue = ReplaceHelper.ReplaceUserInfo(ReplaceHelper.ReplaceWhereCond(model.ModelObj.DetailSql));
@@ -3723,14 +3772,7 @@ namespace Lskj.PubBill
{
WaitForm.ShowForm();
unionModel.GridDetailControlObj.GridControl.DataSource = BillImpl.GetDataTableResult(sqlValue);
if (BillModel.drgFinishHide == "1")
{
//DataTable finishHideTb = unionModel.GridDetailControlObj.GridControl.DataSourceTable();
//foreach (DataRow drItem in RemoveRowitem)
//{
// if (finishHideTb.Select().Contains(drItem)) finishHideTb.Rows.Remove(drItem);
//}
}
this.ClearHighlightRows(unionModel.GridDetailControlObj.GridView);
}
catch (Exception ex)
{
@@ -3774,6 +3816,8 @@ namespace Lskj.PubBill
}
else
{
//有复选框的页签在刷新前清空选中行,否则合计在刷新数据源后不会自带改变
if (unionModel.GridDetailControlObj.GridView.OptionsSelection.MultiSelectMode == GridMultiSelectMode.CheckBoxRowSelect && unionModel.GridDetailControlObj.GridView.OptionsSelection.MultiSelect == true)
{
@@ -3783,6 +3827,7 @@ namespace Lskj.PubBill
unionModel.GridDetailControlObj.GridControl.DataSource = rowItem == null
? new DataTable() : BillImpl.GetDataTableResult(DetailSql);
this.ClearHighlightRows(unionModel.GridDetailControlObj.GridView);
}
@@ -4629,15 +4674,11 @@ namespace Lskj.PubBill
if (unionModel.GridDetailControlObj.GridControl.DataSourceTable().Rows.IndexOf(rowItem) >= 0)
{
unionModel.GridDetailControlObj.GridControl.DataSourceTable().Rows.Remove(rowItem);
//RemoveRowitem.Add(rowItem);
}
if (unionModel.GridDetailDetailControlObj != null && unionModel.GridDetailDetailControlObj.GridControl.DataSourceTable().Rows.IndexOf(rowItem) >= 0)
{
unionModel.GridDetailDetailControlObj.GridControl.DataSourceTable().Rows.Remove(rowItem);
//RemoveRowitem.Add(rowItem);
}
}
if (BillModel.DrgDetailAndSource && unionModel.GridControlObj != null)//移动明细主表数据到主表
{
@@ -5413,7 +5454,7 @@ namespace Lskj.PubBill
MessageUtil.Show("表格中数据内容重复,保存失败!");
return saveResult;
}
//if(!VerificationCond()) return saveResult;
WaitForm.ShowForm(ResourceKeys.DataSaving);
string billNo = this.lblOrderNo.Text.Trim();
@@ -5786,6 +5827,8 @@ namespace Lskj.PubBill
WaitForm.ShowForm();
try
{
string sqlValue = ReplaceHelper.ReplaceUserInfo(ReplaceHelper.ReplaceWhereCond(unionModel.ModelObj.DetailSql));
sqlValue = sqlValue.Replace("#", "");
sqlValue = this.ControlObj.ReplaceControlValue(sqlValue);
@@ -5799,16 +5842,9 @@ namespace Lskj.PubBill
else
{
unionModel.GridDetailControlObj.GridControl.DataSource = BillImpl.GetDataTableResult(sqlValue);
this.ClearHighlightRows(unionModel.GridDetailControlObj.GridView);
}
if (BillModel.drgFinishHide == "1" && unionModel.GridDetailControlObj != null)
{
DataTable finishHideTb = unionModel.GridDetailControlObj.GridControl.DataSourceTable();
//foreach (DataRow drItem in RemoveRowitem)
//{
// if (finishHideTb.Select().Contains(drItem)) finishHideTb.Rows.Remove(drItem);
//}
}
}
catch (Exception ex)
{
@@ -6643,21 +6679,24 @@ namespace Lskj.PubBill
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private void OnGridDetailDoubleClick(object sender, EventArgs e)
{
DataTable table = this.gcMain.GridControl.DataSource as DataTable;
XtraTabPage tabPage = this.xtc_left_container.SelectedTabPage;
BillSourceUnionModel unionModel = tabPage.Tag as BillSourceUnionModel;
DataRow rowItem = unionModel.GridDetailControlObj.GridView.GetFocusedDataRow();
if (rowItem == null) return;
if (BillModel.IsSelectSourceColor && unionModel.GridDetailControlObj != null)
{
//选中行改变颜色
ColorHandles.Add(unionModel.GridDetailControlObj.GridView.GetFocusedDataSourceRowIndex());
unionModel.GridDetailControlObj.GridView.Invalidate();
}
//添加行到主表明细中
if (this.BillModel.DetailTreeTable)
{
if (this.CanAddTreeDetailRow())
{
DataTable table = this.gcMain.GridControl.DataSource as DataTable;
XtraTabPage tabPage = this.xtc_left_container.SelectedTabPage;
BillSourceUnionModel unionModel = tabPage.Tag as BillSourceUnionModel;
DataRow rowItem = unionModel.GridDetailControlObj.GridView.GetFocusedDataRow();
string Pid = "0";//默认给空值,添加到最后(不添加到选中行的下层)
//DataRow dataRow = (this.gcMain as TreeGridControlEx).GetViewFocusedDataRow();
//if (dataRow != null)
//{
// Pid = dataRow[(this.gcMain as TreeGridControlEx).TreeListObj.KeyFieldName] + "";
//}
if (rowItem == null) return;
//添加行
this.AddMultiRowTreeGridControl(new DataRow[] { rowItem }, Pid);
if (!string.IsNullOrWhiteSpace(unionModel.AddDataSql) && !string.IsNullOrWhiteSpace(unionModel.AddDataCondition) && this.ValidateCond(unionModel.AddDataCondition, rowItem))
@@ -6666,28 +6705,19 @@ namespace Lskj.PubBill
DataTable dataTable = MainImpl.GetDataTableResult(addSql);
DragAddTable(dataTable, (int.Parse((this.gcMain as TreeGridControlEx).GetNewNodesId()) - 1) + "");////上方的新增行的id默认是最大的
}
}
}
else
{
if (this.CanAddDetailRow())
{
DataTable table = this.gcMain.GridControl.DataSource as DataTable;
XtraTabPage tabPage = this.xtc_left_container.SelectedTabPage;
BillSourceUnionModel unionModel = tabPage.Tag as BillSourceUnionModel;
DataRow rowItem = unionModel.GridDetailControlObj.GridView.GetFocusedDataRow();
if (rowItem != null)
if (!this.BillModel.IsFastDragAddDetail)
{
if (!this.BillModel.IsFastDragAddDetail)
{
this.AddMultiRowToGridView(new DataRow[] { rowItem });
}
else
{
this.AddRowsToGridViewFast(new DataRow[] { rowItem });
}
this.AddMultiRowToGridView(new DataRow[] { rowItem });
}
else
{
this.AddRowsToGridViewFast(new DataRow[] { rowItem });
}
}
}
@@ -7007,6 +7037,16 @@ namespace Lskj.PubBill
DataRow row = e.SourceGridViewObj.GetDataRow(handle);
dragRows.Add(row);
}
if (BillModel.IsSelectSourceColor)
{
//选中行改变颜色
foreach (int h in rowHandles)
{
ColorHandles.Add(h);
}
e.SourceGridViewObj.Invalidate();
}
if (dragRows != null && dragRows.Count > 0)
{
if (!this.BillModel.IsFastDragAddDetail)
@@ -7167,7 +7207,7 @@ namespace Lskj.PubBill
this.OnBillSaveClick(null, null);
}
if (this.BillModel.SourceMainPushPullHide && DragRows.Count > 0)
if (this.BillModel.SourceMainPushPullHide && DragRows.Count > 0)
{
foreach (DataRow item in DragRows)
{
@@ -8504,6 +8544,18 @@ namespace Lskj.PubBill
XtraTabPage tabPage = this.xtc_left_container.SelectedTabPage;
BillSourceUnionModel unionModel = tabPage.Tag as BillSourceUnionModel;
int oldRowHandle = this.gcMain.GridView.FocusedRowHandle;
//改变选中行颜色
int[] rowHandles = e.GridViewObj.GetSelectedRows();
if (BillModel.IsSelectSourceColor)
{
//选中行改变颜色
foreach (int h in rowHandles)
{
ColorHandles.Add(h);
}
e.GridViewObj.Invalidate();
}
//拖拽行
foreach (DataRow rowItem in e.GridViewSelectRows)
{
//添加拖拽行
@@ -9871,4 +9923,86 @@ namespace Lskj.PubBill
/// </summary>
/// <param name="dataRow"></param>
public bool SetPrintButton(DataRow rowItem)
{
try
{
bool result = false;
//判断打印按钮条件
if (!string.IsNullOrWhiteSpace(this.BillModel.PrintingConditions))
{
if (rowItem == null) return result;
string cond = ReplaceHelper.ReplaceRowParam(rowItem, this.BillModel.PrintingConditions);
if (cond.StartsWith("@") || cond.StartsWith("!"))
{
result = "1".Equals(BaseImpl.GetDefaultValue(cond));
}
else
{
result = ReplaceHelper.ReplaceRowParamCond(rowItem, cond);
}
return result;
}
else
{
return true;
}
}
catch (Exception ex)
{
return false;
}
}
/// <summary>
/// 改变选中行的颜色
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void GridView_CustomDrawCell(object sender, RowCellCustomDrawEventArgs e)
{
XtraTabPage tabPage = this.xtc_left_container.SelectedTabPage;
BillSourceUnionModel unionModel = tabPage.Tag as BillSourceUnionModel;
if (unionModel != null && unionModel.GridDetailControlObj.GridView != null)
{
int sourceIdx = unionModel.GridDetailControlObj.GridView.GetDataSourceRowIndex(e.RowHandle);
if (ColorHandles.Contains(sourceIdx))
e.Appearance.BackColor = ColorTranslator.FromHtml(this.BillModel.SelectSourceColor);
}
}
/// <summary>
/// 清空记录的选中行
/// </summary>
/// <param name="gridview"></param>
public void ClearHighlightRows(GridView gridview)
{
if (this.BillModel.IsSelectSourceColor && ColorHandles.Count > 0)
{
ColorHandles.Clear();
gridview.Invalidate();
}
}
public bool VerificationCond()
{
DataTable detailTable = this.gcMain.GridControl.DataSourceTable().TrimDeleteRows();
foreach (DataRow CondItem in SaveCondTab.Rows)
{
string condition = CondItem["condition"] + "";
if (!string.IsNullOrWhiteSpace(condition))
{
if (detailTable != null && detailTable.Rows.Count > 0)
{
condition = this.ControlObj.ReplaceParentControlValue(condition);
foreach (DataRow item in detailTable.Rows)
{
if (!ValidateCond(condition, item))
{
MessageUtil.Show(string.IsNullOrWhiteSpace(CondItem["hintmsg"] + "") ? "条件验证失败" : CondItem["hintmsg"] + "");
r