SVN r1089
SVN-Revision: r1089
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
******************************/
|
||||
using DevExpress.Utils;
|
||||
using DevExpress.Utils.Menu;
|
||||
using DevExpress.XtraGrid.Columns;
|
||||
using DevExpress.XtraGrid.Views.Base;
|
||||
using DevExpress.XtraGrid.Views.Grid;
|
||||
using DevExpress.XtraTab;
|
||||
@@ -97,7 +98,24 @@ namespace Lskj.Control.Model
|
||||
this.Model = model;
|
||||
this.ControlObj = control;
|
||||
|
||||
if ((table == null || table.Rows.Count == 0) && menu == null) return;
|
||||
//判断是否存在网址框(需要绑定右键打开事件判断是否生成 网址框右键)
|
||||
bool existLabWWW = false;
|
||||
if (view is GridControlEx)
|
||||
{
|
||||
GridControlEx grid= view as GridControlEx;
|
||||
foreach (GridColumn item in grid.GridView.Columns)
|
||||
{
|
||||
if (item.Tag is GridColumnModel)
|
||||
{
|
||||
GridColumnModel gridColumnModel = item.Tag as GridColumnModel;
|
||||
if (gridColumnModel.FieldType == ControlType.LabWWW) existLabWWW = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (((table == null || table.Rows.Count == 0) && menu == null)&& !existLabWWW) return;
|
||||
|
||||
ContextMenuStrip cmsMenu = new ContextMenuStrip();
|
||||
cmsMenu.Opening += new CancelEventHandler(MenuStripOpening);
|
||||
@@ -618,14 +636,32 @@ namespace Lskj.Control.Model
|
||||
|
||||
public bool OpenFrmcCover(GridRightMenuModel model, List<string> paramList)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(paramList[1]) || string.IsNullOrWhiteSpace(paramList[2]))
|
||||
|
||||
bool importIntoDatabase = false;
|
||||
if (string.IsNullOrWhiteSpace(paramList[0]) || paramList[0] + "" == "0")
|
||||
{
|
||||
MessageUtil.Show("模块编号或主键名称未配置");
|
||||
return false;
|
||||
//模式1,把导入的数据反写到主界面上
|
||||
if (string.IsNullOrWhiteSpace(paramList[1]) || string.IsNullOrWhiteSpace(paramList[2]))
|
||||
{
|
||||
MessageUtil.Show("模块编号或主键名称未配置");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//模式2,保存到数据库中,在执行保存后sql
|
||||
importIntoDatabase = true;
|
||||
if (string.IsNullOrWhiteSpace(paramList[1]) )
|
||||
{
|
||||
MessageUtil.Show("模块编号未配置");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string primaryKey = paramList[2];
|
||||
FrmCover frmCover = new FrmCover(paramList[1], paramList[2]);
|
||||
if (frmCover.ShowDialog() == DialogResult.OK)
|
||||
FrmCover frmCover = new FrmCover(importIntoDatabase,paramList[1], paramList[2], paramList[3]);
|
||||
if (frmCover.ShowDialog() == DialogResult.OK&& !importIntoDatabase)
|
||||
{
|
||||
//反写数据源
|
||||
DataTable ReverseData = frmCover.ReverseData;
|
||||
|
||||
@@ -72,14 +72,9 @@ namespace Lskj.Control.Model
|
||||
mQQArray.Add(item);
|
||||
}
|
||||
|
||||
if (model.FieldType == ControlType.LabWWW &&
|
||||
(rowValue.StartsWith("www.") ||
|
||||
rowValue.StartsWith("http://") ||
|
||||
rowValue.StartsWith("https://") ||
|
||||
rowValue.StartsWith("ftp://") ||
|
||||
rowValue.StartsWith("file://")))
|
||||
if (model.FieldType == ControlType.LabWWW && !string.IsNullOrWhiteSpace(rowValue))
|
||||
{
|
||||
ToolStripMenuItem item = new ToolStripMenuItem("(" + column.Caption + ")" + rowValue, Resources.qq);
|
||||
ToolStripMenuItem item = new ToolStripMenuItem("(" + column.Caption + ")" + rowValue, Resources.www);
|
||||
item.Tag = mSelectRow[column.Name] + "";
|
||||
item.Click += new EventHandler(BrowerItemClick);
|
||||
mBrowerArray.Add(item);
|
||||
|
||||
Reference in New Issue
Block a user