/*******************************************************************************
* Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
* 类的信息:
* 1.程序名称:F_MST_0204.cs
* 2.功能描述:范围权限
* 编辑履历:
* 作者 日期 版本 修改内容
* 王鑫 2014/09/17 1.00 新建
*******************************************************************************/
using System;
using System.Data;
using System.Windows.Forms;
using Dongke.IBOSS.PRD.Basics.BaseControls;
using Dongke.IBOSS.PRD.Basics.BaseResources;
using Dongke.IBOSS.PRD.Basics.Library;
using Dongke.IBOSS.PRD.Client.CommonModule;
using Dongke.IBOSS.PRD.WCF.Proxys;
namespace Dongke.IBOSS.PRD.Client.SystemModule
{
///
/// 范围权限
///
public partial class F_MST_0204 : FormBase
{
#region 成员变量
// 传过来的用户ID
private int _userID;
// 页面的数据源
DataSet _userRightData;
// 是否是第一次加载页面
bool _isFirstLoad = true;
//查看工号权限
bool _viewUser = false; //默认是否选中
// 工号权限
bool _user = false; //默认是否选中
// 查看成型线
bool _viewGroutingLine = false;
// 操作成型线
bool _groutingLine = false;//
// 操作温湿度
bool _thermometer = false;
// 查看温湿度
bool _viewThermometer = false;
// 操作部门
bool _organization = false;
// 查看部门
bool _viewOrganization = false;
// 操作工序
bool _proceduce = false;
// 操作生产线
bool _productionline = false;
// 查看工序
bool _viewProceduce = false;
// 取消工序
bool _cancelProceduce = false;
// 取消生产线
bool _cancelProductionline = false;
// 查看生产线
bool _viewProductionline = false;
#endregion
#region 构造函数
public F_MST_0204()
{
InitializeComponent();
}
public F_MST_0204(int userID)
{
InitializeComponent();
this._userID = userID;
// 设置标题
this.Text = FormTitles.F_MST_0204;
// 工具栏按钮文本赋值
this.btnSave.Text = ButtonText.BTN_SAVE;
this.btnCancel.Text = ButtonText.BTN_CLOSE;
}
public F_MST_0204(int userID, string userCode)
{
InitializeComponent();
this._userID = userID;
// 设置标题
this.Text = FormTitles.F_MST_0204;
// 工具栏按钮文本赋值
this.btnSave.Text = ButtonText.BTN_SAVE;
this.btnCancel.Text = ButtonText.BTN_CLOSE;
this.lblUserCode.Text += userCode;
}
#endregion
#region 事件
///
/// 窗体加载事件
///
///
///
private void F_MST_0204_Load(object sender, EventArgs e)
{
try
{
// 保存按钮不可用
//this.btnSave.Enabled = false;
this._userRightData = (DataSet)DoAsync(new BaseAsyncMethod(this.GetUserRightData));
if (this._userRightData != null && this._userRightData.Tables.Count >= Constant.INT_IS_ZERO)
{
//查看业务部门树的生成
this.InitOrganizationTreeView(this._userRightData.Tables[0], true);
this.tvwViewOrganization.ExpandAll();
// 操作业务部门树的生成
this.InitOrganizationTreeView(this._userRightData.Tables[1], false);
this.tvwOrganization.ExpandAll();
// 设置DataGridView属性
this.dgvViewUser.AutoGenerateColumns = false;
this.dgvViewUser.Columns[5].ReadOnly = true;
// 工号权限的绑定
this.dgvViewUser.DataSource = this._userRightData.Tables[2];
// 设置DataGridView属性
this.dgvUser.AutoGenerateColumns = false;
this.dgvUser.Columns[5].ReadOnly = true;
// 工号权限的绑定
this.dgvUser.DataSource = this._userRightData.Tables[3];
// 设置DataGridView属性
this.dgvViewGroutingLine.AutoGenerateColumns = false;
this.dgvViewGroutingLine.Columns[3].ReadOnly = true;
// 查看成型线权限的绑定
this.dgvViewGroutingLine.DataSource = this._userRightData.Tables[4];
// 设置DataGridView属性
this.dgvGroutingLine.AutoGenerateColumns = false;
this.dgvGroutingLine.Columns[3].ReadOnly = true;
// 操作成型线权限的绑定
this.dgvGroutingLine.DataSource = this._userRightData.Tables[5];
// 生成查看生产线及工序树
InitGroutingLineTreeView(this._userRightData.Tables[6], this._userRightData.Tables[8]);
this.tvwGroutinProductionLine.ExpandAll();
InitGroutingLineTreeCKView(this._userRightData.Tables[7], this._userRightData.Tables[9]);
this.tvwGroutinProductionLineCK.ExpandAll();
// 撤销工序范围 InitCancelTreeCKView
DataTable dtCopy = this._userRightData.Tables[6].Copy();
dtCopy.TableName = "newtable";
foreach(DataRow dr in dtCopy.Rows)
{
dr["purviewtype"] = -99;
dr["RightFlag"] = 0;
}
dtCopy.AcceptChanges();
this._userRightData.Tables.Add(dtCopy);
InitCancelTreeCKView(dtCopy, this._userRightData.Tables[12]);
this.treeViewCancel.ExpandAll();
// 设置DataGridView属性
this.dgvViewThermometer.AutoGenerateColumns = false;
this.dgvViewThermometer.Columns[3].ReadOnly = true;
// 查看温湿计权限的绑定
this.dgvViewThermometer.DataSource = this._userRightData.Tables[10];
// 设置DataGridView属性
this.dgvThermometer.AutoGenerateColumns = false;
this.dgvThermometer.Columns[3].ReadOnly = true;
// 操作温湿计权限的绑定
this.dgvThermometer.DataSource = this._userRightData.Tables[11];
//绑定不限制复选框
BindFunctionCodeAll(this._userRightData);
}
this._isFirstLoad = false;
this.btnSave.Enabled = true;
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 绑定不限制复选框
///
private void BindFunctionCodeAll(DataSet dsRightData)
{
//查看部门权限
DataRow[] drViewOrg = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=1");
if (drViewOrg.Length > 0)
{
this._viewOrganization = true;
this.chkViewOrganizationFunctionCodeAll.Checked = true;
}
//操作部门权限
DataRow[] drOrg = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=2");
if (drOrg.Length > 0)
{
this._organization = true;
this.chkOrganizationFunctionCodeAll.Checked = true;
}
//查看工号范围权限
DataRow[] drViewUser = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=3");
if (drViewUser.Length > 0)
{
this._viewUser = true; //默认是有的
this.chkViewUserFunctionCodeAll.Checked = true;
}
//操作工号范围权限
DataRow[] drUser = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=4");
if (drUser.Length > 0)
{
this._user = true;
this.chkUserFunctionCodeAll1.Checked = true;
}
//查看成型线范围权限
DataRow[] drViewGroutingLine = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=5");
if (drViewGroutingLine.Length > 0)
{
this._viewGroutingLine = true;
this.chkViewGroutingLinerFunctionCodeAll.Checked = true;
}
//操作成型线范围权限
DataRow[] drGroutingLine = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=6");
if (drGroutingLine.Length > 0)
{
this._groutingLine = true;
this.chkGroutingLinerFunctionCodeAll.Checked = true;
}
//查看生产线范围权限
DataRow[] drViewProductionLine = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=7");
if (drViewProductionLine.Length > 0)
{
this._viewProductionline = true;
this.chkViewProductionlineFunctionCodeAll.Checked = true;
}
//查看工序 范围权限
DataRow[] drViewProceduce = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=9");
if (drViewProceduce.Length > 0)
{
this._viewProceduce = true;
this.chkViewProceduceFunctionCodeAll.Checked = true;
}
//操作生产线范围权限
DataRow[] drProductionLine = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=8");
if (drProductionLine.Length > 0)
{
this._productionline = true;
this.chkProductionlineFunctionCodeAll.Checked = true;
}
//操作工序范围权限
DataRow[] drProceduce = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=10");
if (drProceduce.Length > 0)
{
this._proceduce = true;
this.chkProceduceFunctionCodeAll.Checked = true;
}
//查看温湿计范围权限
DataRow[] drViewThermometer = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=11");
if (drViewThermometer.Length > 0)
{
this._viewThermometer = true;
this.chkViewThermometerFunctionCodeAll.Checked = true;
}
//操作温湿计范围权限
DataRow[] drThermometer = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=12");
if (drThermometer.Length > 0)
{
this._thermometer = true;
this.chkThermometerFunctionCodeAll.Checked = true;
}
//取消工序 范围权限
DataRow[] drCancelProceduce = dsRightData.Tables[13].Select("PurviewID=-1 and PurviewType=13");
if (drCancelProceduce.Length > 0)
{
this._cancelProceduce = true;
this.chkCancelProceduceFunctionCodeAll.Checked = true;
}
}
///
/// 窗体关闭时事件
///
///
///
private void F_MST_0204_FormClosing(object sender, FormClosingEventArgs e)
{
try
{
// 判断数据是否被修改过,修改过需要提示保存消息
if (DataJudge.IsChange(this._userRightData))
//if (this.btnSave.Enabled)
{
DialogResult result = MessageBox.Show(Messages.MSG_CMN_Q001, this.Text,
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
// 保存数据
btnSave_Click(sender, e);
}
else if (result == DialogResult.Cancel)
{
e.Cancel = true;
}
}
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 部门查看权限全选按钮事件
///
///
///
private void chkViewOrganizationChooseAll_CheckedChanged(object sender, EventArgs e)
{
this.CheckTreeview(this.tvwViewOrganization, this.chkViewOrganizationChooseAll.Checked);
}
///
/// 查看业务部门树形全部展开
///
///
///
private void btnViewOrganizationExpand_Click(object sender, EventArgs e)
{
this.tvwViewOrganization.ExpandAll();
}
///
/// 查看业务部门树形全部收缩
///
///
///
private void btnViewOrganizationCollapse_Click(object sender, EventArgs e)
{
this.tvwViewOrganization.CollapseAll();
}
///
/// 组织机构范围权限的子节点选择后,父节点自动选择
/// 父节点选择之后,子节点自动选择
/// 选择之后修改后台数据源
///
///
///
private void tvwViewOrganization_AfterCheck(object sender, TreeViewEventArgs e)
{
try
{
int purviewID = Convert.ToInt32(e.Node.Tag);
foreach (DataRow dataRow in _userRightData.Tables[0].Rows)
{
if (purviewID == Convert.ToInt32(dataRow["PurviewID"]))
{
dataRow["RightFlag"] = e.Node.Checked;
break;
}
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 窗体关闭
///
///
///
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
//保存按钮事件
private void btnSave_Click(object sender, EventArgs e)
{
try
{
this.btnSave.Enabled = false;
this.btnCancel.Enabled = false;
int returnAffectRows = (int)DoAsync(new BaseAsyncMethod(SaveUserRightInfo));
this.btnSave.Enabled = true;
this.btnCancel.Enabled = true;
if (returnAffectRows > Constant.INT_IS_ZERO)
{
this._userRightData.AcceptChanges();
//this.btnSave.Enabled = false;
// 提示信息
MessageBox.Show(string.Format(Messages.MSG_CMN_I001, "修改用户范围权限", "保存"),
this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Close();
}
else
{
// 提示信息
MessageBox.Show(string.Format(Messages.MSG_CMN_W001, "修改用户范围权限", "保存"),
this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
catch (Exception ex)
{
this.btnSave.Enabled = true;
this.btnCancel.Enabled = true;
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 操作部门树结点改变
///
///
///
private void tvwOrganization_AfterCheck(object sender, TreeViewEventArgs e)
{
try
{
int purviewID = Convert.ToInt32(e.Node.Tag);
foreach (DataRow dataRow in _userRightData.Tables[1].Rows)
{
if (purviewID == Convert.ToInt32(dataRow["PurviewID"]))
{
dataRow["RightFlag"] = e.Node.Checked;
break;
}
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
//
/// 操作业务部门树形全部选中或者全部取消选中
///
///
///
private void chkOrganizationChooseAll_CheckedChanged(object sender, EventArgs e)
{
this.CheckTreeview(this.tvwOrganization, this.chkOrganizationChooseAll.Checked);
}
///
/// 操作业务部门树形全部展开
///
///
///
private void btnOrganizationExpand_Click(object sender, EventArgs e)
{
this.tvwOrganization.ExpandAll();
}
///
/// 操作业务部门树形全部收缩
///
///
///
private void btnOrganizationCollapse_Click(object sender, EventArgs e)
{
this.tvwOrganization.CollapseAll();
}
///
/// 操作员范围选择发生改变,保存按钮状态
///
///
///
private void dgvUser_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 操作员范围权限全部选中或者取消
///
///
///
private void chkUserChooseAll_CheckedChanged(object sender, EventArgs e)
{
DataTable returnData = (DataTable)this.dgvViewUser.DataSource;
if (returnData != null)
{
int rightFlag = Convert.ToInt16(chkUserChooseAll.Checked);
for (int i = 0; i < returnData.Rows.Count; i++)
{
returnData.Rows[i]["RightFlag"] = rightFlag;
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
}
//
/// 操作员范围选择发生改变,保存按钮状态
///
///
///
private void dgvUser_CellValueChanged_1(object sender, DataGridViewCellEventArgs e)
{
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 工号范围权限复选框改变事件
///
///
///
private void chkUserChoose_CheckedChanged(object sender, EventArgs e)
{
DataTable returnData = (DataTable)this.dgvUser.DataSource;
if (returnData != null)
{
int rightFlag = Convert.ToInt16(chkUserChoose.Checked);
for (int i = 0; i < returnData.Rows.Count; i++)
{
returnData.Rows[i]["RightFlag"] = rightFlag;
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
}
///
/// 生产线单元格值改变
///
///
///
private void dgvViewGroutingLine_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 查看成型范围权限复选框事件
///
///
///
private void chkViewGroutingLineChooseAll_CheckedChanged(object sender, EventArgs e)
{
DataTable returnData = (DataTable)this.dgvViewGroutingLine.DataSource;
if (returnData != null)
{
int rightFlag = Convert.ToInt16(chkViewGroutingLineChooseAll.Checked);
for (int i = 0; i < returnData.Rows.Count; i++)
{
returnData.Rows[i]["RightFlag"] = rightFlag;
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
}
///
/// 操作成型生产线单元格值改变
///
///
///
private void dgvGroutingLine_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 操作成型生产线复选框选中事件
///
///
///
private void chkGroutingLineChooseAll_CheckedChanged(object sender, EventArgs e)
{
DataTable returnData = (DataTable)this.dgvGroutingLine.DataSource;
if (returnData != null)
{
int rightFlag = Convert.ToInt16(chkGroutingLineChooseAll.Checked);
for (int i = 0; i < returnData.Rows.Count; i++)
{
returnData.Rows[i]["RightFlag"] = rightFlag;
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
}
///
/// 操作生产线单元格值改变
///
///
///
private void dgvProductionLine_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 查看生产线及工序范围权限选中改变事件
///
///
///
private void tvwGroutinProductionLine_AfterCheck(object sender, TreeViewEventArgs e)
{
try
{
int purviewID = Convert.ToInt32(e.Node.Tag);
//起始为ProductionLine_为成型生产线,否则为工序
foreach (DataRow dataRow in (e.Node.Name.StartsWith("ProductionLine_") ? _userRightData.Tables[6].Rows : _userRightData.Tables[8].Rows))
{
if (purviewID == Convert.ToInt32(dataRow["PurviewID"]))
{
dataRow["RightFlag"] = e.Node.Checked;
break;
}
if (e.Node.Parent != null)
{
if (e.Node.Checked)
e.Node.Parent.Checked = true;
}
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 查看生产线及工序权限全选
///
///
///
private void chkProductionProceduceChooseAll_CheckedChanged(object sender, EventArgs e)
{
this.CheckTreeview(this.tvwGroutinProductionLine, this.chkProductionProceduceChooseAll.Checked);
}
///
/// 查看生产线及工序范围权限展开
///
///
///
private void btnViewProductionLineExpand_Click(object sender, EventArgs e)
{
this.tvwGroutinProductionLine.ExpandAll();
}
///
/// 查看生产线及工序范围权限收缩
///
///
///
private void btnProductionCollapse_Click(object sender, EventArgs e)
{
this.tvwGroutinProductionLine.CollapseAll();
}
///
/// 操作工序范围权限单元格值改变事件
///
///
///
private void dgvProcedure_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 温湿计查看权限改变后
///
///
///
private void dgvViewThermometer_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 温湿计范围权限改变后
///
///
///
private void dgvThermometer_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 操作工序范围选定值改变后
///
///
///
private void tvwGroutinProductionLineCK_AfterCheck(object sender, TreeViewEventArgs e)
{
try
{
int purviewID = Convert.ToInt32(e.Node.Tag);
//起始为ProductionLine_为成型生产线,否则为工序
foreach (DataRow dataRow in (e.Node.Name.StartsWith("ProductionLine_") ? _userRightData.Tables[7].Rows : _userRightData.Tables[9].Rows))
{
if (purviewID == Convert.ToInt32(dataRow["PurviewID"]))
{
dataRow["RightFlag"] = e.Node.Checked;
break;
}
if (e.Node.Parent != null)
{
if (e.Node.Checked)
e.Node.Parent.Checked = true;
}
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 操作工序范围权限全选改变事件
///
///
///
private void chkProcedureChooseAll_CheckedChanged(object sender, EventArgs e)
{
this.CheckTreeview(this.tvwGroutinProductionLineCK, this.chkProcedureChooseAll.Checked);
}
///
/// 操作工序展开所有节点
///
///
///
private void btnCKOpen_Click(object sender, EventArgs e)
{
this.tvwGroutinProductionLineCK.ExpandAll();
}
///
/// 操作工序折叠所有节点
///
///
///
private void btnCKClose_Click(object sender, EventArgs e)
{
this.tvwGroutinProductionLineCK.CollapseAll();
}
///
/// 查看温湿计复选框选中事件
///
///
///
private void cbThermometerVAll_CheckedChanged(object sender, EventArgs e)
{
DataTable returnData = (DataTable)this.dgvViewThermometer.DataSource;
if (returnData != null)
{
int rightFlag = Convert.ToInt16(cbThermometerVAll.Checked);
for (int i = 0; i < returnData.Rows.Count; i++)
{
returnData.Rows[i]["RightFlag"] = rightFlag;
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
}
///
/// 操作温湿计复选框选中事件
///
///
///
private void cbThermometerAll_CheckedChanged(object sender, EventArgs e)
{
DataTable returnData = (DataTable)this.dgvThermometer.DataSource;
if (returnData != null)
{
int rightFlag = Convert.ToInt16(cbThermometerAll.Checked);
for (int i = 0; i < returnData.Rows.Count; i++)
{
returnData.Rows[i]["RightFlag"] = rightFlag;
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
}
#endregion
#region 私有方法
/// 获取员工档案数据集
///
///
private DataSet GetUserRightData()
{
return SystemModuleProxy.Service.GetUserRightData(this._userID);
}
///
/// 根据取得的数据,生成部门树
///
///
/// 是否是查看部门
private void InitOrganizationTreeView(DataTable treeTable, bool isViewOrganization)
{
try
{
TreeNode node = null;
DataRow[] organizationRows = treeTable.Select
("OrganizationCode LIKE '0%' AND LEN(OrganizationCode) = 3");
// 递归生成功能权限树
this.InitTreeView(treeTable, organizationRows, node, isViewOrganization);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 递归创建部门树
///
///
///
///
private void InitTreeView(DataTable treeTable, DataRow[] rows, TreeNode node, bool isViewOrganization)
{
foreach (DataRow row in rows)
{
TreeNode sNode;
if (node == null)
{
sNode = new TreeNode();
sNode.Text = '[' + row["OrganizationCode"].ToString() + ']' + row["OrganizationName"].ToString();
sNode.Name = row["OrganizationCode"].ToString();
sNode.Tag = row["PurviewID"];
if (Convert.ToBoolean(row["RightFlag"]))
{
sNode.Checked = true;
}
if (isViewOrganization)
{
this.tvwViewOrganization.Nodes.Add(sNode);
}
else
{
this.tvwOrganization.Nodes.Add(sNode);
}
}
else
{
sNode = node.Nodes.Add('[' + row["OrganizationCode"].ToString() + ']' + row["OrganizationName"].ToString());
sNode.Name = row["OrganizationCode"].ToString();
sNode.Tag = row["PurviewID"];
if (Convert.ToBoolean(row["RightFlag"]))
{
sNode.Checked = true;
}
}
string filterExpression = "OrganizationCode LIKE '" + row["OrganizationCode"].ToString()
+ "%' AND LEN(OrganizationCode) = " + (row["OrganizationCode"].ToString().Length + 3);
DataRow[] subRows = treeTable.Select(filterExpression);
// 递归方法
InitTreeView(treeTable, subRows, sNode, isViewOrganization);
}
}
///
/// 将全部节点选择或者取消选中
///
///
///
private void CheckTreeview(TreeView treeView, bool flag)
{
TreeNodeCollection nodes = treeView.Nodes;
foreach (TreeNode node in nodes)
{
CheckSubNodes(node, flag);
}
}
///
/// 递归选中节点或者取消选中节点
///
///
///
private void CheckSubNodes(TreeNode treeNode, bool flag)
{
treeNode.Checked = flag;
foreach (TreeNode node in treeNode.Nodes)
{
CheckSubNodes(node, flag);
}
}
///
/// 保存用户范围权限
///
/// 更新数据影响的行数
private object SaveUserRightInfo()
{
try
{
if (chkViewOrganizationFunctionCodeAll.Checked || chkAll.Checked)
{
// 查看部门权限
if (this._userRightData.Tables[0].Select("PurviewID=-1 and PurviewType=1").Length == 0)
{
DataRow r1 = _userRightData.Tables[0].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 1;
r1["RightFlag"] = chkViewOrganizationFunctionCodeAll.Checked ? 1 : 0;
_userRightData.Tables[0].Rows.Add(r1);
_userRightData.Tables[0].AcceptChanges();
}
}
if (chkOrganizationFunctionCodeAll.Checked || chkAll.Checked)
{
// 操作部门权限
if (this._userRightData.Tables[1].Select("PurviewID=-1 and PurviewType=2").Length == 0)
{
DataRow r1 = _userRightData.Tables[1].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 2;
r1["RightFlag"] = 1;
_userRightData.Tables[1].Rows.Add(r1);
_userRightData.Tables[1].AcceptChanges();
}
}
if (chkViewUserFunctionCodeAll.Checked || chkAll.Checked)
{
// 查看工号权限
if (this._userRightData.Tables[2].Select("PurviewID=-1 and PurviewType=3").Length == 0)
{
DataRow r1 = _userRightData.Tables[2].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 3;
r1["RightFlag"] = 1;
_userRightData.Tables[2].Rows.Add(r1);
_userRightData.Tables[2].AcceptChanges();
}
}
if (chkUserFunctionCodeAll1.Checked || chkAll.Checked)
{
// 操作工号权限
if (this._userRightData.Tables[3].Select("PurviewID=-1 and PurviewType=4").Length == 0)
{
DataRow r1 = _userRightData.Tables[3].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 4;
r1["RightFlag"] = 1;
_userRightData.Tables[3].Rows.Add(r1);
_userRightData.Tables[3].AcceptChanges();
}
}
if (chkViewGroutingLinerFunctionCodeAll.Checked || chkAll.Checked)
{
// 查看成型线权限
if (this._userRightData.Tables[4].Select("PurviewID=-1 and PurviewType=5").Length == 0)
{
DataRow r1 = _userRightData.Tables[4].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 5;
r1["RightFlag"] = 1;
_userRightData.Tables[4].Rows.Add(r1);
_userRightData.Tables[4].AcceptChanges();
}
}
if (chkGroutingLinerFunctionCodeAll.Checked || chkAll.Checked)
{
// 操作成型线权限
if (this._userRightData.Tables[5].Select("PurviewID=-1 and PurviewType=6").Length == 0)
{
DataRow r1 = _userRightData.Tables[5].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 6;
r1["RightFlag"] = 1;
_userRightData.Tables[5].Rows.Add(r1);
_userRightData.Tables[5].AcceptChanges();
}
}
if (chkViewThermometerFunctionCodeAll.Checked || chkAll.Checked)
{
// 查看温湿度权限
if (this._userRightData.Tables[10].Select("PurviewID=-1 and PurviewType=11").Length == 0)
{
DataRow r1 = _userRightData.Tables[10].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 11;
r1["RightFlag"] = 1;
_userRightData.Tables[10].Rows.Add(r1);
_userRightData.Tables[10].AcceptChanges();
}
}
if (chkThermometerFunctionCodeAll.Checked || chkAll.Checked)
{
// 操作温湿度权限
if (this._userRightData.Tables[11].Select("PurviewID=-1 and PurviewType=12").Length == 0)
{
DataRow r1 = _userRightData.Tables[11].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 12;
r1["RightFlag"] = 1;
_userRightData.Tables[11].Rows.Add(r1);
_userRightData.Tables[11].AcceptChanges();
}
}
if (chkViewProductionlineFunctionCodeAll.Checked || chkAll.Checked)
{
// 查看生产线权限
if (this._userRightData.Tables[6].Select("PurviewID=-1 and PurviewType=7").Length == 0)
{
DataRow r1 = _userRightData.Tables[6].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 7;
r1["RightFlag"] = 1;
_userRightData.Tables[6].Rows.Add(r1);
_userRightData.Tables[6].AcceptChanges();
}
}
if (chkViewProceduceFunctionCodeAll.Checked || chkAll.Checked)
{
// 查看工序权限
if (this._userRightData.Tables[8].Select("PurviewID=-1 and PurviewType=9").Length == 0)
{
DataRow r1 = _userRightData.Tables[8].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 9;
r1["RightFlag"] = 1;
_userRightData.Tables[8].Rows.Add(r1);
_userRightData.Tables[8].AcceptChanges();
}
}
if (chkProductionlineFunctionCodeAll.Checked || chkAll.Checked)
{
// 操作生产线权限
if (this._userRightData.Tables[7].Select("PurviewID=-1 and PurviewType=8").Length == 0)
{
DataRow r1 = _userRightData.Tables[7].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 8;
r1["RightFlag"] = 1;
_userRightData.Tables[7].Rows.Add(r1);
_userRightData.Tables[7].AcceptChanges();
}
}
if (chkProceduceFunctionCodeAll.Checked || chkAll.Checked)
{
// 操作工序权限
if (this._userRightData.Tables[9].Select("PurviewID=-1 and PurviewType=10").Length == 0)
{
DataRow r1 = _userRightData.Tables[9].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 10;
r1["RightFlag"] = 1;
_userRightData.Tables[9].Rows.Add(r1);
_userRightData.Tables[9].AcceptChanges();
}
}
if (chkCancelProceduceFunctionCodeAll.Checked || chkAll.Checked)
{
// 取消工序权限
if (this._userRightData.Tables[12].Select("PurviewID=-1 and PurviewType=13").Length == 0)
{
DataRow r1 = _userRightData.Tables[12].NewRow();
r1["PurviewID"] = -1;
r1["PurviewType"] = 13;
r1["RightFlag"] = 1;
_userRightData.Tables[12].Rows.Add(r1);
_userRightData.Tables[12].AcceptChanges();
}
}
return SystemModuleProxy.Service.SaveUserRight(_userRightData, _userID);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 生成查看成型线树
///
///
///
private void InitGroutingLineTreeView(DataTable GroutingLineTable, DataTable ProductionLineTable)
{
foreach (DataRow row in GroutingLineTable.Rows)
{
TreeNode sNode;
sNode = new TreeNode();
sNode.Text = '[' + row["ProductionLineCode"].ToString() + ']' + row["ProductionLinename"].ToString();
sNode.Name = "ProductionLine_" + row["ProductionLineCode"].ToString();
sNode.Tag = row["PurviewID"];
if (Convert.ToBoolean(row["RightFlag"]))
{
sNode.Checked = true;
}
this.tvwGroutinProductionLine.Nodes.Add(sNode);
InitGroutingProductionTreeView(sNode, ProductionLineTable);
}
}
///
/// 加载查看工序树结点
///
///
///
private void InitGroutingLineTreeCKView(DataTable GroutingLineTable, DataTable ProductionLineTable)
{
foreach (DataRow row in GroutingLineTable.Rows)
{
TreeNode sNode;
sNode = new TreeNode();
sNode.Text = '[' + row["ProductionLineCode"].ToString() + ']' + row["ProductionLinename"].ToString();
sNode.Name = "ProductionLine_" + row["ProductionLineCode"].ToString();
sNode.Tag = row["PurviewID"];
if (Convert.ToBoolean(row["RightFlag"]))
{
sNode.Checked = true;
}
this.tvwGroutinProductionLineCK.Nodes.Add(sNode);
InitGroutingProductionTreeView(sNode, ProductionLineTable);
}
}
#region 取消工序
///
/// 加载查看工序树结点
///
///
///
private void InitCancelTreeCKView(DataTable GroutingLineTable, DataTable ProductionLineTable)
{
foreach (DataRow row in GroutingLineTable.Rows)
{
TreeNode sNode;
sNode = new TreeNode();
sNode.Text = '[' + row["ProductionLineCode"].ToString() + ']' + row["ProductionLinename"].ToString();
sNode.Name = "ProductionLine_" + row["ProductionLineCode"].ToString();
sNode.Tag = row["PurviewID"];
if (Convert.ToBoolean(row["RightFlag"]))
{
sNode.Checked = true;
}
// this.tvwGroutinProductionLineCK.Nodes.Add(sNode);
this.treeViewCancel.Nodes.Add(sNode);
InitCancelProcedureTreeView(sNode, ProductionLineTable);
}
}
///
/// 生成查看成工序树
///
///
///
private void InitCancelProcedureTreeView(TreeNode sNode, DataTable ProductionLineTable)
{
DataRow[] rows = ProductionLineTable.Select
("ProductionLineid=" + sNode.Tag.ToString());
foreach (DataRow row in rows)
{
TreeNode childNode;
childNode = sNode.Nodes.Add('[' + row["ProcedureCode"].ToString() + ']' + row["Procedurename"].ToString());
childNode.Name = "Procedure_" + row["ProcedureCode"].ToString();
childNode.Tag = row["PurviewID"];
if (Convert.ToBoolean(row["RightFlag"]))
{
childNode.Checked = true;
}
}
}
#endregion
///
/// 生成查看成工序树
///
///
///
private void InitGroutingProductionTreeView(TreeNode sNode, DataTable ProductionLineTable)
{
DataRow[] rows = ProductionLineTable.Select
("ProductionLineid=" + sNode.Tag.ToString());
foreach (DataRow row in rows)
{
TreeNode childNode;
childNode = sNode.Nodes.Add('[' + row["ProcedureCode"].ToString() + ']' + row["Procedurename"].ToString());
childNode.Name = "Procedure_" + row["ProcedureCode"].ToString();
childNode.Tag = row["PurviewID"];
if (Convert.ToBoolean(row["RightFlag"]))
{
childNode.Checked = true;
}
}
}
#endregion
///
/// 查看部门选中项改变事件
///
///
///
private void chkViewOrganizationFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看成型线
//if (!this.btnSave.Enabled)
//{
// // 自己按钮事件
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 操作部门选中项改变事件
///
///
///
private void chkOrganizationFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看成型线
//if (!this.btnSave.Enabled)
//{
// // 自己按钮事件
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 查看工号选中项改变事件
///
///
///
private void chkViewUserFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//// 自己按钮事件
//if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 操作工号选中项改变事件
///
///
///
private void chkUserFunctionCodeAll1_CheckedChanged(object sender, EventArgs e)
{
//// 自己按钮事件
//if (this.chkUserFunctionCodeAll1.Checked == this._user)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 查看成型线选中项改变事件
///
///
///
private void chkViewGroutingLinerFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//// 自己按钮事件
//if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 操作成型线选中项改变事件
///
///
///
private void chkGroutingLinerFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看成型线
//if (!this.btnSave.Enabled)
//{
// // 自己按钮事件
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 查看工序不限制事件
///
///
///
private void chkViewProceduceFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看成型线
//if (!this.btnSave.Enabled)
//{
// // 自己按钮事件
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 操作工序按钮事件
///
///
///
private void chkProceduceFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看成型线
//if (!this.btnSave.Enabled)
//{
// // 自己按钮事件
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 查看温湿度按钮事件
///
///
///
private void chkViewThermometerFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看成型线
//if (!this.btnSave.Enabled)
//{
// // 自己按钮事件
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 操作温湿度按钮事件
///
///
///
private void chkThermometerFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看成型线
//if (!this.btnSave.Enabled)
//{
// // 自己按钮事件
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
private void dgvUser_UserAddedRow(object sender, DataGridViewRowEventArgs e)
{
}
///
/// 查看生产线按钮事件
///
///
///
private void chkViewProductionlineFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//// 查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看成型线
//if (!this.btnSave.Enabled)
//{
// // 自己按钮事件
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
///
/// 操作生产线按钮事件
///
///
///
private void chkProductionlineFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// 操作生产线
// if (!this.btnSave.Enabled)
// {
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 操作工号
// if (!this.btnSave.Enabled)
// {
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 查看工号
// if (!this.btnSave.Enabled)
// {
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 查看成型线
// if (!this.btnSave.Enabled)
// {
// 自己按钮事件
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 操作成型线
// if (!this.btnSave.Enabled)
// {
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 操作温湿度
// if (!this.btnSave.Enabled)
// {
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 查看温湿度
// if (!this.btnSave.Enabled)
// {
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 查看部门
// if (!this.btnSave.Enabled)
// {
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 操作部门
// if (!this.btnSave.Enabled)
// {
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 查看工序
// if (!this.btnSave.Enabled)
// {
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 查看生产线
// if (!this.btnSave.Enabled)
// {
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// 取消工序
// if (!this.btnSave.Enabled)
// {
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
// }
// if (!this.btnSave.Enabled)
// {
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
// }
// this.btnSave.Enabled = true;
}
private void chkCancelProceduceChooseAll_CheckedChanged(object sender, EventArgs e)
{
this.CheckTreeview(this.treeViewCancel, this.chkCancelProceduceChooseAll.Checked);
}
private void chkCancelProceduceFunctionCodeAll_CheckedChanged(object sender, EventArgs e)
{
//// 取消工序
//if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
//{
// this.btnSave.Enabled = false;
//}
//else
//{
// this.btnSave.Enabled = true;
//}
//if (!this.btnSave.Enabled)
//{
// if (this.chkThermometerFunctionCodeAll.Checked == this._thermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 操作工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkUserFunctionCodeAll1.Checked == this._user)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 查看工号
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewUserFunctionCodeAll.Checked == this._viewUser)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看成型线
//if (!this.btnSave.Enabled)
//{
// // 自己按钮事件
// if (this.chkViewGroutingLinerFunctionCodeAll.Checked == this._viewGroutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作成型线
//if (!this.btnSave.Enabled)
//{
// if (this.chkGroutingLinerFunctionCodeAll.Checked == this._groutingLine)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看温湿度
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewThermometerFunctionCodeAll.Checked == this._viewThermometer)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewOrganizationFunctionCodeAll.Checked == this._viewOrganization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作部门
//if (!this.btnSave.Enabled)
//{
// if (this.chkOrganizationFunctionCodeAll.Checked == this._organization)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProceduceFunctionCodeAll.Checked == this._viewProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////查看生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkViewProductionlineFunctionCodeAll.Checked == this._viewProductionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkProceduceFunctionCodeAll.Checked == this._proceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
////操作生产线
//if (!this.btnSave.Enabled)
//{
// if (this.chkProductionlineFunctionCodeAll.Checked == this._productionline)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//// 取消工序
//if (!this.btnSave.Enabled)
//{
// if (this.chkCancelProceduceFunctionCodeAll.Checked == this._cancelProceduce)
// {
// this.btnSave.Enabled = false;
// }
// else
// {
// this.btnSave.Enabled = true;
// }
//}
//if (!this.btnSave.Enabled)
//{
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
private void btnCancelProductionLineExpand_Click(object sender, EventArgs e)
{
this.treeViewCancel.ExpandAll();
}
private void btnCancelProductionCollapse_Click(object sender, EventArgs e)
{
this.treeViewCancel.CollapseAll();
}
private void treeViewCancel_AfterCheck(object sender, TreeViewEventArgs e)
{
try
{
int purviewID = Convert.ToInt32(e.Node.Tag);
//起始为ProductionLine_为成型生产线,否则为工序
foreach (DataRow dataRow in (e.Node.Name.StartsWith("ProductionLine_") ? _userRightData.Tables[14].Rows : _userRightData.Tables[12].Rows))
{
if (purviewID == Convert.ToInt32(dataRow["PurviewID"]))
{
dataRow["RightFlag"] = e.Node.Checked;
break;
}
if (e.Node.Parent != null)
{
if (e.Node.Checked)
e.Node.Parent.Checked = true;
}
}
//if (!this._isFirstLoad)
//{
// // 保存按钮状态改变
// this.btnSave.Enabled = DataJudge.IsChange(this._userRightData);
//}
//this.btnSave.Enabled = true;
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
}
}