예제 #1
0
 /// <summary>
 /// Construct function
 /// </summary>
 public ReasonCodeCategoryCtrl()
 {
     InitializeComponent();
     afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged);
     GridViewHelper.SetGridView(gridViewCode);
     GridViewHelper.SetGridView(gridViewCodeCategory);
 }
예제 #2
0
        /// <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();
            }
        }
예제 #3
0
        /// <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);
            }
        }
예제 #4
0
        /// <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;
            }
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
        }
예제 #8
0
 public ScheduleCtrl()
 {
     InitializeComponent();
     afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged);
     CtrlState          = ControlState.ReadOnly;
     InitEmptyShiftDataSet();
 }
예제 #9
0
        private void EquipmentChangeReasons_Load(object sender, EventArgs e)
        {
            afterStateChanged += new AfterStateChanged(EquipmentChangeReasons_afterStateChanged);

            LoadEquipmentChangeStatesData();

            State = ControlState.Read;
        }
예제 #10
0
 /// <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;
 }
예제 #11
0
        /// <summary>
        /// 构造函数。
        /// </summary>
        public BomMaterialBandCtrl()
        {
            InitializeComponent();

            afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged);
            InitializeLanguage();
            GridViewHelper.SetGridView(gridViewCode);
        }
예제 #12
0
        private void WorkOrderSetting_Load(object sender, EventArgs e)
        {
            afterStateChanged += new AfterStateChanged(OnAfterStateChanged);
            BindData2();
            BindAllDataByKey("");

            lblMenu.Text = "基础数据 > 工单管理 > 工单属性设置";
        }
예제 #13
0
        private Store _store = null;    //线边仓对象

        public StoreCtrl()
        {
            InitializeComponent();
            //根据窗体状态,设定界面上的按钮是否可用
            afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged);
            //默认窗体状态为新增状态
            CtrlState = ControlState.New;
            GridViewHelper.SetGridView(storeView);
        }
예제 #14
0
 private void BasicPlanInputAim_Load(object sender, EventArgs e)
 {
     afterStateChanged += new AfterStateChanged(onChangeControlState);
     BindFactoryRoom();
     BindLines();
     BindQueryData();
     InitGridView();
     this.CtrlState = ControlState.ReadOnly;
 }
예제 #15
0
 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);
        }
예제 #17
0
        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);
        }
예제 #18
0
        public UdaCommonControlEx(EntityType entityType)
        {
            InitializeComponent();
            SetLanguageInfoToControl();

            afterStateChanged += new AfterStateChanged(OnAfterStateChanged);

            InitEmptyUserDefinedAttrDataSet();
            _entityType = entityType;         //get entity type
        }
예제 #19
0
        public FormDrugCategory()
        {
            InitializeComponent();

            unit               = new DrugCategory();
            _formSate          = FormOperation.Empty;
            selectId           = string.Empty;
            selectRow          = -1;
            afterStateChanged += new AfterStateChanged(OnAfterStateChanged);
        }
예제 #20
0
        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();
        }
예제 #21
0
        /// <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);
        }
예제 #22
0
        /// <summary>
        /// 界面加载时加载事件
        /// </summary>
        private void LineSetting_Load(object sender, EventArgs e)
        {
            afterStateChanged += new AfterStateChanged(OnAfterStateChanged);

            //绑定工序下拉数据
            BindOperationList();

            //绑定子线下拉数据
            BindSubLineList();

            //绑定子线别信息
            GetSubLineInfo(string.Empty);
        }
예제 #23
0
 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;
     }
 }
예제 #24
0
        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;
        }
예제 #25
0
        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;
            }
        }
예제 #26
0
        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;
            }
        }
예제 #27
0
        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 = "基础数据 > 流程管理 > 工艺组";
        }
예제 #28
0
        /// <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;
            }
        }
예제 #29
0
 /// <summary>
 /// 构造函数。
 /// </summary>
 public ByProductPartCtrl()
 {
     InitializeComponent();
     afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged);
     InitializeLanguage();
 }
예제 #30
0
        public FormDictionaryDosage()
        {
            InitializeComponent();

            afterStateChanged += new AfterStateChanged(OnAfterStateChanged);
        }