You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
|
using Mesnac.Controls.Base;
|
|
|
|
|
using Mesnac.Controls.Default;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using Mesnac.Codd.Session;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.Feeding.Qingquan.Technology
|
|
|
|
|
{
|
|
|
|
|
public class ReadOnlyRecipe : FeedingAction, IAction
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
|
|
|
{
|
|
|
|
|
base.RunIni(runtime); //必须调用
|
|
|
|
|
|
|
|
|
|
foreach (IBaseControl control in base.GetAllMCControls())
|
|
|
|
|
{
|
|
|
|
|
if (control.DbOptionType==DbOptionTypes.Modify && !String.IsNullOrEmpty(control.MCKey) && !control.MCKey.ToLower().Contains(".[objid]"))
|
|
|
|
|
{
|
|
|
|
|
control.MCEnabled = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
List<MCDataGridView> gridList = GetTControls<MCDataGridView>();
|
|
|
|
|
foreach (MCDataGridView grid in gridList)
|
|
|
|
|
{
|
|
|
|
|
grid.ReadOnly = true;
|
|
|
|
|
if (grid.ContextMenuStrip != null)
|
|
|
|
|
{
|
|
|
|
|
grid.ContextMenuStrip.Enabled = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|