/// <summary> /// Construct function /// </summary> public ReasonCodeCategoryCtrl() { InitializeComponent(); afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); GridViewHelper.SetGridView(gridViewCode); GridViewHelper.SetGridView(gridViewCodeCategory); }
/// <summary> /// Construct function /// </summary> public SampManageCtl(SampManage sp) { InitializeComponent(); afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); _sp = sp; if (null == _sp || _sp.SpName.Length < 1) { CtrlState = ControlState.New; } else { if (_sp.Status == EntityStatus.InActive) { CtrlState = ControlState.Edit; } else { CtrlState = ControlState.ReadOnly; } MapSampToControls(); } }
/// <summary> /// Construct function /// </summary> public EDCManageCtl(EdcManage edc) { InitializeComponent(); afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); _edc = edc; if (null == _edc || _edc.EdcName.Length < 1) { CtrlState = ControlState.New; FormatParamData(); } else { if (_edc.Status == EntityStatus.InActive) { CtrlState = ControlState.Edit; } else { CtrlState = ControlState.ReadOnly; } MapEdcAndParamToControls(_edc); } }
/// <summary> /// Construct function /// </summary> public ParamCtl(Param param) { InitializeComponent(); afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); _param = param; if (null == _param || _param.ParamKey.Length < 1) { CtrlState = ControlState.Empty; } else if (_param.ParamKey.Length > 1 && _param.ParamName == string.Empty) { CtrlState = ControlState.New; } else { if (_param.Status == EntityStatus.InActive) { CtrlState = ControlState.Edit; } else { CtrlState = ControlState.ReadOnly; } } if (!chkDerivation.Checked) { ParamDerivTabPage.PageVisible = false; } }
public LineConfCtrl(UdaEntity udaEntity, EntityType objectType) { InitializeComponent(); //this.gridDataView.DoubleClick += new System.EventHandler(this.gridDataView_DoubleClick); _objectEntity = udaEntity; _objCategory = objectType.ToString(); afterStateChanged += new AfterStateChanged(OnAfterStateChanged); if (_objectEntity.ObjectName.Length < 1) { _udaCommonControl = new UdaCommonControlEx(objectType, "", ""); _udaCommonControl.UserDefinedAttrs = _objectEntity.UserDefinedAttrsEx; State = ControlState.New; } else { _udaCommonControl = new UdaCommonControlEx(objectType, _objectEntity.ObjectKey, _objectEntity.LinkedToTable); MapAttributeToControl(); if (_objectEntity.Status == EntityStatus.InActive) { State = ControlState.Edit; } else { State = ControlState.ReadOnly; } } _udaCommonControl.Dock = DockStyle.Fill; UdaPanel.Controls.Add(_udaCommonControl); }
public ComputerConfCtrl(ComputerEntity computerEntity) { InitializeComponent(); _computerEntity = computerEntity; afterStateChanged += new AfterStateChanged(OnAfterStateChanged); if (_computerEntity.ComputerName.Length < 1) { _udaCommonControl = new UdaCommonControl(EntityType.Computer, ""); _udaCommonControl.UserDefinedAttrs = _computerEntity.UserDefinedAttrs; State = ControlState.New; } else { _udaCommonControl = new UdaCommonControl(EntityType.Computer, _computerEntity.CodeKey); MapComputerToControl(); if (_computerEntity.Status == EntityStatus.InActive) { State = ControlState.Edit; } else { State = ControlState.ReadOnly; } } _udaCommonControl.Dock = DockStyle.Fill; UdaPanel.Controls.Add(_udaCommonControl); }
public PartEditor(Part part) { InitializeComponent(); InitUIByResourceFile(); _part = part; BindDataForPartType(); afterStateChanged += new AfterStateChanged(OnAfterStateChanged); if (_part.PartName.Length < 1) { _udaCommonControl = new UdaCommonControl(EntityType.Part, ""); _udaCommonControl.UserDefinedAttrs = _part.UserDefinedAttrs; State = ControlState.New; } else { _udaCommonControl = new UdaCommonControl(EntityType.Part, _part.PartKey); MapPartToControls(); if (_part.Status == EntityStatus.InActive) { State = ControlState.Edit; } else { State = ControlState.ReadOnly; } } _udaCommonControl.Dock = DockStyle.Fill; panelUDACtrl.Controls.Add(_udaCommonControl); }
public ScheduleCtrl() { InitializeComponent(); afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); CtrlState = ControlState.ReadOnly; InitEmptyShiftDataSet(); }
private void EquipmentChangeReasons_Load(object sender, EventArgs e) { afterStateChanged += new AfterStateChanged(EquipmentChangeReasons_afterStateChanged); LoadEquipmentChangeStatesData(); State = ControlState.Read; }
/// <summary> /// 页面Load事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EquipmentGroups_Load(object sender, EventArgs e) { afterStateChanged += new AfterStateChanged(EquipmentGroups_afterStateChanged); //载入设备组信息到数据表 LoadEquipmentGroupsData(); //状态state改为Read State = ControlState.Read; }
/// <summary> /// 构造函数。 /// </summary> public BomMaterialBandCtrl() { InitializeComponent(); afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); InitializeLanguage(); GridViewHelper.SetGridView(gridViewCode); }
private void WorkOrderSetting_Load(object sender, EventArgs e) { afterStateChanged += new AfterStateChanged(OnAfterStateChanged); BindData2(); BindAllDataByKey(""); lblMenu.Text = "基础数据 > 工单管理 > 工单属性设置"; }
private Store _store = null; //线边仓对象 public StoreCtrl() { InitializeComponent(); //根据窗体状态,设定界面上的按钮是否可用 afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); //默认窗体状态为新增状态 CtrlState = ControlState.New; GridViewHelper.SetGridView(storeView); }
private void BasicPlanInputAim_Load(object sender, EventArgs e) { afterStateChanged += new AfterStateChanged(onChangeControlState); BindFactoryRoom(); BindLines(); BindQueryData(); InitGridView(); this.CtrlState = ControlState.ReadOnly; }
private void EquipmentStates_Load(object sender, EventArgs e) { afterStateChanged += new AfterStateChanged(EquipmentStates_afterStateChanged); //设备状态类型的数据绑定 LoadEquipmentStateTypeData(); //绑定数据表的数据为查询的设备状态数据表的数据 LoadEquipmentStatesData(); //state=Read State = ControlState.Read; }
public FormDictionaryUserDefinedType() { InitializeComponent(); unit = new DictionaryUserDefinedType(); _formSate = FormOperation.Empty; selectId = string.Empty; selectRow = -1; afterStateChanged += new AfterStateChanged(OnAfterStateChanged); }
private void AbnormalRules_Load(object sender, EventArgs e) { afterStateChanged += new AfterStateChanged(onChangeControlState); BindGv(); gridView1.SetMasterRowExpandedEx(0, 0, true); gridView1.SetMasterRowExpanded(1, true); //gridView1.SetMasterRowExpanded(2, true); }
public UdaCommonControlEx(EntityType entityType) { InitializeComponent(); SetLanguageInfoToControl(); afterStateChanged += new AfterStateChanged(OnAfterStateChanged); InitEmptyUserDefinedAttrDataSet(); _entityType = entityType; //get entity type }
public FormDrugCategory() { InitializeComponent(); unit = new DrugCategory(); _formSate = FormOperation.Empty; selectId = string.Empty; selectRow = -1; afterStateChanged += new AfterStateChanged(OnAfterStateChanged); }
public UdaCommonControlEx(EntityType entityType, string linkedItemKey) { InitializeComponent(); SetLanguageInfoToControl(); _entityType = entityType; //get entity type _linkedItemKey = linkedItemKey; //get linked item key(parent key) afterStateChanged += new AfterStateChanged(OnAfterStateChanged); InitEmptyUserDefinedAttrDataSet(); }
/// <summary> /// 构造函数。 /// </summary> public EDCPointCtl() { InitializeComponent(); //this.toolbarStatus.Enabled = false; //add by zxa 20110822 afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); CtrlState = ControlState.Empty; lblMenu.Text = "基础数据 > 抽检管理 > 抽检点"; GridViewHelper.SetGridView(gvEDCPoint); GridViewHelper.SetGridView(gvHistoryResults); GridViewHelper.SetGridView(gvHistoryResultRelation); }
/// <summary> /// 界面加载时加载事件 /// </summary> private void LineSetting_Load(object sender, EventArgs e) { afterStateChanged += new AfterStateChanged(OnAfterStateChanged); //绑定工序下拉数据 BindOperationList(); //绑定子线下拉数据 BindSubLineList(); //绑定子线别信息 GetSubLineInfo(string.Empty); }
public ScheduleCtrl(Schedule schedule) { InitializeComponent(); _schedule = schedule; afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); if (_schedule.ScheduleKey == string.Empty) { CtrlState = ControlState.ReadOnly; InitEmptyShiftDataSet(); } else { CtrlState = ControlState.Edit; BindDataToControl(); _schedule.IsInitializeFinished = true; } }
private void SPControlPlan_Load(object sender, EventArgs e) { afterStateChanged += new AfterStateChanged(onChangeControlState); DataTable dtProperties = new BasePowerSetEntity().GetBasicPowerSetEngine_CommonData(string.Empty).Tables[BASE_ATTRIBUTE_FIELDS.DATABASE_TABLE_NAME]; DataTable dtDecaySetting = dtProperties.Clone(); DataRow[] drs01 = dtProperties.Select(string.Format("Column_type='{0}'", BASE_POWERSET.BASE_DECAYSETTING)); foreach (DataRow dr in drs01) { dtDecaySetting.ImportRow(dr); } repositoryItemlue_dname.DisplayMember = "Column_Name"; repositoryItemlue_dname.ValueMember = "Column_code"; repositoryItemlue_dname.DataSource = dtDecaySetting; InitDataBind(); this.CtrlState = ControlState.ReadOnly; }
private void BasicCertificationSet_Load(object sender, EventArgs e) { this._afterStateChanged += OnAfterStateChanged; this.State = ControlState.ReadOnly; BindCertificationType(); if (_dt == null) { _dt = new DataTable(); _dt.Columns.Add("CERTIFICATION_KEY", typeof(string)); _dt.Columns.Add("CERTIFICATION_TYPE", typeof(string)); _dt.Columns.Add("CERTIFICATION_DATE", typeof(DateTime)); _dt.Columns.Add("VERSION", typeof(int)); _dt.Columns.Add("CREATOR", typeof(string)); _dt.Columns.Add("CREATE_TIME", typeof(DateTime)); _dt.Columns.Add("EDITOR", typeof(string)); _dt.Columns.Add("EDIT_TIME", typeof(DateTime)); _dt.Columns.Add("IS_USED", typeof(string)); gcCertification.DataSource = _dt; } }
public UserManagementCtrl(User userEntity) { InitializeComponent(); GridViewHelper.SetGridView(this.userView); _userEntity = userEntity; afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); DataSet dataSet = new DataSet(); if (_userEntity.UserKey != "") { CtrlState = ControlState.Edit; dataSet = _userEntity.GetUserInfo(); if (dataSet.Tables[0].Rows.Count > 0) { _userEntity.Badge = dataSet.Tables[0].Rows[0][RBAC_USER_FIELDS.FIELD_BADGE].ToString(); _userEntity.Password = dataSet.Tables[0].Rows[0][RBAC_USER_FIELDS.FIELD_PASSWORD].ToString(); _userEntity.Email = dataSet.Tables[0].Rows[0][RBAC_USER_FIELDS.FIELD_EMAIL].ToString(); _userEntity.OfficePhone = dataSet.Tables[0].Rows[0][RBAC_USER_FIELDS.FIELD_OFFICE_PHONE].ToString(); _userEntity.MobilePhone = dataSet.Tables[0].Rows[0][RBAC_USER_FIELDS.FIELD_MOBILE_PHONE].ToString(); _userEntity.Remark = dataSet.Tables[0].Rows[0][RBAC_USER_FIELDS.FIELD_REMARK].ToString(); _userEntity.Editor = dataSet.Tables[0].Rows[0][RBAC_USER_FIELDS.FIELD_EDITOR].ToString(); _userEntity.EditTimeZone = dataSet.Tables[0].Rows[0][RBAC_USER_FIELDS.FIELD_EDIT_TIMEZONE].ToString(); this.txtUserName.Text = _userEntity.UserName; this.txtBadge.Text = _userEntity.Badge; this.txtPsw.Text = _userEntity.Password; this.txtPswAffirm.Text = this.txtPsw.Text; this.txtEmail.Text = _userEntity.Email; this.txtOfficePhone.Text = _userEntity.OfficePhone; this.txtMobilePhone.Text = _userEntity.MobilePhone; this.txtRemark.Text = _userEntity.Remark; _userEntity.IsInitializeFinished = true; } } else { CtrlState = ControlState.New; } }
public EnterpriseCtrl(EnterpriseEntity enterprise) { InitializeComponent(); afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); _enterprise = enterprise; if (null == _enterprise || _enterprise.EnterpriseKey.Length < 1) { return; } else if (_enterprise.EnterpriseKey.Length > 1 && _enterprise.EnterpriseName == string.Empty) { CtrlState = ControlState.New; } else { MapEnterpriseToControls(); if (_enterprise.Status == EntityStatus.InActive) { CtrlState = ControlState.Edit; } else { CtrlState = ControlState.Read; } } _enterprise.GetMaxVerRoute(ref routeTable, null); grdCtrlRoute.MainView = gridViewRoute; grdCtrlRoute.DataSource = routeTable; GridViewHelper.SetGridView(gridViewEnterprise); GridViewHelper.SetGridView(gridViewRoute); lblMenu.Text = "基础数据 > 流程管理 > 工艺组"; }
/// <summary> /// construtor with entity----Location /// </summary> /// <param name="location"></param> public LocationCtrl(LocationEntity location) { InitializeComponent(); SetLanguageInfoToControl(); //initialize afterstatechanged afterStateChanged += new AfterStateChanged(OnAfterStateChanged); //bind data to look up edit control int parentLevel = 2; if (location != null) { Int32.TryParse(location.ParentLocationLevel, out parentLevel); } if (!BindDataToLookUpEditContol(parentLevel)) { if (this.ParentForm != null) { this.ParentForm.Close(); } } //check if (location == null) { //set control state State = ControlState.New; } else { _locationEntity = location; //map information to control MapEntityToControl(_locationEntity); //set control state //set control state State = ControlState.Edit; } }
/// <summary> /// 构造函数。 /// </summary> public ByProductPartCtrl() { InitializeComponent(); afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); InitializeLanguage(); }
public FormDictionaryDosage() { InitializeComponent(); afterStateChanged += new AfterStateChanged(OnAfterStateChanged); }