SVN r1090
SVN-Revision: r1090
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using DevExpress.Utils;
|
||||
using DevExpress.XtraGrid.Columns;
|
||||
using DevExpress.XtraTab;
|
||||
using Lskj.Business;
|
||||
using Lskj.Business.Impl;
|
||||
@@ -63,6 +64,15 @@ namespace Lskj.Control.BrowserSetting
|
||||
outexception = null;
|
||||
outtrn = true;
|
||||
}
|
||||
else if (name == "SelectPro" && arguments.Length == 1)
|
||||
{
|
||||
CefProcessMessage cefProcessMessage = CefProcessMessage.Create("SelectPro");
|
||||
cefProcessMessage.Arguments.SetString(0, arguments[0].GetStringValue());
|
||||
V8Context.GetFrame().SendProcessMessage(CefProcessId.Browser, cefProcessMessage);
|
||||
outreturnValue = CefV8Value.CreateUndefined();
|
||||
outexception = null;
|
||||
outtrn = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
outreturnValue = null;
|
||||
@@ -283,4 +293,75 @@ namespace Lskj.Control.BrowserSetting
|
||||
mcpex.InitializeControl(new ModuleModel(MainImpl.GetSystemdllTab(moduleModel.SearchCondFormModuleCode)), null, null, true);
|
||||
if (StaticControl.ConditionsPanelDic.ContainsKey(args[4] + ""))
|
||||
{
|
||||
StaticControl.ConditionsPanelDic[args[4] + "
|
||||
StaticControl.ConditionsPanelDic[args[4] + ""].Dispose();
|
||||
StaticControl.ConditionsPanelDic[args[4] + ""] = mcpex;
|
||||
}
|
||||
else
|
||||
{
|
||||
StaticControl.ConditionsPanelDic.Add(args[4] + "", mcpex);
|
||||
}
|
||||
DialogResult dialogResult = mcpex.ShowDialog();
|
||||
}
|
||||
}
|
||||
ERPInfo.Instance.PageControl.TabPages.Add(tp);
|
||||
ERPInfo.Instance.PageControl.SelectedTabPage = tp;
|
||||
ERPInfo.Instance.ModuleForms.Add(guid, module);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(ex.InnerException != null ? ex.InnerException.Message : ex.Message);
|
||||
LogHelper.Instance.WriteError(ex);
|
||||
//LogUtil.WriteError("打开" + module.Name + "模块失败!", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void AddReturnRow(string rowdata)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(rowdata) && StaticControl.RightMenuGridView != null)
|
||||
{
|
||||
JObject rowObject = JsonConvert.DeserializeObject<JObject>(rowdata);
|
||||
JArray jArray = new JArray();
|
||||
jArray.Add(rowObject);
|
||||
DataTable dataTable = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(jArray));
|
||||
DataRow rowItem = dataTable.Rows[0];
|
||||
|
||||
DataTable gridTable = (StaticControl.RightMenuGridView.GridControl.DataSource as DataTable).TrimDeleteRows();
|
||||
if (gridTable == null) return;
|
||||
DataRow newRow = gridTable.NewRow();
|
||||
GridColumnCollection gridColumns = StaticControl.RightMenuGridView.Columns;
|
||||
StaticControl.RightMenuGridView.BeginDataUpdate();
|
||||
|
||||
// 赋值明细字段
|
||||
foreach (GridColumn col in gridColumns)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 未包含字段,则使用控件默认值.
|
||||
GridColumnModel model = col.Tag as GridColumnModel;
|
||||
string colFieldName = col.FieldName;
|
||||
if (!string.IsNullOrWhiteSpace(StaticControl.Comprefix) && colFieldName.Equals(StaticControl.Comprefix + "ProductId", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
colFieldName = colFieldName.Replace(StaticControl.Comprefix, "");
|
||||
}
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
if (rowItem.Table.Columns.Contains(colFieldName))
|
||||
{
|
||||
// 来源列中是否包含对应字段,包含则使用值
|
||||
newRow[col.FieldName] = rowItem[colFieldName];
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (rowItem.Table.Columns.Contains(colFieldName))
|
||||
{
|
||||
// 来源列中是否包含对应字段,包含则使用值
|
||||
newRow[col.FieldName] = rowItem[colFieldName];
|
||||
}
|
||||
if (model.LimitLength > 0)
|
||||
{
|
||||
DataRow HandleRow = newRow;
|
||||
|
||||
Reference in New Issue
Block a user