SVN r291
SVN-Revision: r291
This commit is contained in:
@@ -71,28 +71,4 @@ namespace Lskj.BaseAccraditation
|
||||
return;
|
||||
}
|
||||
FrmBaseAccraditation popupForm = new FrmBaseAccraditation();
|
||||
popupForm.SysModel = DynamicBaseModel;
|
||||
popupForm.Opacity = 0;
|
||||
//popupForm.SetFormSize();
|
||||
this.SubForm = popupForm;
|
||||
//popupForm.SetFormSize();
|
||||
}
|
||||
else
|
||||
{
|
||||
FrmMain main = new FrmMain();
|
||||
this.SubForm = main;
|
||||
main.SysModel = new DynamicBaseAccraditionModel(obj);
|
||||
main.SysModel.DataCaches = new Dictionary<object, Hashtable>();
|
||||
//if (SystemInfo.Instance.OptimizationSpeed) main.GetDataCaches(main.SysModel.DataCaches);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogUtil.WriteError("Lskj.BaseAccraditation.dll--参数错误-->" + obj.ToString(), ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Form SubForm { get; set; }
|
||||
}
|
||||
}
|
||||
popupForm.SysModel = DynamicBaseM
|
||||
@@ -287,47 +287,182 @@ namespace Lskj.BaseAccraditation
|
||||
public void GetDataCaches(Dictionary<object, Hashtable> cachesDic)
|
||||
{
|
||||
//全局数据
|
||||
Task<DynamicBaseAccraditionPopModel> dynamicModelTask = cachesDic.AddTask(this, "DynamicModel", new Task<DynamicBaseAccraditionPopModel>(() =>
|
||||
Task<DynamicModel> dynamicModelTask = cachesDic.AddTask(this, "DynamicModel", new Task<DynamicModel>(() =>
|
||||
{
|
||||
return SysModel;//动态链接库对象
|
||||
}));
|
||||
DynamicBaseAccraditionPopModel dynamicModel =(DynamicBaseAccraditionPopModel) dynamicModelTask.Result;
|
||||
Task<DataRow> accraditationModelRowTask = cachesDic.AddTask(this, "AccraditationModelRow", new Task<DataRow>(() =>
|
||||
{
|
||||
return MainImpl.GetSystemdllTab(dynamicModelTask.Result.ModuleCode);//获取单个模块信息
|
||||
return MainImpl.GetSystemdllTab(dynamicModel.ModuleCode);//获取单个模块信息
|
||||
}));
|
||||
Task<BaseAuditModel> BaseAuditModelTask = cachesDic.AddTask(this, "BaseAuditModel", new Task<BaseAuditModel>(() =>
|
||||
{
|
||||
BaseAuditModel BaseAuditModel = new BaseAuditModel(accraditationModelRowTask.Result);
|
||||
|
||||
Task<string> PrefixKeyTask = cachesDic.AddTask(this, "PrefixKey", new Task<string>(() =>
|
||||
{
|
||||
return BaseImpl.GetColumnPrefix(BaseAuditModel.MenuTable);
|
||||
}));
|
||||
Task<string> ParmaryKeyTask = cachesDic.AddTask(this, "ParmaryKey", new Task<string>(() =>
|
||||
{
|
||||
return BaseImpl.GetBasePrimaryKey(dynamicModel.ModuleCode);
|
||||
}));
|
||||
BaseAuditModel.PrefixKey = PrefixKeyTask.Result;
|
||||
BaseAuditModel.ParmaryKey = ParmaryKeyTask.Result;
|
||||
return BaseAuditModel;//系统模块实体对象
|
||||
}));
|
||||
Task<string> PrefixKeyTask = cachesDic.AddTask(this, "PrefixKey", new Task<string>(() =>
|
||||
{
|
||||
return BaseImpl.GetColumnPrefix(BaseAuditModelTask.Result.MenuTable);
|
||||
}));
|
||||
Task<string> ParmaryKeyTask = cachesDic.AddTask(this, "ParmaryKey", new Task<string>(() =>
|
||||
{
|
||||
return BaseImpl.GetBasePrimaryKey(dynamicModelTask.Result.ModuleCode);
|
||||
}));
|
||||
|
||||
Task<DataRow> flowRowDataTask = cachesDic.AddTask(this, "flowRowData", new Task<DataRow>(() =>
|
||||
{
|
||||
return BaseAuditImpl.GetCurrentFlowRowData(BaseAuditModelTask.Result.MenuTable, BaseAuditModelTask.Result.ParmaryKey, dynamicModelTask.Result.PrimaryValue);
|
||||
return BaseAuditImpl.GetCurrentFlowRowData(BaseAuditModelTask.Result.MenuTable, BaseAuditModelTask.Result.ParmaryKey, dynamicModel.PrimaryValue);
|
||||
}));
|
||||
Task<AccraditationModel> AccditModelObjTask = cachesDic.AddTask(this, "AccditModelObj", new Task<AccraditationModel>(() =>
|
||||
{
|
||||
AccraditationModel accraditationModel = new AccraditationModel(BaseAuditImpl.GetCurrentStepFlow(dynamicModelTask.Result.ModuleCode, dynamicModelTask.Result.StepCode));
|
||||
AccraditationModel accraditationModel = new AccraditationModel(BaseAuditImpl.GetCurrentStepFlow(dynamicModel.ModuleCode, dynamicModel.StepCode));
|
||||
return accraditationModel;
|
||||
}));
|
||||
Task<DataRow> BaseRowDataTask = cachesDic.AddTask(this, "BaseRowData", new Task<DataRow>(() =>
|
||||
{
|
||||
return BaseAuditImpl.GetCurrentControlData(ReplaceHelper.ReplaceWhereCond(ReplaceHelper.ReplaceUserInfo(BaseAuditModelTask.Result.MenuSql)), BaseAuditModelTask.Result.ParmaryKey, dynamicModelTask.Result.PrimaryValue); ;
|
||||
return BaseAuditImpl.GetCurrentControlData(ReplaceHelper.ReplaceWhereCond(ReplaceHelper.ReplaceUserInfo(BaseAuditModelTask.Result.MenuSql)), BaseAuditModelTask.Result.ParmaryKey, dynamicModel.PrimaryValue); ;
|
||||
}));
|
||||
Task<string> BtnFileMangerTask = cachesDic.AddTask(this, "BtnFileManger", new Task<string>(() =>
|
||||
{
|
||||
return "(" + AttachImpl.GetFileCount(BaseAuditModelTask.Result.MenuDirId + "", dynamicModelTask.Result.PrimaryValue) + ")";
|
||||
return "(" + AttachImpl.GetFileCount(BaseAuditModelTask.Result.MenuDirId + "", dynamicModel.PrimaryValue) + ")";
|
||||
}));
|
||||
Task<DataRow> PushMessageTask = cachesDic.AddTask(this, "PushMessage", new Task<DataRow>(() =>
|
||||
{
|
||||
return BaseAuditImpl.GetPushedOpers(dynamicModelTask.Result.PrimaryValue, dynamicModelTask.Result.StepCode);
|
||||
return BaseAuditImpl.GetPushedOpers(dynamicModel.PrimaryValue, dynamicModel.StepCode);
|
||||
}));
|
||||
Task<DataTable> ReadOnlyColumnsTask = cachesDic.AddTask(gridFlowRecord, "ReadOnlyColumns", new Task<DataTable>(() =>
|
||||
{
|
||||
return BaseAuditImpl.GetFlowRecordColumn();
|
||||
}));
|
||||
Task<DataTable> GridViewDataSourceTask = cachesDic.AddTask(gridFlowRecord, "GridViewDataSource", new Task<DataTable>(() =>
|
||||
{
|
||||
return BaseAuditImpl.GetFlowRecordData(this.BaseAuditModelObj.SystemTabFlowStep, dynamicModel.PrimaryValue, dynamicModel.ModuleCode);
|
||||
}));
|
||||
Task<DataRow> GetCurrentFlowStepTask = cachesDic.AddTask(this, "GetCurrentFlowStep", new Task<DataRow>(() =>
|
||||
{
|
||||
DataRow GetCurrentFlowStep = BaseAuditImpl.GetCurrentFlowStep(dynamicModel.ModuleCode, flowRowDataTask.Result[BaseAuditModelTask.Result.BillType] + "", dynamicModel.StepCode);
|
||||
if (GetCurrentFlowStep != null)
|
||||
{
|
||||
Task<FlowTypeStepModel> FlowTypeStepModelTask = cachesDic.AddTask(this, "FlowTypeStepModel", new Task<FlowTypeStepModel>(() =>
|
||||
{
|
||||
FlowTypeStepModel flowTypeStepModel = new FlowTypeStepModel(GetCurrentFlowStep);
|
||||
return flowTypeStepModel;
|
||||
}));
|
||||
Task<DataRow> GetDataRowResultTask = cachesDic.AddTask(this, "GetDataRowResult", new Task<DataRow>(() =>
|
||||
{
|
||||
DataRow getDataRowResult = BaseImpl.GetDataRowResult(AccditModelObjTask.Result.FlowOperSql);
|
||||
string operUser = FlowTypeStepModelTask.Result.OperUser;
|
||||
if (getDataRowResult != null)
|
||||
{
|
||||
Task<DataRow> GetFlowOperatorsTask = cachesDic.AddTask(this, "GetFlowOperators", new Task<DataRow>(() =>
|
||||
{
|
||||
DataRow GetFlowOperators = BaseAuditImpl.GetFlowOperators(dynamicModel.ModuleCode, dynamicModel.PrimaryValue, dynamicModel.StepCode);
|
||||
if (GetFlowOperators != null)
|
||||
{
|
||||
operUser = GetFlowOperators["operators"] + "";
|
||||
if (operUser.StartsWith("@"))
|
||||
{
|
||||
string sql = string.Format("select count(1) from p_employeetab where ({0}) and employeeid='{1}'", ReplaceHelper.ReplaceRowParam(flowRowDataTask.Result, ReplaceHelper.ReplaceUserInfo(operUser)).Replace("@", "").Replace("''", "'"), ERPInfo.Instance.UserId);
|
||||
Task<string> numberTask = cachesDic.AddTask(this, "Number", new Task<string>(() =>
|
||||
{
|
||||
return BaseImpl.GetResult(sql) + "";
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
return GetFlowOperators;
|
||||
}));
|
||||
}
|
||||
//Task<string> operatorsTask = cachesDic.AddTask(this, "operUsers", new Task<string>(() =>
|
||||
//{
|
||||
// return operUser;
|
||||
//}));
|
||||
return getDataRowResult;
|
||||
}));
|
||||
|
||||
//代理权限
|
||||
Task<DataRow> agencyAuthorityTask = cachesDic.AddTask(this, "AgencyAuthority", new Task<DataRow>(() =>
|
||||
{
|
||||
return BaseAuditImpl.GetAgencyAuthority(dynamicModel.ModuleCode);
|
||||
}));
|
||||
}
|
||||
return GetCurrentFlowStep;
|
||||
}));
|
||||
//动态创建控件
|
||||
Task<DataTable> GetControlLocationTask = cachesDic.AddTask(this, "GetControlLocation", new Task<DataTable>(() =>
|
||||
{
|
||||
return BaseModuleImpl.GetControlLocation(BaseAuditModelTask.Result.FormKey, dynamicModel.ModuleCode);
|
||||
}));
|
||||
Task<DataTable> GetAddGroupDataTask = cachesDic.AddTask(this, "GetAddGroupData", new Task<DataTable>(() =>
|
||||
{
|
||||
return BaseModuleImpl.GetAddGroupData(BaseAuditModelTask.Result.FormKey);
|
||||
}));
|
||||
//加载提醒记录
|
||||
Task<DataTable> GetRemindColumnTask = cachesDic.AddTask(this, "GetRemindColumn", new Task<DataTable>(() =>
|
||||
{
|
||||
return BaseAuditImpl.GetRemindColumn();
|
||||
}));
|
||||
Task<DataTable> GetRemindinRecordTask = cachesDic.AddTask(this, "GetRemindinRecord", new Task<DataTable>(() =>
|
||||
{
|
||||
return BaseAuditImpl.GetRemindinRecord(this.BaseAuditModelObj.FlowStepTable, this.BaseAuditModelObj.ComfrimTable, dynamicModel.PrimaryValue, dynamicModel.ModuleCode);
|
||||
}));
|
||||
//加载会签记录
|
||||
Task<DataTable> GetSignRecordTask = cachesDic.AddTask(this, "GetSignRecord", new Task<DataTable>(() =>
|
||||
{
|
||||
DataTable dt = BaseAuditImpl.GetSignRecord(this.BaseAuditModelObj.ComfrimTable, dynamicModel.PrimaryValue, dynamicModel.ModuleCode);
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
Task<DataTable> GetSignRecordCoulumnTask = cachesDic.AddTask(this, "GetSignRecordCoulumn", new Task<DataTable>(() =>
|
||||
{
|
||||
return BaseAuditImpl.GetSignRecordCoulumn();
|
||||
}));
|
||||
}
|
||||
return dt;
|
||||
}));
|
||||
//获取选项卡数据
|
||||
Task<List<GridDetailModel>> detailTask = cachesDic.AddTask(this, "Details", new Task<List<GridDetailModel>>(() =>
|
||||
{
|
||||
List<GridDetailModel> details = new List<GridDetailModel>();
|
||||
|
||||
DataTable table = BaseAuditImpl.GetAttachTabs(dynamicModel.ModuleCode, dynamicModel.StepCode);
|
||||
DataTable Detailtable = AttachImpl.GetAttachDetilTab(dynamicModel.ModuleCode, dynamicModel.StepCode);
|
||||
foreach (DataRow item in table.Rows)
|
||||
{
|
||||
DataTable dtGridColumns = BaseAuditImpl.GetBottomBasicInformation(item["formKey"] + "");
|
||||
GridDetailModel gridDeatilModel = new GridDetailModel(item, dtGridColumns, GridCustomColumnStruct.AuditPopupDetailGridView + item["formKey"] + "");
|
||||
//控制只读
|
||||
//gridDeatilModel.DetailSql = "1";
|
||||
//url需要替换主表中控件的值
|
||||
if (gridDeatilModel.IsWebView)
|
||||
{
|
||||
gridDeatilModel.DetailSql = ReplaceHelper.ReplaceRowParam(_baseRowData, ReplaceHelper.ReplaceUserInfo(gridDeatilModel.DetailSql));
|
||||
}
|
||||
details.Add(gridDeatilModel);
|
||||
}
|
||||
foreach (DataRow item in Detailtable.Rows)
|
||||
{
|
||||
DataRow dtGridColumns = BaseAuditImpl.GetBottomDetailModel(item["detailKey"] + "");
|
||||
if (dtGridColumns == null) continue;
|
||||
DataTable gridColumns = ReportImpl.GetReportDetailColumns(dtGridColumns["tab"] + "", dtGridColumns["id"] + "");
|
||||
GridDetailModel gridDeatilModel = new GridDetailModel(dtGridColumns, gridColumns, GridCustomColumnStruct.AuditPopupDetailGridView + item["detailKey"] + "");
|
||||
//控制只读
|
||||
//gridDeatilModel.DetailSql = "1";
|
||||
details.Add(gridDeatilModel);
|
||||
}
|
||||
|
||||
return details;
|
||||
}));
|
||||
cachesDic.AddTask(tab_basicInfo, "DynamicModel", dynamicModelTask);
|
||||
cachesDic.AddTask(tab_basicInfo, "Details", detailTask);
|
||||
tab_basicInfo.GetDataCaches(cachesDic);
|
||||
//初始化常用工具
|
||||
Task<DataTable> GetBaseGridRightMenusTask = cachesDic.AddTask(this, "GetBaseGridRightMenus", new Task<DataTable>(() =>
|
||||
{
|
||||
return BaseModuleImpl.GetBaseGridRightMenus(dynamicModel.ModuleCode, ModuleType.BaseAudit);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -478,13 +613,13 @@ namespace Lskj.BaseAccraditation
|
||||
|
||||
if (!dataCaches.GetValue(this, "BaseRowData", out string FileManger))
|
||||
{
|
||||
FileManger= "(" + AttachImpl.GetFileCount(this.ModuleModelObj.MenuDirId + "", this.SysModel.PrimaryValue) + ")";
|
||||
FileManger = "(" + AttachImpl.GetFileCount(this.ModuleModelObj.MenuDirId + "", this.SysModel.PrimaryValue) + ")";
|
||||
|
||||
}
|
||||
this.btnFileManger.Text += FileManger;
|
||||
|
||||
this.btnReturnd.Text = this.AccditModelObj.StepBackText;
|
||||
if (this._baseRowData == null) this._baseRowData = this._flowRowData;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:初始化控件</para>
|
||||
@@ -497,6 +632,7 @@ namespace Lskj.BaseAccraditation
|
||||
/// </summary>
|
||||
private void InitializeControl()
|
||||
{
|
||||
Dictionary<object, Hashtable> dataCaches = SysModel != null ? SysModel.DataCaches : null;
|
||||
//设置控件文本属性
|
||||
this.Text = this.SysModel.FormText;
|
||||
this.btnAudit.Text = this.AccditModelObj.StepApplyText;
|
||||
@@ -505,28 +641,21 @@ namespace Lskj.BaseAccraditation
|
||||
|
||||
////设置流转记录的列
|
||||
this.gridFlowRecord.GridView.RowStyle += new RowStyleEventHandler(gridFlowRecord_RowStyle);
|
||||
DataRow dr = null;
|
||||
|
||||
if (ProcessExists)
|
||||
if (!dataCaches.GetValue(gridFlowRecord, "ReadOnlyColumns", out DataTable dtReadOnlyColumns))
|
||||
{
|
||||
this.gridFlowRecord.SetReadOnlyColumns(Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent(), GridCustomColumnStruct.AuditPopupAttachGridView + this.ModuleModelObj.FormKey);
|
||||
this.gridFlowRecord.gridControl.Paint += new PaintEventHandler(gridFlow_Panint);
|
||||
this.gridFlowRecord.SetGridViewDataSource(Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent());
|
||||
dr = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContentRow();
|
||||
dtReadOnlyColumns = BaseAuditImpl.GetFlowRecordColumn();
|
||||
}
|
||||
else
|
||||
if (!dataCaches.GetValue(gridFlowRecord, "GridViewDataSource", out DataTable dtridViewDataSource))
|
||||
{
|
||||
this.gridFlowRecord.SetReadOnlyColumns(BaseAuditImpl.GetFlowRecordColumn(), GridCustomColumnStruct.AuditPopupAttachGridView + this.ModuleModelObj.FormKey);
|
||||
this.gridFlowRecord.gridControl.Paint += new PaintEventHandler(gridFlow_Panint);
|
||||
this.gridFlowRecord.SetGridViewDataSource(BaseAuditImpl.GetFlowRecordData(this.BaseAuditModelObj.SystemTabFlowStep, this.SysModel.PrimaryValue, this.SysModel.ModuleCode));
|
||||
dr = BaseAuditImpl.GetCurrentStepFlow(this.SysModel.ModuleCode, this.SysModel.StepCode);
|
||||
dtridViewDataSource = BaseAuditImpl.GetFlowRecordData(this.BaseAuditModelObj.SystemTabFlowStep, this.SysModel.PrimaryValue, this.SysModel.ModuleCode);
|
||||
}
|
||||
this.gridFlowRecord.SetReadOnlyColumns(dtReadOnlyColumns, GridCustomColumnStruct.AuditPopupAttachGridView + this.ModuleModelObj.FormKey);
|
||||
this.gridFlowRecord.gridControl.Paint += new PaintEventHandler(gridFlow_Panint);
|
||||
this.gridFlowRecord.SetGridViewDataSource(dtridViewDataSource);
|
||||
|
||||
if (dr != null)
|
||||
{
|
||||
//初始化流转标题
|
||||
this.label_auditPerson.Text = this.labeltxt_managerAudit.LabelText = dr["stepName"] + "";
|
||||
}
|
||||
//初始化流转标题
|
||||
this.label_auditPerson.Text = this.labeltxt_managerAudit.LabelText = this.AccditModelObj.CurstepName;
|
||||
|
||||
this.combox_Suggestion.ValueField = this.combox_Suggestion.TextField = "Mix_apellation";
|
||||
this.combox_Suggestion.SetDataSource(BaseImpl.GetDataTableResult(this.AccditModelObj.SuggestionSql));
|
||||
@@ -711,12 +840,9 @@ namespace Lskj.BaseAccraditation
|
||||
/// </summary>
|
||||
private void InitCommonTools()
|
||||
{
|
||||
DataTable tableCommon = new DataTable();
|
||||
if (ProcessExists)
|
||||
{
|
||||
tableCommon = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent();
|
||||
}
|
||||
else
|
||||
|
||||
Dictionary<object, Hashtable> dataCaches = SysModel != null ? SysModel.DataCaches : null;
|
||||
if (!dataCaches.GetValue(this, "GetBaseGridRightMenus", out DataTable tableCommon))
|
||||
{
|
||||
tableCommon = BaseModuleImpl.GetBaseGridRightMenus(this.SysModel.ModuleCode, ModuleType.BaseAudit);
|
||||
}
|
||||
@@ -821,18 +947,19 @@ namespace Lskj.BaseAccraditation
|
||||
/// </summary>
|
||||
private void LoadRemindRecord()
|
||||
{
|
||||
|
||||
Dictionary<object, Hashtable> dataCaches = SysModel != null ? SysModel.DataCaches : null;
|
||||
//加载提醒
|
||||
if (!string.IsNullOrEmpty(this._flowTypeStepModel.RemindSelect))
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
if (ProcessExists)
|
||||
|
||||
if (!dataCaches.GetValue(this, "GetRemindColumn", out DataTable DefaultColumns))
|
||||
{
|
||||
this.gridRemind.SetReadOnlyColumns(Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent());
|
||||
dt = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent();
|
||||
DefaultColumns = BaseAuditImpl.GetRemindColumn();
|
||||
}
|
||||
else
|
||||
this.gridRemind.SetReadOnlyColumns(DefaultColumns);
|
||||
if (!dataCaches.GetValue(this, "GetRemindinRecord", out DataTable dt))
|
||||
{
|
||||
this.gridRemind.SetReadOnlyColumns(BaseAuditImpl.GetRemindColumn());
|
||||
dt = BaseAuditImpl.GetRemindinRecord(this.BaseAuditModelObj.FlowStepTable, this.BaseAuditModelObj.ComfrimTable, this.SysModel.PrimaryValue, this.SysModel.ModuleCode);
|
||||
}
|
||||
|
||||
@@ -861,27 +988,20 @@ namespace Lskj.BaseAccraditation
|
||||
/// </summary>
|
||||
private void LoadSignRecord()
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
if (ProcessExists)
|
||||
{
|
||||
dt = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent();
|
||||
}
|
||||
else
|
||||
Dictionary<object, Hashtable> dataCaches = SysModel != null ? SysModel.DataCaches : null;
|
||||
if (!dataCaches.GetValue(this, "GetSignRecord", out DataTable dt))
|
||||
{
|
||||
dt = BaseAuditImpl.GetSignRecord(this.BaseAuditModelObj.ComfrimTable, this.SysModel.PrimaryValue, this.SysModel.ModuleCode);
|
||||
}
|
||||
|
||||
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
if (ProcessExists)
|
||||
if (!dataCaches.GetValue(this, "GetSignRecordCoulumn", out DataTable RecordCoulumns))
|
||||
{
|
||||
this.gridSign.SetReadOnlyColumns(Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent());
|
||||
RecordCoulumns = BaseAuditImpl.GetSignRecordCoulumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.gridSign.SetReadOnlyColumns(BaseAuditImpl.GetSignRecordCoulumn());
|
||||
}
|
||||
|
||||
this.gridSign.SetReadOnlyColumns(RecordCoulumns);
|
||||
this.gridSign.SetGridViewDataSource(dt);
|
||||
this.tabpage_sign.Text = this.tabpage_sign.Text + "(" + dt.Rows.Count + ")";
|
||||
}
|
||||
@@ -904,18 +1024,15 @@ namespace Lskj.BaseAccraditation
|
||||
/// </summary>
|
||||
private void BindTab()
|
||||
{
|
||||
if (ProcessExists)
|
||||
{
|
||||
this._baseTabList = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent();
|
||||
}
|
||||
else
|
||||
{
|
||||
this._baseTabList = BaseAuditImpl.GetAttachTabs(this.SysModel.ModuleCode, this.SysModel.StepCode);
|
||||
}
|
||||
|
||||
//this._baseTabList = BaseAuditImpl.GetAttachTabs(this.SysModel.ModuleCode, this.SysModel.StepCode);
|
||||
Dictionary<object, Hashtable> dataCaches = SysModel != null ? SysModel.DataCaches : null;
|
||||
this.tab_basicInfo.Model = this.SysModel;
|
||||
this.tab_basicInfo.ParentControlEx = this.ControlObj;
|
||||
this.tab_basicInfo.InitTabPages(GetTabDetails(), false);
|
||||
if (!dataCaches.GetValue(tab_basicInfo, "Details", out List<GridDetailModel> details))
|
||||
{
|
||||
details = GetTabDetails();
|
||||
}
|
||||
this.tab_basicInfo.InitTabPages(details, false);
|
||||
this.tab_basicInfo.OnRightCallback += new EventHandler(tabBasicInfo_OnRightCallback);
|
||||
//设置高度
|
||||
SetTabHeight();
|
||||
@@ -961,62 +1078,33 @@ namespace Lskj.BaseAccraditation
|
||||
private List<GridDetailModel> GetTabDetails()
|
||||
{
|
||||
List<GridDetailModel> details = new List<GridDetailModel>();
|
||||
if (ProcessExists)
|
||||
{
|
||||
DataTable table = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent();
|
||||
DataTable Detailtable = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent();
|
||||
foreach (DataRow item in table.Rows)
|
||||
{
|
||||
DataTable dtGridColumns = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent();
|
||||
GridDetailModel gridDeatilModel = new GridDetailModel(item, dtGridColumns, GridCustomColumnStruct.AuditPopupDetailGridView + item["formKey"] + "");
|
||||
//控制只读
|
||||
//gridDeatilModel.DetailSql = "1";
|
||||
if (gridDeatilModel.IsWebView)
|
||||
{
|
||||
gridDeatilModel.DetailSql = ReplaceHelper.ReplaceRowParam(_baseRowData, ReplaceHelper.ReplaceUserInfo(gridDeatilModel.DetailSql));
|
||||
}
|
||||
details.Add(gridDeatilModel);
|
||||
}
|
||||
foreach (DataRow item in Detailtable.Rows)
|
||||
{
|
||||
DataRow dtGridColumns = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContentRow();
|
||||
if (dtGridColumns == null) continue;
|
||||
DataTable gridColumns = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent();
|
||||
GridDetailModel gridDeatilModel = new GridDetailModel(dtGridColumns, gridColumns, GridCustomColumnStruct.AuditPopupDetailGridView + item["detailKey"] + "");
|
||||
//控制只读
|
||||
//gridDeatilModel.DetailSql = "1";
|
||||
details.Add(gridDeatilModel);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
DataTable table = BaseAuditImpl.GetAttachTabs(this.SysModel.ModuleCode, this.SysModel.StepCode);
|
||||
DataTable Detailtable = AttachImpl.GetAttachDetilTab(this.SysModel.ModuleCode, this.SysModel.StepCode);
|
||||
foreach (DataRow item in table.Rows)
|
||||
{
|
||||
DataTable table = BaseAuditImpl.GetAttachTabs(this.SysModel.ModuleCode, this.SysModel.StepCode);
|
||||
DataTable Detailtable = AttachImpl.GetAttachDetilTab(this.SysModel.ModuleCode, this.SysModel.StepCode);
|
||||
foreach (DataRow item in table.Rows)
|
||||
DataTable dtGridColumns = BaseAuditImpl.GetBottomBasicInformation(item["formKey"] + "");
|
||||
GridDetailModel gridDeatilModel = new GridDetailModel(item, dtGridColumns, GridCustomColumnStruct.AuditPopupDetailGridView + item["formKey"] + "");
|
||||
//控制只读
|
||||
//gridDeatilModel.DetailSql = "1";
|
||||
//url需要替换主表中控件的值
|
||||
if (gridDeatilModel.IsWebView)
|
||||
{
|
||||
DataTable dtGridColumns = BaseAuditImpl.GetBottomBasicInformation(item["formKey"] + "");
|
||||
GridDetailModel gridDeatilModel = new GridDetailModel(item, dtGridColumns, GridCustomColumnStruct.AuditPopupDetailGridView + item["formKey"] + "");
|
||||
//控制只读
|
||||
//gridDeatilModel.DetailSql = "1";
|
||||
//url需要替换主表中控件的值
|
||||
if (gridDeatilModel.IsWebView)
|
||||
{
|
||||
gridDeatilModel.DetailSql = ReplaceHelper.ReplaceRowParam(_baseRowData, ReplaceHelper.ReplaceUserInfo(gridDeatilModel.DetailSql));
|
||||
}
|
||||
details.Add(gridDeatilModel);
|
||||
}
|
||||
foreach (DataRow item in Detailtable.Rows)
|
||||
{
|
||||
DataRow dtGridColumns = BaseAuditImpl.GetBottomDetailModel(item["detailKey"] + "");
|
||||
if (dtGridColumns == null) continue;
|
||||
DataTable gridColumns = ReportImpl.GetReportDetailColumns(dtGridColumns["tab"] + "", dtGridColumns["id"] + "");
|
||||
GridDetailModel gridDeatilModel = new GridDetailModel(dtGridColumns, gridColumns, GridCustomColumnStruct.AuditPopupDetailGridView + item["detailKey"] + "");
|
||||
//控制只读
|
||||
//gridDeatilModel.DetailSql = "1";
|
||||
details.Add(gridDeatilModel);
|
||||
gridDeatilModel.DetailSql = ReplaceHelper.ReplaceRowParam(_baseRowData, ReplaceHelper.ReplaceUserInfo(gridDeatilModel.DetailSql));
|
||||
}
|
||||
details.Add(gridDeatilModel);
|
||||
}
|
||||
foreach (DataRow item in Detailtable.Rows)
|
||||
{
|
||||
DataRow dtGridColumns = BaseAuditImpl.GetBottomDetailModel(item["detailKey"] + "");
|
||||
if (dtGridColumns == null) continue;
|
||||
DataTable gridColumns = ReportImpl.GetReportDetailColumns(dtGridColumns["tab"] + "", dtGridColumns["id"] + "");
|
||||
GridDetailModel gridDeatilModel = new GridDetailModel(dtGridColumns, gridColumns, GridCustomColumnStruct.AuditPopupDetailGridView + item["detailKey"] + "");
|
||||
//控制只读
|
||||
//gridDeatilModel.DetailSql = "1";
|
||||
details.Add(gridDeatilModel);
|
||||
}
|
||||
|
||||
return details;
|
||||
}
|
||||
#endregion
|
||||
@@ -1112,13 +1200,9 @@ namespace Lskj.BaseAccraditation
|
||||
/// </summary>
|
||||
private void SetButtonStatus()
|
||||
{
|
||||
Dictionary<object, Hashtable> dataCaches = SysModel != null ? SysModel.DataCaches : null;
|
||||
//获取当前流转步骤
|
||||
DataRow currentFlowStep = null;
|
||||
if (ProcessExists)
|
||||
{
|
||||
currentFlowStep = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContentRow();
|
||||
}
|
||||
else
|
||||
if (!dataCaches.GetValue(this, "GetCurrentFlowStep", out DataRow currentFlowStep))
|
||||
{
|
||||
currentFlowStep = BaseAuditImpl.GetCurrentFlowStep(this.SysModel.ModuleCode, this._flowRowData[this.ModuleModelObj.BillType] + "", this.SysModel.StepCode);
|
||||
}
|
||||
@@ -1128,18 +1212,22 @@ namespace Lskj.BaseAccraditation
|
||||
MessageUtil.Show(ResourceKeys.FlowStepConfigError);
|
||||
return;
|
||||
}
|
||||
this._flowTypeStepModel = new FlowTypeStepModel(currentFlowStep);
|
||||
|
||||
if (!dataCaches.GetValue(this, "FlowTypeStepModel", out this._flowTypeStepModel))
|
||||
{
|
||||
this._flowTypeStepModel = new FlowTypeStepModel(currentFlowStep);
|
||||
}
|
||||
string operUser = this._flowTypeStepModel.OperUser;
|
||||
|
||||
if (BaseImpl.GetDataRowResult(this.AccditModelObj.FlowOperSql) != null)
|
||||
if (!dataCaches.GetValue(this, "GetDataRowResult", out DataRow getDataRowResult))
|
||||
{
|
||||
DataRow flowOper = null;
|
||||
if (ProcessExists)
|
||||
{
|
||||
flowOper = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContentRow();
|
||||
}
|
||||
else
|
||||
getDataRowResult = BaseImpl.GetDataRowResult(this.AccditModelObj.FlowOperSql);
|
||||
}
|
||||
|
||||
if (getDataRowResult != null)
|
||||
{
|
||||
|
||||
if (!dataCaches.GetValue(this, "GetFlowOperators", out DataRow flowOper))
|
||||
{
|
||||
flowOper = BaseAuditImpl.GetFlowOperators(this.SysModel.ModuleCode, this.SysModel.PrimaryValue, this.SysModel.StepCode);
|
||||
}
|
||||
@@ -1153,8 +1241,11 @@ namespace Lskj.BaseAccraditation
|
||||
|
||||
if (operUser.StartsWith("@"))
|
||||
{
|
||||
string sql = string.Format("select count(1) from p_employeetab where ({0}) and employeeid='{1}' ", ReplaceHelper.ReplaceRowParam(_flowRowData, ReplaceHelper.ReplaceUserInfo(operUser)).Replace("@", "").Replace("''", "'"), ERPInfo.Instance.UserId);
|
||||
object number = MainImpl.GetResult(sql);
|
||||
if (!dataCaches.GetValue(this, "Number", out string number))
|
||||
{
|
||||
string sql = string.Format("select count(1) from p_employeetab where ({0}) and employeeid='{1}' ", ReplaceHelper.ReplaceRowParam(_flowRowData, ReplaceHelper.ReplaceUserInfo(operUser)).Replace("@", "").Replace("''", "'"), ERPInfo.Instance.UserId);
|
||||
number = MainImpl.GetResult(sql) + "";
|
||||
}
|
||||
this.btnAudit.Enabled = this.btnReturnd.Enabled = this.btnSave.Enabled = this.btnClose.Enabled = int.Parse(string.IsNullOrWhiteSpace(number + "") ? "0" : number + "") > 0;
|
||||
}
|
||||
else
|
||||
@@ -1165,7 +1256,10 @@ namespace Lskj.BaseAccraditation
|
||||
|
||||
|
||||
//代理权限
|
||||
DataRow agency = BaseAuditImpl.GetAgencyAuthority(this.SysModel.ModuleCode);
|
||||
if (!dataCaches.GetValue(this, "AgencyAuthority", out DataRow agency))
|
||||
{
|
||||
agency = BaseAuditImpl.GetAgencyAuthority(this.SysModel.ModuleCode);
|
||||
}
|
||||
if (agency != null)
|
||||
{
|
||||
string sourceuser = agency["sourceuser"] + "";
|
||||
@@ -1217,19 +1311,17 @@ namespace Lskj.BaseAccraditation
|
||||
/// </summary>
|
||||
private void CreateAccraditationControl()
|
||||
{
|
||||
if (ProcessExists)
|
||||
{
|
||||
this._dtFileds = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent();
|
||||
this._dtAddGroup = Lskj.Data.Caches.CacheSYSConfig.Instance().AccessToContent();
|
||||
}
|
||||
else
|
||||
Dictionary<object, Hashtable> dataCaches = SysModel != null ? SysModel.DataCaches : null;
|
||||
if (!dataCaches.GetValue(this, "GetControlLocation", out this._dtFileds))
|
||||
{
|
||||
this._dtFileds = BaseModuleImpl.GetControlLocation(this.ModuleModelObj.FormKey, this.SysModel.ModuleCode);
|
||||
}
|
||||
if (!dataCaches.GetValue(this, "GetAddGroupData", out this._dtAddGroup))
|
||||
{
|
||||
this._dtAddGroup = BaseModuleImpl.GetAddGroupData(this.ModuleModelObj.FormKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.ControlObj = new MyControl();
|
||||
this.ControlObj.PrimaryValue = this.SysModel.PrimaryValue;
|
||||
this.ControlObj.InitControl(this._dtFileds, pl_main, this._dtAddGroup);
|
||||
@@ -1239,13 +1331,6 @@ namespace Lskj.BaseAccraditation
|
||||
this.ControlObj.OnDataSourceBindCallBack += new EventHandler(OnControlObjOnDataSourceBindCallBack);
|
||||
if (this.AccditModelObj.BillModifyFields != "-1")
|
||||
this.ControlObj.SetReadOnlyAllControl(true);
|
||||
////改变控件状态 操作字段
|
||||
//foreach (string item in this.AccditModelObj.BillModifyFields.Trim(',').Split(','))
|
||||
//{
|
||||
// this.ControlObj.SetReadOnlyControl(item, false, false);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//改变控件状态 必填字段 (先设置必填字段,后面设置操作字段时可以改变颜色)
|
||||
string RequiredFields = this.AccditModelObj.RequiredFields.Trim(',');
|
||||
@@ -1971,6 +2056,7 @@ namespace Lskj.BaseAccraditation
|
||||
//frmBackSelNew.FrmBackSelectEx.StepSelection.Hide();
|
||||
frmBackSelNew.Sysmodel = this.SysModel;
|
||||
frmBackSelNew.ModuleModelObj = this.ModuleModelObj;
|
||||
frmBackSelNew.FrmBackSelectEx.LabelAdvice.EditText = this.combox_Suggestion.EditText;
|
||||
frmBackSelNew.InitControlSpecial();
|
||||
if (frmBackSelNew.ShowDialog() != DialogResult.OK) return -9;
|
||||
this._auditAdvic = frmBackSelNew.ComfirmMsg;
|
||||
@@ -1981,6 +2067,7 @@ namespace Lskj.BaseAccraditation
|
||||
FrmBackSelect frmBackSel = new FrmBackSelect();
|
||||
frmBackSel.Sysmodel = this.SysModel;
|
||||
frmBackSel.ModuleModelObj = this.ModuleModelObj;
|
||||
frmBackSel.FrmBackSelectEx.LabelAdvice.EditText = this.combox_Suggestion.EditText;
|
||||
frmBackSel.InitControl();
|
||||
if (frmBackSel.ShowDialog() != DialogResult.OK) return -9;
|
||||
this._auditAdvic = frmBackSel.ComfirmMsg;
|
||||
@@ -2091,36 +2178,4 @@ namespace Lskj.BaseAccraditation
|
||||
string sqlValue = model.IsReadOnly || model.IsChart ? model.DetailSql : model.SystemModel.MenuSql;
|
||||
if (ReplaceHelper.IsSelect(sqlValue) && !string.IsNullOrEmpty(model.UnionValue))
|
||||
{
|
||||
sqlValue = ReplaceHelper.ReplaceWhereCond(sqlValue) + string.Format(" and {0}='{1}'", model.UnionValue, unionPatentValue);
|
||||
}
|
||||
return sqlValue;
|
||||
}
|
||||
#endregion
|
||||
private void simpleButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
WebBrowserUtil.StartWebBrowser(this.SysModel.ModuleCode, mRowItem["ToolsName"] + "");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private bool VerificationRequired()
|
||||
{
|
||||
bool results = false;
|
||||
if (SystemInfo.Instance.ReviewCommentsRequired && string.IsNullOrWhiteSpace(this.txt_remark.Text))
|
||||
{
|
||||
MessageUtil.Show("请输入审核意见");
|
||||
results = true;
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,6 +308,8 @@ namespace Lskj.BaseAccraditation
|
||||
|
||||
FrmBaseAccraditation frmbaseAccradit = new FrmBaseAccraditation();
|
||||
frmbaseAccradit.SysModel = new DynamicBaseAccraditionPopModel(args);
|
||||
frmbaseAccradit.SysModel.DataCaches = new Dictionary<object, Hashtable>();
|
||||
if (SystemInfo.Instance.OptimizationSpeed) frmbaseAccradit.GetDataCaches(frmbaseAccradit.SysModel.DataCaches);
|
||||
frmbaseAccradit.Text = this.Text;
|
||||
|
||||
if (SystemInfo.Instance.PageOpen)
|
||||
@@ -331,7 +333,8 @@ namespace Lskj.BaseAccraditation
|
||||
DllName = "",
|
||||
Id = SysModel.ModuleId + "",
|
||||
Name = SysModel.FormText,
|
||||
BeforePage = ERPInfo.Instance.PageControl.SelectedTabPage
|
||||
BeforePage = ERPInfo.Instance.PageControl.SelectedTabPage,
|
||||
ModuleForm = frmbaseAccradit
|
||||
};
|
||||
frmbaseAccradit.refreshThePage += new FrmBaseAccraditation.RefreshThePage(refreshThePage);
|
||||
string guid = Guid.NewGuid().ToString();
|
||||
@@ -428,6 +431,8 @@ namespace Lskj.BaseAccraditation
|
||||
|
||||
FrmBaseAccraditation frmbaseAccradit = new FrmBaseAccraditation();
|
||||
frmbaseAccradit.SysModel = new DynamicBaseAccraditionPopModel(args);
|
||||
frmbaseAccradit.SysModel.DataCaches = new Dictionary<object, Hashtable>();
|
||||
if (SystemInfo.Instance.OptimizationSpeed) frmbaseAccradit.GetDataCaches(frmbaseAccradit.SysModel.DataCaches);
|
||||
frmbaseAccradit.Text = this.Text;
|
||||
|
||||
if (SystemInfo.Instance.PageOpen)
|
||||
@@ -451,7 +456,8 @@ namespace Lskj.BaseAccraditation
|
||||
DllName = "",
|
||||
Id = SysModel.ModuleId + "",
|
||||
Name = SysModel.FormText,
|
||||
BeforePage = ERPInfo.Instance.PageControl.SelectedTabPage
|
||||
BeforePage = ERPInfo.Instance.PageControl.SelectedTabPage,
|
||||
ModuleForm = frmbaseAccradit
|
||||
};
|
||||
frmbaseAccradit.refreshThePage += new FrmBaseAccraditation.RefreshThePage(refreshThePage);
|
||||
string guid = Guid.NewGuid().ToString();
|
||||
@@ -500,25 +506,4 @@ namespace Lskj.BaseAccraditation
|
||||
/// <para>创建日期:2021-11-23 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public void refreshThePage(string promptInformation, string id)
|
||||
{
|
||||
this.auditPanelObj.RefreshTabPage();
|
||||
if (!string.IsNullOrWhiteSpace(promptInformation)) MessageUtil.Show(promptInformation);
|
||||
//上一次点开page
|
||||
XtraTabPage beforePage = ERPInfo.Instance.ModuleForms[id].BeforePage;
|
||||
//要删除的page
|
||||
XtraTabPage removePage = new XtraTabPage();
|
||||
ERPInfo.Instance.ModuleForms.Remove(id);
|
||||
foreach (XtraTabPage tablepage in ERPInfo.Instance.PageControl.TabPages)
|
||||
{
|
||||
if (tablepage.Tag == null) continue;
|
||||
if (tablepage.Tag.ToString().Equals(id)) removePage = tablepage;
|
||||
if (tablepage == beforePage) ERPInfo.Instance.PageControl.SelectedTabPage = beforePage;
|
||||
}
|
||||
ERPInfo.Instance.PageControl.TabPages.Remove(removePage);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <para>修改��
|
||||
Reference in New Issue
Block a user