Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.26 KB | None | 0 0
  1.   private void WakeUpFormulaForm(DataRow row)
  2.         {
  3.             string expression = LibSysUtils.ToString(row["Remark"]);
  4.             IErpClientService erpClientService = LibServiceProvider.TryGetService<IErpClientService>();
  5.             if (erpClientService == null)
  6.             {
  7.                 return;
  8.             }
  9.             IDataSourceModel dataSource = ModelManager.DataSourceManager.GetDataSource(base.ProgId);
  10.             LibDataTable[] dataTablesStruct = ModelManager.DataSourceManager.GetDataTablesStruct(dataSource);
  11.             SmartFormulaEventArgs smartFormulaArgs = SmartFormulaEventArgs.GetSmartFormulaArgs(base.ProgId, "SetFormula", expression, SyntaxViewState.Browse);//SetFormula DoFormProcedure 識別用tag
  12.             smartFormulaArgs.Parser = new CommonDataTableComputer(base.FOrgId, dataSource, dataTablesStruct, 0, LibUcoSystem.Instance);
  13.             smartFormulaArgs.SyntaxType = SyntaxType.Advance;
  14.             smartFormulaArgs.ViewState = (this.IsBrowsing ? SyntaxViewState.Browse : SyntaxViewState.Edit);
  15.             smartFormulaArgs.Option.SqlMode = false;
  16.             smartFormulaArgs.ValidTableIndex = dataSource.DefineDataTables.Count - 1;
  17.             erpClientService.SetSmartFormula(base.FormInstance, smartFormulaArgs);
  18.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement