基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
/***********************
|
||||
* 说明:日程控件右键菜单配置
|
||||
* 创建人:龚宇超
|
||||
* 创建日期:2018-03-27
|
||||
* 修改人:
|
||||
* 修改日期:
|
||||
* 修改备注:
|
||||
* 版本:1.0.0.0
|
||||
***********************/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using DevExpress.XtraScheduler;
|
||||
using DevExpress.Utils.Menu;
|
||||
using Lskj.Util;
|
||||
using System.Data;
|
||||
|
||||
namespace Lskj.Control.Model.MenuStrip
|
||||
{
|
||||
/// <summary>
|
||||
/// Class AppointmentMenuStrip.
|
||||
/// </summary>
|
||||
public class AppointmentMenuStrip : BaseRightMenu
|
||||
{
|
||||
/// <summary>
|
||||
/// 日程任务条
|
||||
/// </summary>
|
||||
protected Appointment AppointmentObj;
|
||||
/// <summary>
|
||||
/// 日程数据对象
|
||||
/// </summary>
|
||||
protected SchedulerStorage SchedulerControlObj;
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:设置日程右键菜单</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-03-27</para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="view">数据资源.</param>
|
||||
/// <param name="appointment">任务对象</param>
|
||||
/// <param name="table">数据表名.</param>
|
||||
/// <param name="model">模型</param>
|
||||
/// <param name="control"></param>
|
||||
/// <param name="menu"></param>
|
||||
/// <param name="e">获取popmenu 对象 <see cref="PopupMenuShowingEventArgs"/> instance containing the event data.</param>
|
||||
public void SetRightMenus(SchedulerStorage view, Appointment appointment, System.Data.DataTable table, Lskj.Model.DynamicModel model, MyControl control = null, System.Windows.Forms.ContextMenuStrip menu = null, PopupMenuShowingEventArgs e = null)
|
||||
{
|
||||
Model = model;
|
||||
SchedulerControlObj = view as SchedulerStorage;
|
||||
AppointmentObj = appointment;
|
||||
//动态添加菜单
|
||||
for (int i = 0; i < table.Rows.Count; i++)
|
||||
{
|
||||
GridRightMenuModel menuModel = new GridRightMenuModel(table.Rows[i]);
|
||||
DXMenuItem updateItem = new SchedulerMenuItem(menuModel.MenuName);
|
||||
updateItem.Tag = menuModel;
|
||||
updateItem.Click += new EventHandler(MenuStripItemClick);
|
||||
updateItem.BeginGroup = true;
|
||||
e.Menu.Items.Add(updateItem);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:获取选中行</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-03-27</para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
protected override DataRow[] GetSelectedRows()
|
||||
{
|
||||
DataRow dr = AppointmentObj.GetRow(SchedulerControlObj) as DataRow;
|
||||
DataRow[] drSelect = { dr };
|
||||
return drSelect;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user