private void FShiftTargetYieldScheduleDetail_Load(object sender, EventArgs e)
        {
            _editInfo = this.BaseParam as ShiftTargetYieldSchedule_sty_Info;

            if (this.EditState == Common.DefineConstantValue.EditStateEnum.OE_Insert)
            {
                this.TabText = "新增 - " + this.Text;

                UserInputData insertInfo = new UserInputData();

                insertInfo.sty_cAreaName = this._editInfo.sty_cAreaName;

                proUserData.SelectedObject = insertInfo;

                SysToolBar.BtnSave_IsEnabled = true;
                insertInfo.GetSources();

            }
            else if (this.EditState == Common.DefineConstantValue.EditStateEnum.OE_Update)
            {
                this.TabText = "编辑 - " + this.Text;

                UserInputData showData = new UserInputData(_editInfo);

                showData.sty_cAreaName = this._editInfo.sty_cAreaName;

                proUserData.SelectedObject = showData;

                SysToolBar.BtnSave_IsEnabled = true;

            }
            else if (this.EditState == Common.DefineConstantValue.EditStateEnum.OE_ReaOnly)
            {
                this.TabText = "查看 - " + this.Text;

                UserInputData showData = new UserInputData(_editInfo);

                showData.sty_cAreaName = this._editInfo.sty_cAreaName;

                proUserData.SelectedObject = showData;

                SysToolBar.BtnSave_IsUsed = false;

            }

            //this.proUserData.SelectedGridItemChanged += new System.Windows.Forms.SelectedGridItemChangedEventHandler(this.proUserData_SelectedGridItemChanged);
        }
        public FShiftTargetYieldScheduleDetail()
        {
            InitializeComponent();

            proUserData.Font = ControlSetting.ListFont;
            try
            {
                this._shiftTargetYieldScheduleBL = MasterBLLFactory.GetBLL<IShiftTargetYieldScheduleBL>(MasterBLLFactory.ShiftTargetYieldSchedule);
                this.SysToolBar.OnItemSave_Click +=new SystemToolBar.ItemSave_Click(SysToolBar_OnItemSave_Click);
                this.SysToolBar.OnItemExit_Click += new SystemToolBar.ItemExit_Click(SysToolBar_OnItemExit_Click);

            }
            catch (Exception Ex)
            {

                throw Ex;
            }

            _editInfo = null;
        }
Exemplo n.º 3
0
        public FShiftTargetYieldSchedule()
        {
            InitializeComponent();
            this.lvArea.Font = ControlSetting.ListFont;
            this.lvMachines.Font = ControlSetting.ListFont;
            this.lvTargetYieldScheduleInfo.Font = ControlSetting.ListFont;
            try
            {
                this._shiftTargetYieldScheduleBL = MasterBLLFactory.GetBLL<IShiftTargetYieldScheduleBL>(MasterBLLFactory.ShiftTargetYieldSchedule);

                this._areaMasterBL = MasterBLLFactory.GetBLL<IAreaMasterBL>(MasterBLLFactory.AreaMaster);

                this._generalBL = GeneralBLLFactory.GetBLL<IGeneralBL>(GeneralBLLFactory.General);
            }
            catch (Exception Ex)
            {

                throw Ex;
            }

            _displayInfo = null;
        }
Exemplo n.º 4
0
        private void FShiftTargetYieldSchedule_Load(object sender, EventArgs e)
        {
            GetAreaList();

            this._displayInfo = new ShiftTargetYieldSchedule_sty_Info();
        }
Exemplo n.º 5
0
        private void SysToolBar_OnItemNew_Click(object sender, EventArgs e)
        {
            if (lvArea.SelectedItems.Count > 0)
            {
                MenuItem itemMenu = new MenuItem();

                itemMenu.Tag = "WindowUI.HBManagerTerminal.Management.OperationManagement.FShiftTargetYieldScheduleDetail";

                ShiftTargetYieldSchedule_sty_Info insertInfo = new ShiftTargetYieldSchedule_sty_Info();

                insertInfo.sty_cAreaID = new Guid(lvArea.SelectedItems[0].SubItems[0].Text);

                insertInfo.sty_cAreaName = lvArea.SelectedItems[0].SubItems[1].Text;

                insertInfo.sty_iTargetID = this._displayInfo.sty_iTargetID;

                insertInfo.sty_cTargetName = this._displayInfo.sty_cTargetName;

                BaseForm form = this.ShowSubForm(itemMenu, this.BaseDockPanel, string.Empty, WeifenLuo.WinFormsUI.Docking.DockState.Document, insertInfo, Common.DefineConstantValue.EditStateEnum.OE_Insert);
                form.FromCloseCallBack += GetAreaList;
            }
        }
Exemplo n.º 6
0
        private void ShowInfo()
        {
            if (lvTargetYieldScheduleInfo.SelectedItems.Count > 0)
            {
                this._displayInfo.sty_iRecordID = Convert.ToInt32(lvTargetYieldScheduleInfo.SelectedItems[0].SubItems[0].Text);

                MenuItem itemMenu = new MenuItem();

                itemMenu.Tag = "WindowUI.HBManagerTerminal.Management.OperationManagement.FShiftTargetYieldScheduleDetail";

                ShiftTargetYieldSchedule_sty_Info editInfo = new ShiftTargetYieldSchedule_sty_Info();

                editInfo = this._shiftTargetYieldScheduleBL.DisplayRecord(this._displayInfo) as ShiftTargetYieldSchedule_sty_Info;

                editInfo.sty_cAreaID = new Guid(lvArea.SelectedItems[0].SubItems[0].Text);

                editInfo.sty_cAreaName = lvArea.SelectedItems[0].SubItems[1].Text;

                editInfo.sty_cTargetName = this._displayInfo.sty_cTargetName;

                BaseForm form = this.ShowSubForm(itemMenu, this.BaseDockPanel, string.Empty, WeifenLuo.WinFormsUI.Docking.DockState.Document, editInfo, Common.DefineConstantValue.EditStateEnum.OE_ReaOnly);
                form.FromCloseCallBack += GetAreaList;
            }
        }
Exemplo n.º 7
0
        public bool InsertRecord(ShiftTargetYieldSchedule_sty_Info infoObject)
        {
            bool isSuccess = false;

            if (infoObject != null)
            {
                try
                {
                    using (MainDBDataContext db = new MainDBDataContext())
                    {
                        ShiftTargetYieldSchedule_sty insertData = Common.General.CopyObjectValue<ShiftTargetYieldSchedule_sty_Info, ShiftTargetYieldSchedule_sty>(infoObject);

                        db.ShiftTargetYieldSchedule_sty.InsertOnSubmit(insertData);

                        db.SubmitChanges();

                        isSuccess = true;
                    }
                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }

            return isSuccess;
        }
Exemplo n.º 8
0
        public bool UpdateRecord(ShiftTargetYieldSchedule_sty_Info infoObject)
        {
            bool isSuccess = false;

            if (infoObject != null)
            {
                try
                {
                    using (MainDBDataContext db = new MainDBDataContext())
                    {
                        ShiftTargetYieldSchedule_sty updateData = db.ShiftTargetYieldSchedule_sty.FirstOrDefault(t => t.sty_iRecordID == infoObject.sty_iRecordID);

                        if (updateData != null)
                        {
                            updateData.sty_cTargetType = infoObject.sty_cTargetType;

                            updateData.sty_iTargetID = infoObject.sty_iTargetID;

                            updateData.sty_iTargetYield = infoObject.sty_iTargetYield;

                            updateData.sty_iShiftTypeID = infoObject.sty_iShiftTypeID;

                            updateData.sty_cLast = infoObject.sty_cLast;

                            updateData.sty_dLastDate = infoObject.sty_dLastDate;

                            db.SubmitChanges();

                            isSuccess = true;
                        }
                    }
                }
                catch (Exception Ex)
                {

                    throw Ex;
                }

            }

            return isSuccess;
        }
            public UserInputData(ShiftTargetYieldSchedule_sty_Info showInfo)
            {
                this.sty_iRecordID = showInfo.sty_iRecordID;

                //this.sty_iShiftTypeID = showInfo.sty_iShiftTypeID;

                this.sty_iTargetYield = showInfo.sty_iTargetYield;

                this.sty_cAreaName = showInfo.sty_cAreaName;

                this.sty_iShiftTypeID = showInfo.sty_iShiftTypeID.ToString();
            }