SVN r481
SVN-Revision: r481
This commit is contained in:
@@ -66,6 +66,10 @@ namespace Lskj.ProductPlatform
|
|||||||
/// 记录窗口位置
|
/// 记录窗口位置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private Point _mousePostion;
|
private Point _mousePostion;
|
||||||
|
/// <summary>
|
||||||
|
/// 机台信息
|
||||||
|
/// </summary>
|
||||||
|
private DataTable MachineInformation = new DataTable();
|
||||||
|
|
||||||
public FrmMain()
|
public FrmMain()
|
||||||
{
|
{
|
||||||
@@ -129,6 +133,7 @@ namespace Lskj.ProductPlatform
|
|||||||
DataTable mWorkTable = MainImpl.MesGetCJ();
|
DataTable mWorkTable = MainImpl.MesGetCJ();
|
||||||
DataRow[] rows = mWorkTable.Select(string.Format("mc = '{0}'", ERPInfo.Instance.WorkCJ));
|
DataRow[] rows = mWorkTable.Select(string.Format("mc = '{0}'", ERPInfo.Instance.WorkCJ));
|
||||||
DataTable table = MainImpl.MesGetJT(rows[0]["dm"] + "");
|
DataTable table = MainImpl.MesGetJT(rows[0]["dm"] + "");
|
||||||
|
MachineInformation = table.Copy();
|
||||||
// 车间列表
|
// 车间列表
|
||||||
//foreach (DataRow item in table.Rows)
|
//foreach (DataRow item in table.Rows)
|
||||||
//{
|
//{
|
||||||
@@ -198,6 +203,14 @@ namespace Lskj.ProductPlatform
|
|||||||
BaseImpl.HasExistsColumn(tableName, "PPTitle", "VARCHAR(100)");
|
BaseImpl.HasExistsColumn(tableName, "PPTitle", "VARCHAR(100)");
|
||||||
|
|
||||||
this.mMenuCode = string.IsNullOrEmpty(ERPInfo.Instance.WorkModid) ? BaseImpl.GetResult("select PPMenuCode from P_SystemTab") + "" : ERPInfo.Instance.WorkModid;
|
this.mMenuCode = string.IsNullOrEmpty(ERPInfo.Instance.WorkModid) ? BaseImpl.GetResult("select PPMenuCode from P_SystemTab") + "" : ERPInfo.Instance.WorkModid;
|
||||||
|
//如果机台配置了对应的模块号,就以机台的配置为准
|
||||||
|
if (MachineInformation.Rows.Count > 0&& MachineInformation.Columns.Contains("modid"))
|
||||||
|
{
|
||||||
|
DataRow dr = MachineInformation.Select("mc='" + ERPInfo.Instance.WorkJT + "'")[0];
|
||||||
|
if (dr != null&&!string.IsNullOrWhiteSpace(dr["modid"] + "")) this.mMenuCode = dr["modid"] + "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.lblTitle.Text = BaseImpl.GetResult("select PPTitle from P_SystemTab") + "";
|
this.lblTitle.Text = BaseImpl.GetResult("select PPTitle from P_SystemTab") + "";
|
||||||
string pageSize = BaseImpl.GetResult("select PPGridRowSize from P_SystemTab") + "";
|
string pageSize = BaseImpl.GetResult("select PPGridRowSize from P_SystemTab") + "";
|
||||||
|
|
||||||
@@ -222,6 +235,11 @@ namespace Lskj.ProductPlatform
|
|||||||
this.gcMain.GridView.RowHeight = this.gcDetail.GridView.RowHeight = this.gcAttach.GridView.RowHeight = this.gcRight.GridView.RowHeight = this.ModelObj.RowHeight > 0 ? this.ModelObj.RowHeight : 40;
|
this.gcMain.GridView.RowHeight = this.gcDetail.GridView.RowHeight = this.gcAttach.GridView.RowHeight = this.gcRight.GridView.RowHeight = this.ModelObj.RowHeight > 0 ? this.ModelObj.RowHeight : 40;
|
||||||
this.gcMain.GridView.ColumnPanelRowHeight = this.gcDetail.GridView.ColumnPanelRowHeight = this.gcAttach.GridView.ColumnPanelRowHeight = this.gcRight.GridView.ColumnPanelRowHeight = 40;
|
this.gcMain.GridView.ColumnPanelRowHeight = this.gcDetail.GridView.ColumnPanelRowHeight = this.gcAttach.GridView.ColumnPanelRowHeight = this.gcRight.GridView.ColumnPanelRowHeight = 40;
|
||||||
|
|
||||||
|
if (this.ModelObj.GridObjIsCheck == 1)//主表加载复选框
|
||||||
|
{
|
||||||
|
GridDragGrid.GridAddCheckBox(this.gcMain.GridView);
|
||||||
|
}
|
||||||
|
|
||||||
// Step 1. 获取模块配置信息
|
// Step 1. 获取模块配置信息
|
||||||
this.InitializeModule();
|
this.InitializeModule();
|
||||||
// Step 2. 获取附加配置信息
|
// Step 2. 获取附加配置信息
|
||||||
@@ -702,22 +720,29 @@ namespace Lskj.ProductPlatform
|
|||||||
{
|
{
|
||||||
if (button.Tag is GridRightMenuModel)
|
if (button.Tag is GridRightMenuModel)
|
||||||
{
|
{
|
||||||
DataRow focusedRow = this.gcMain.GridView.GetFocusedDataRow();
|
|
||||||
|
|
||||||
GridRightMenuModel model = button.Tag as GridRightMenuModel;
|
GridRightMenuModel model = button.Tag as GridRightMenuModel;
|
||||||
|
//DataRow focusedRow = this.gcMain.GridView.GetFocusedDataRow();
|
||||||
if (rowItem == null && !model.isStartRun)
|
//if (rowItem == null && !model.isStartRun)
|
||||||
|
//{
|
||||||
|
// MessageUtil.Show(ResourceKeys.SelectRowIsNull);
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
DataRow[] rowArray = gcMain.GetViewFocusedDataRows();
|
||||||
|
if (rowArray.Length==0 && !model.isStartRun)
|
||||||
{
|
{
|
||||||
MessageUtil.Show(ResourceKeys.SelectRowIsNull);
|
MessageUtil.Show(ResourceKeys.SelectRowIsNull);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BaseRightMenu menu = new BaseRightMenu();
|
BaseRightMenu menu = new BaseRightMenu();
|
||||||
menu.Model = this.DyncModel;
|
menu.Model = this.DyncModel;
|
||||||
if (menu.ExecRightMenu(model, new DataRow[] { focusedRow }) && model.Refresh)
|
if (menu.ExecRightMenu(model, rowArray) && model.Refresh)
|
||||||
{
|
{
|
||||||
this.SearchLastGrid();
|
this.SearchLastGrid();
|
||||||
}
|
}
|
||||||
|
//if (menu.ExecRightMenu(model, new DataRow[] { focusedRow }) && model.Refresh)
|
||||||
|
//{
|
||||||
|
// this.SearchLastGrid();
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user