SVN r758
SVN-Revision: r758
This commit is contained in:
@@ -213,7 +213,7 @@ namespace Lskj.Control
|
||||
{
|
||||
get { return this.TipsPanel; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 搜索界面
|
||||
/// </summary>
|
||||
@@ -855,9 +855,25 @@ namespace Lskj.Control
|
||||
Dictionary<object, Hashtable> dataCaches = Model != null ? Model.DataCaches : null;
|
||||
//显示筛选行
|
||||
if (this.SysModel.LoadFilter) this.gcMain.GridView.OptionsView.ShowAutoFilterRow = true;
|
||||
// 创建多表头,默认标准表格
|
||||
if (this.Model.GridEnumObj == GridEnum.BandedGridView || SysModel.AutoMultiHeader == 1)
|
||||
if (SysModel.AutoMultiHeader == 1 && SysModel.TreeAutoMultiHeader == 1)
|
||||
{
|
||||
// 创建 多表头,树表格
|
||||
this.panelControl1.Controls.Clear();
|
||||
this.gcMain = new TreeBandedGridControlEx() { Expansion = SysModel.TreeTableExpand };
|
||||
this.gcMain.Model = this.Model;
|
||||
this.gcMain.Dock = DockStyle.Fill;
|
||||
if (this._gridColumns.Rows.Count == 0&&!string.IsNullOrWhiteSpace(SysModel.TreeKeyFieldName) && !string.IsNullOrWhiteSpace(SysModel.TreeParentFieldName))
|
||||
{
|
||||
//节点编号
|
||||
(this.gcMain as TreeBandedGridControlEx).TreeListObj.KeyFieldName = SysModel.TreeKeyFieldName;
|
||||
//父节点编号
|
||||
(this.gcMain as TreeBandedGridControlEx).TreeListObj.ParentFieldName = SysModel.TreeParentFieldName;
|
||||
}
|
||||
this.panelControl1.Controls.Add(this.gcMain);
|
||||
}
|
||||
else if (this.Model.GridEnumObj == GridEnum.BandedGridView || SysModel.AutoMultiHeader == 1)
|
||||
{
|
||||
// 创建多表头,默认标准表格
|
||||
PanelControl panel = null;
|
||||
if (this.gcMain.gridControl.Tag is PanelControl) panel = this.gcMain.gridControl.Tag as PanelControl;
|
||||
|
||||
@@ -870,14 +886,23 @@ namespace Lskj.Control
|
||||
if (this.SysModel.LoadFilter) (this.gcMain as BandedGridControlEx).GridView.OptionsView.ShowAutoFilterRow = true;
|
||||
(this.gcMain as BandedGridControlEx).gridControl.Tag = panel;
|
||||
}
|
||||
if (this.Model.GridEnumObj == GridEnum.TreeListGridView || SysModel.TreeAutoMultiHeader == 1)
|
||||
else if (this.Model.GridEnumObj == GridEnum.TreeListGridView || SysModel.TreeAutoMultiHeader == 1)
|
||||
{
|
||||
// 创建树表格
|
||||
this.panelControl1.Controls.Clear();
|
||||
this.gcMain = new TreeGridControlEx() { Expansion = SysModel.TreeTableExpand };
|
||||
this.gcMain.Model = this.Model;
|
||||
this.gcMain.Dock = DockStyle.Fill;
|
||||
if (this._gridColumns.Rows.Count == 0 && !string.IsNullOrWhiteSpace(SysModel.TreeKeyFieldName) && !string.IsNullOrWhiteSpace(SysModel.TreeParentFieldName))
|
||||
{
|
||||
//节点编号
|
||||
(this.gcMain as TreeGridControlEx).TreeListObj.KeyFieldName = SysModel.TreeKeyFieldName;
|
||||
//父节点编号
|
||||
(this.gcMain as TreeGridControlEx).TreeListObj.ParentFieldName = SysModel.TreeParentFieldName;
|
||||
}
|
||||
this.panelControl1.Controls.Add(this.gcMain);
|
||||
}
|
||||
|
||||
//如果配置了聚合模式则构建多表头覆盖当前表格
|
||||
if (SysModel.IsCustomGroup == 1)
|
||||
{
|
||||
@@ -3315,10 +3340,10 @@ namespace Lskj.Control
|
||||
private void GetPrintOtherParam(string ModeCond)
|
||||
{
|
||||
//取得打印完成后的参数
|
||||
|
||||
if (!string.IsNullOrEmpty(ModeCond) )
|
||||
|
||||
if (!string.IsNullOrEmpty(ModeCond))
|
||||
{
|
||||
|
||||
|
||||
DataRow item = AttachImpl.GetSystemModule(ModeCond);
|
||||
string tableName = item["TableName"] + "";
|
||||
string modetype = item["modType"] + "";
|
||||
@@ -3974,7 +3999,7 @@ namespace Lskj.Control
|
||||
string printType = printRowItem["printType"] + "";
|
||||
string sourceType = printRowItem["sourceType"] + "";
|
||||
string printPath = PubUtil.PrintFileAbsolutelyPath70;
|
||||
string modid= printRowItem["modid"] + "";
|
||||
string modid = printRowItem["modid"] + "";
|
||||
if (!File.Exists(printPath))
|
||||
{
|
||||
MessageUtil.Show(ResourceKeys.NotFoundPrintFile);
|
||||
@@ -4033,7 +4058,7 @@ namespace Lskj.Control
|
||||
tmpSqls.AddRange(tmpSql2.Split(';').ToList());
|
||||
if (_printSaveParams != null && _printSaveParams.Count > 0)
|
||||
{
|
||||
_printSaveParams[5] = tmpSql+ tmpSql1+ tmpSql2;
|
||||
_printSaveParams[5] = tmpSql + tmpSql1 + tmpSql2;
|
||||
_printSaveParams[3] = dataRow[_printSaveParams[2]] + "";
|
||||
}
|
||||
|
||||
@@ -4087,7 +4112,35 @@ namespace Lskj.Control
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
protected void OnGridViewRightCallBack(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
int oldRowHandle = gcMain.GridView.FocusedRowHandle;
|
||||
if (!(gcMain is TreeGridControlEx) && oldRowHandle < 0) return;
|
||||
DataTable dt = this.gcMain.GridView.GetGridViewFilteredAndSortedDataToDataTable();
|
||||
if (gcMain is TreeGridControlEx) dt = (gcMain as TreeGridControlEx).GetGridViewDataSource();
|
||||
if (dt == null || dt.Rows.Count == 0) return;
|
||||
DataRow SelectTheLine = gcMain is TreeGridControlEx ? (gcMain as TreeGridControlEx).GetViewFocusedDataRow() : dt.Rows[oldRowHandle];
|
||||
this.SearchObj.RememberRow = (this.SysModel.AccordingNameSelected == 0);
|
||||
this.SearchObj.SearchLastGrid();
|
||||
if (this.SysModel.AccordingNameSelected != 0)//根据主键刷新目标选中行
|
||||
{
|
||||
DataRow items = dt.Rows.Cast<DataRow>().FirstOrDefault(x => x[ParmaryKey].Equals(SelectTheLine[ParmaryKey]));
|
||||
dt = this.gcMain.GridView.GetGridViewFilteredAndSortedDataToDataTable();
|
||||
BindingSource bindingSource = new BindingSource();
|
||||
bindingSource.DataSource = dt;
|
||||
int numberOfRows = bindingSource.Find(ParmaryKey, SelectTheLine[ParmaryKey].ToString());
|
||||
this.gcMain.GridView.ClearSelection();
|
||||
this.gcMain.GridView.FocusedRowHandle = numberOfRows;
|
||||
this.gcMain.GridView.SelectRow(numberOfRows);
|
||||
}
|
||||
if (this.RightGridCallBack != null) this.RightGridCallBack(sender, e);
|
||||
if (DetailRightGridCallBack != null) this.DetailRightGridCallBack(sender, e);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:双击修改界面</para>
|
||||
@@ -4285,29 +4338,45 @@ namespace Lskj.Control
|
||||
TreeGridControlEx treeList = gcMain as TreeGridControlEx;
|
||||
if (this.GridControlObj != null && this.GridControlObj.AdapterObj != null)
|
||||
{
|
||||
int result = this.GridControlObj.AdapterObj.Update(treeList.TreeListObj.DataSource as DataTable);
|
||||
if (result > 0)
|
||||
if (ApiHelper.IsExecEventApi(Interface.Api.OperateEvent.AfterModuleDataChange, this.Model.ModuleCode, 0))
|
||||
{
|
||||
isExec = false;
|
||||
MessageUtil.Show(ResourceKeys.SaveSuccess);
|
||||
if (OnSaveGridCallBack != null)
|
||||
goto IsApi;
|
||||
}
|
||||
if (this.SysModel.DefaultStoredProcedureSaves)
|
||||
{
|
||||
goto IsApi;
|
||||
}
|
||||
else
|
||||
{
|
||||
int result = this.GridControlObj.AdapterObj.Update(treeList.TreeListObj.DataSource as DataTable);
|
||||
if (result > 0)
|
||||
{
|
||||
this.OnSaveGridCallBack(sender, e);
|
||||
isExec = false;
|
||||
MessageUtil.Show(ResourceKeys.SaveSuccess);
|
||||
if (OnSaveGridCallBack != null)
|
||||
{
|
||||
this.OnSaveGridCallBack(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
if (isExec)
|
||||
IsApi: if (isExec)
|
||||
{
|
||||
this.SaveTreeRecord();
|
||||
if (OnSaveGridCallBack != null)
|
||||
{
|
||||
this.OnSaveGridCallBack(sender, e);
|
||||
}
|
||||
if (this.SysModel.ModifyClose && this.OnCloseCallback != null)
|
||||
{
|
||||
this.OnCloseCallback(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4729,6 +4798,19 @@ namespace Lskj.Control
|
||||
/// <param name="e">The e.</param>
|
||||
protected void OnReportPrintAfter(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_printSaveParams != null && _printSaveParams.Count > 0)
|
||||
{
|
||||
//打印完成后添加数据库
|
||||
int result = BaseModuleImpl.SavePrintRecord(_printSaveParams[0], _printSaveParams[1], _printSaveParams[2], _printSaveParams[3], _printSaveParams[4]);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
@@ -4796,7 +4878,15 @@ namespace Lskj.Control
|
||||
/// <param name="e"></param>
|
||||
protected void OnTsmExportClick(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
this.ExportGridRecord();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:添加空行</para>
|
||||
@@ -5342,7 +5432,7 @@ namespace Lskj.Control
|
||||
/// <param name="ColumnName"></param>
|
||||
public void SetDisplayColumns(string text)
|
||||
{
|
||||
if (!this.SysModel.SearchEnable)
|
||||
if (!this.SysModel.SearchEnable)
|
||||
{
|
||||
PromptBox.EditText = text;
|
||||
// 获取文档对象
|
||||
@@ -5418,7 +5508,8 @@ namespace Lskj.Control
|
||||
{
|
||||
this.scc_container.SplitterPosition = Convert.ToInt32(htight);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
this.scc_container.SplitterPosition = 250;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user