Beispiel #1
0
        private void InitializeScreenMode()
        {
            if (String.IsNullOrEmpty(m_MasterNo))
            {
                // New mode.
                m_screenMode = eMode.ADD;
                CtrlUtil.EnabledControl(true, btnSearchMasterNo, txtPartNo, txtMasterNo, dtStartEffDate, numPrice, cboCurrency, txtRemark);
                CtrlUtil.EnabledControl(false, txtCustomerName, txtPartNo);

                LookupData();

                tsbSaveAndNew.Enabled   = true;
                tsbSaveAndClose.Enabled = true;

                CtrlUtil.FocusControl(txtMasterNo);
            }
            else
            {
                // Edit mode.
                m_screenMode = eMode.EDIT;
                CtrlUtil.EnabledControl(true, numPrice, txtRemark);
                CtrlUtil.EnabledControl(false, btnSearchMasterNo, txtPartNo, txtMasterNo, txtCustomerName, dtStartEffDate, txtPartNo, cboCurrency);

                tsbSaveAndNew.Enabled   = true;
                tsbSaveAndClose.Enabled = true;

                CtrlUtil.FocusControl(numPrice);
            }
        }
Beispiel #2
0
        private void InitialScreen()
        {
            InitialSpread();
            InitialComboBox();
            InitialFormat();
            dmcShip.AddControl(chkCancelInvoice);
            dmcShip.AddControl(lblTransactionNo);
            dmcShip.AddControl(txtDeliveryNo);
            dmcShip.AddControl(cboCustomerCode);
            dmcShip.AddControl(txtFullAddress);
            dmcShip.AddControl(txtInvoiceNo);
            dmcShip.AddControl(dtInvoiceDate);
            dmcShip.AddControl(cboTermOfPayment);
            dmcShip.AddControl(dtPaymentDueDate);
            dmcShip.AddControl(txtReferTemNo);
            dmcShip.AddControl(txtRemark);
            dmcShip.AddControl(txtSubTotal);
            dmcShip.AddControl(txtVat);
            dmcShip.AddControl(txtVatTotal);
            dmcShip.AddControl(txtTotal);

            CtrlUtil.EnabledControl(false, lblTransactionNo, txtTotal, txtSubTotal);

            txtDeliveryNo.KeyPress    += CtrlUtil.SetNextControl;
            cboCustomerCode.KeyPress  += CtrlUtil.SetNextControl;
            txtInvoiceNo.KeyPress     += CtrlUtil.SetNextControl;
            dtInvoiceDate.KeyPress    += CtrlUtil.SetNextControl;
            cboTermOfPayment.KeyPress += CtrlUtil.SetNextControl;
            dtPaymentDueDate.KeyPress += CtrlUtil.SetNextControl;
            txtReferTemNo.KeyPress    += CtrlUtil.SetNextControl;
            txtRemark.KeyPress        += CtrlUtil.SetNextControl;

            //ClearAllControl();

            if (m_Mode == Common.eScreenMode.ADD)
            {
                SysConfigBIZ sysBiz        = new SysConfigBIZ();
                SysConfigDTO argScreenInfo = new SysConfigDTO();
                argScreenInfo.SYS_GROUP_ID = DataDefine.eSYSTEM_CONFIG.TRN350.SYS_GROUP_ID;
                argScreenInfo.SYS_KEY      = (NZString)DataDefine.eSYSTEM_CONFIG.TRN350.SYS_KEY.DEFAULT_DATE.ToString();
                dtInvoiceDate.Value        = sysBiz.GetDefaultDateForScreen(argScreenInfo);
            }
            if (m_Mode != Common.eScreenMode.ADD)
            {
                dmcShip.LoadData(m_uidm);
                LoadShipList();
            }

            CheckCurrentInvPeriod();

            //m_keyboardSpread = new KeyboardSpread(fpCustomerOrder);
            //m_keyboardSpread.RowAdding += m_keyboardSpread_RowAdding;
            //m_keyboardSpread.RowAdded += m_keyboardSpread_RowAdded;
            //m_keyboardSpread.RowRemoved += m_keyboardSpread_RowRemoved;

            //if (m_Mode != Common.eScreenMode.VIEW)
            //{
            //    m_keyboardSpread.StartBind();
            //}
        }
Beispiel #3
0
        private void TRN103_FGSelection_Load(object sender, EventArgs e)
        {
            InitializeMenuButton();
            InitialFormat();
            InitialSpread();
            InitialDefaultValue();
            InitialData();

            CtrlUtil.EnabledControl(false, txtItemNo, txtPartNo, txtRemainQty, txtQty);

            loadData();

            /* Atipan C. Modify
             *
             * // Get all data
             * DeliveryBIZ bizDelivery = new DeliveryBIZ();
             * List<ActualOnhandViewDTO> listDTO = bizDelivery.Load_LotMaintenance(SlipNo, LocCd, ItemCd, false);
             * m_Data = DTOUtility.ConvertListToDataTable<ActualOnhandViewDTO>(listDTO);
             * m_Data.Columns.Add(CONST_COLUMN_NAME_CHECK_FLAG, typeof(int));
             *
             *
             * m_Data = OrderData(m_Data);
             *
             * // Filter
             * loadData();
             */
        }
Beispiel #4
0
        private void Lot_Maintenance_Load(object sender, EventArgs e)
        {
            InitializeMenuButton();
            InitialFormat();
            InitialDefaultValue();
            InitialSpread();
            //loadData();
            //CtrlUtil.EnabledControl(false, txtItemDesc);

            //CtrlUtil.EnabledControl(true, txtItemCode);
            //CtrlUtil.EnabledControl(true, txtLocation);
            //SetScreenMode(Common.eScreenMode.ADD);
            //dmc.AddRangeControl(txtMasterNo, txtItemDesc, dtPeriodBegin,dtPeriodEnd);

            txtMasterNo.KeyPress += CtrlUtil.SetNextControl;
            //btnItemCode.KeyPress += CtrlUtil.SetNextControl;
            txtItemDesc.KeyPress   += CtrlUtil.SetNextControl;
            dtPeriodBegin.KeyPress += CtrlUtil.SetNextControl;
            dtPeriodEnd.KeyPress   += CtrlUtil.SetNextControl;

            CtrlUtil.EnabledControl(false, txtItemDesc);
            //CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.LOT_NO);
            //CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.ON_HAND_QTY);
            //CtrlUtil.SpreadSetColumnsLocked(shtView, false, (int)eColumns.Shipment);
        }
Beispiel #5
0
        private void InitializeScreenMode()
        {
            if (String.IsNullOrEmpty(m_locationCode))
            {
                // New mode.
                m_screenMode = eMode.ADD;
                CtrlUtil.EnabledControl(true, txtDealingCode, txtDealingName, cboDealingType, cboTermOfPayment, chkAllowNegative);
                CtrlUtil.EnabledControl(true, txtAddr1Address1, txtAddr1Address2, txtAddr1Address3, txtAddr1Tel, txtAddr1Fax, txtAddr1Email, txtAddr1ContactPerson, txtAddr1Remark);
                CtrlUtil.EnabledControl(true, txtAddr2Address1, txtAddr2Address2, txtAddr2Address3, txtAddr2Tel, txtAddr2Fax, txtAddr2Email, txtAddr2ContactPerson, txtAddr2Remark);
                CtrlUtil.EnabledControl(true, txtAddr3Address1, txtAddr3Address3, txtAddr3Address3, txtAddr3Tel, txtAddr3Fax, txtAddr3Email, txtAddr3ContactPerson, txtAddr3Remark);

                LookupData();
                tbShipTo.SelectedTab    = tpAddress1;
                tsbSaveAndNew.Enabled   = true;
                tsbSaveAndClose.Enabled = true;
            }
            else
            {
                // Edit mode.
                m_screenMode = eMode.EDIT;
                CtrlUtil.EnabledControl(true, txtDealingName, cboDealingType, cboTermOfPayment, chkAllowNegative);
                CtrlUtil.EnabledControl(true, txtAddr1Address1, txtAddr1Address2, txtAddr1Address3, txtAddr1Tel, txtAddr1Fax, txtAddr1Email, txtAddr1ContactPerson, txtAddr1Remark);
                CtrlUtil.EnabledControl(true, txtAddr2Address1, txtAddr2Address2, txtAddr2Address3, txtAddr2Tel, txtAddr2Fax, txtAddr2Email, txtAddr2ContactPerson, txtAddr2Remark);
                CtrlUtil.EnabledControl(true, txtAddr3Address1, txtAddr3Address3, txtAddr3Address3, txtAddr3Tel, txtAddr3Fax, txtAddr3Email, txtAddr3ContactPerson, txtAddr3Remark);
                CtrlUtil.EnabledControl(false, txtDealingCode);

                tsbSaveAndNew.Enabled   = true;
                tsbSaveAndClose.Enabled = true;
            }
        }
Beispiel #6
0
        private void SetScreenMode(eScreenMode mode)
        {
            switch (mode)
            {
            case eScreenMode.ADD:
                CtrlUtil.EnabledControl(true, dtWorkResultDate, cboShiftCls);
                CtrlUtil.EnabledControl(true, txtItemCode, btnItemCode);
                CtrlUtil.EnabledControl(false, txtPartNo, txtCustomerName);
                CtrlUtil.EnabledControl(true, evoComboBox1, txtRemark);
                CtrlUtil.EnabledControl(true, txtLotNo, btnGenerate);
                CtrlUtil.EnabledControl(false, txtTotalQty);

                m_keyboardSpread.StartBind();

                shtView.OperationMode = OperationMode.Normal;

                CtrlUtil.FocusControl(dtWorkResultDate);
                CtrlUtil.SpreadSetColumnsLocked(shtView, false, (int)eColView.CHECKBOX);
                CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColView.PACK_NO);
                CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColView.LOT_NO);
                CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColView.EXTERNAL_LOT_NO);
                CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColView.ONHAND_QTY);

                tsbSaveAndNew.Enabled   = true;
                tsbSaveAndClose.Enabled = true;

                break;
            }

            m_screenMode = mode;
        }
Beispiel #7
0
        private void UpdateButtonMoveEnable()
        {
            int rowIndex = shtScreen.ActiveRowIndex;
            int rowCount = shtScreen.RowCount;

            if (rowCount == 0 || rowIndex < 0 || (rowIndex == 0 && rowCount == 1))
            {
                CtrlUtil.EnabledControl(false, btnMoveUp, btnMoveDown);
                return;
            }

            if (rowIndex == 0)
            {
                CtrlUtil.EnabledControl(false, btnMoveUp);
                CtrlUtil.EnabledControl(true, btnMoveDown);
            }
            else if (rowIndex == rowCount - 1)
            {
                CtrlUtil.EnabledControl(true, btnMoveUp);
                CtrlUtil.EnabledControl(false, btnMoveDown);
            }
            else
            {
                CtrlUtil.EnabledControl(true, btnMoveUp);
                CtrlUtil.EnabledControl(true, btnMoveDown);
            }
        }
Beispiel #8
0
        protected void MAS051_ReigsterBOM_Load(object sender, EventArgs e)
        {
            txtItemCode.KeyPress      += CtrlUtil.SetNextControl;
            txtItemDesc.KeyPress      += CtrlUtil.SetNextControl;
            txtUpperQty.KeyPress      += CtrlUtil.SetNextControl;
            txtLowerQty.KeyPress      += CtrlUtil.SetNextControl;
            cboOrderLoc.KeyPress      += CtrlUtil.SetNextControl;
            chkChildOrderLoc.KeyPress += CtrlUtil.SetNextControl;
            cboMRPFlag.KeyPress       += CtrlUtil.SetNextControl;
            chkMRPFlag.KeyPress       += CtrlUtil.SetNextControl;

            cboOrderLoc.Format += Common.ComboBox_Format;
            cboMRPFlag.Format  += Common.ComboBox_Format;

            txtUpperQty.PathValue = 1;
            txtLowerQty.PathValue = 1;

            CtrlUtil.EnabledControl(false, txtParentItemCode, txtParentItemDesc, txtItemDesc);
            CtrlUtil.EnabledControl(true, txtItemCode, txtUpperQty, txtLowerQty, cboOrderLoc, cboMRPFlag);

            LookupDataBIZ m_bizLookupData = new LookupDataBIZ();
            LookupData    locationData    = m_bizLookupData.LoadLookupLocation();

            cboOrderLoc.LoadLookupData(locationData);
            cboOrderLoc.SelectedIndex = -1;

            LookupData lookupMRPFlag = m_bizLookupData.LoadLookupClassType(DataDefine.MRP_FLAG.ToNZString());

            cboMRPFlag.LoadLookupData(lookupMRPFlag);
            cboMRPFlag.SelectedIndex = -1;

            chkChildOrderLoc_CheckedChanged(this, null);
            chkMRPFlag_CheckedChanged(this, null);
        }
Beispiel #9
0
        private void loadData()
        {
            tsbSave.Enabled   = false;
            tsbCancel.Enabled = false;
            tsbEdit.Enabled   = false;
            CtrlUtil.EnabledControl(false, txtChrData);
            shtView.ActiveSkin = Common.ACTIVE_SKIN;


            try
            {
                SystemConfigController  ctlsys = new SystemConfigController();
                SystemConfigurationUIDM model  = ctlsys.LoadSysConfig();

                //List<SysConfigDTO> dto = ctlsys.LoadSysConfig();
                //m_dtAllData = DTOUtility.ConvertListToDataTable(dto);
                //DataTable dtView = m_dtAllData.Clone();
                //foreach (DataRow dr in m_dtAllData.Rows)
                //{
                //    dtView.ImportRow(dr);
                //}

                fpView.DataSource = model.DATA_VIEW;
                CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColumns));

                for (int i = 0; i < shtView.Rows.Count; i++)
                {
                    if (Convert.ToInt32(shtView.Cells[i, (int)eColumns.EDIT_FLAG].Value) == 1)
                    {
                        shtView.Cells[i, (int)eColumns.EDIT_FLAG].Value = true;
                    }
                    else
                    {
                        shtView.Cells[i, (int)eColumns.EDIT_FLAG].Value = false;
                    }
                }

                //if ((shtView.Rows.Count > 0)&& (Convert.ToBoolean(shtView.Cells[0, (int)eColumns.EDIT_FLAG].Value)==true))
                // {
                //     txtSysGroupId.Text = Convert.ToString(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.SYS_GROUP_ID].Value);
                //     txtSysKey.Text = Convert.ToString(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.SYS_KEY].Value);
                //     txtChrData.Text = Convert.ToString(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.CHAR_DATA].Value);
                //     tsbEdit.Enabled = true;
                // }

                if (shtView.RowCount > 0)
                {
                    shtView.ActiveRowIndex = 0;
                    shtView.AddSelection(0, 0, 1, 1);

                    shtView.SetActiveCell(0, 0);
                    fpView.ShowActiveCell(VerticalPosition.Top, HorizontalPosition.Left);
                    fpView_SelectionChanged(null, null);
                }
            }
            catch (Exception ex)
            {
                MessageDialog.ShowBusiness(this, ex.Message);
            }
        }
Beispiel #10
0
        private void InitializeScreen()
        {
            InitializeSpread();
            InitialFormat();

            //txt.KeyPress += CommonLib.CtrlUtil.SetRestrictKeyInput;
            //txtSearch.KeyPress += CommonLib.CtrlUtil.SetRestrictKeyInput;
            //txtSearch.TextChanged += CommonLib.CtrlUtil.FilterRestrictChar;

            dtPeriodBegin.KeyPress += CtrlUtil.SetNextControl;
            dtPeriodEnd.KeyPress   += CtrlUtil.SetNextControl;

            dtPeriodBegin.Format = Common.CurrentUserInfomation.DateFormatString;
            dtPeriodEnd.Format   = Common.CurrentUserInfomation.DateFormatString;

            CtrlUtil.EnabledControl(false, txtAmount, txtAmountTHB, txtQty);

            InventoryPeriodBIZ biz = new InventoryPeriodBIZ();
            InventoryPeriodDTO dto = biz.LoadCurrentPeriodWithQueryRange();

            if (dto != null)
            {
                dtPeriodBegin.Value = dto.PERIOD_BEGIN_DATE.StrongValue;
                dtPeriodEnd.Value   = dto.PERIOD_END_DATE.StrongValue;
            }
        }
Beispiel #11
0
        private void InitializeScreen()
        {
            // Load lookup combobox data.
            LookupData();

            // Binding event to control.
            txtUserAccount.KeyPress        += CtrlUtil.SetNextControl;
            txtUsername.KeyPress           += CtrlUtil.SetNextControl;
            cboDefaultDateFormat.KeyPress  += CtrlUtil.SetNextControl;
            cboDefaultLang.KeyPress        += CtrlUtil.SetNextControl;
            txtCurrentPassword.KeyPress    += CtrlUtil.SetNextControl;
            txtNewPassword.KeyPress        += CtrlUtil.SetNextControl;
            txtConfirmNewPassword.KeyPress += CtrlUtil.SetNextControl;


            // Binding Model
            dmcUserProfile.AddRangeControl(
                txtUserAccount,
                txtUsername,
                txtNewPassword,
                txtConfirmNewPassword,
                cboDefaultDateFormat,
                cboDefaultLang,
                txtCurrentPassword
                );

            Map <string, object> mapData   = m_prcUserProfile.LoadUserProfile(Common.CurrentUserInfomation.UserCD);
            UserProfileUIDM      dataModel = mapData.ExtractValue <UserProfileUIDM>(UserProfileController.C_VAL_MODEL);

            dmcUserProfile.LoadData(dataModel);

            // Startup Enable/Disable control.
            CtrlUtil.EnabledControl(false, txtUserAccount);
            CtrlUtil.EnabledControl(true, txtUsername, txtNewPassword, txtConfirmNewPassword, cboDefaultDateFormat, cboDefaultLang, txtCurrentPassword);
        }
Beispiel #12
0
        private void InitializeScreen()
        {
            //CheckCurrentInvPeriod();

            InitializeComboBox();
            InitializeSpread();
            InitializeLookupData();
            InitialData();

            CtrlUtil.EnabledControl(false, txtPartNo, txtCustomerName, txtTotalQty);
            FormatUtil.SetNumberFormat(txtTotalQty, FormatUtil.eNumberFormat.Qty_PCS);

            InitlializeBindingControl();
            InitializeKeyPress();


            if (m_editTransactionID == null)
            {
                ClearAll();
                SetScreenMode(eScreenMode.ADD);
                InitialData();
            }

            CheckCurrentInvPeriod();
        }
Beispiel #13
0
        private void EnableLotControl()
        {
            //Clear Lot
            CtrlUtil.ClearControlData(txtPackNo, txtLotNo, txtCustomerLotNo, txtFGNo);

            if (cboStoredLoc.SelectedIndex < 0)
            {
                return;
            }

            //----- Enable Customer Lot No ------//
            DealingConstraintDTO constriant = null;

            string strProcess = cboStoredLoc.SelectedValue.ToString();

            constriant = bizConstraint.LoadDealingConstraint(strProcess.ToNZString());

            if (constriant != null && constriant.ENABLE_LOT_FLAG.StrongValue == 1)
            {
                CtrlUtil.EnabledControl(rdoIncrease.Checked, txtLotNo, txtCustomerLotNo, txtFGNo);
                CtrlUtil.EnabledControl(true, btnLotNo);
            }
            else
            {
                CtrlUtil.EnabledControl(false, txtLotNo, btnLotNo, txtCustomerLotNo, txtFGNo);
            }
        }
Beispiel #14
0
        private void LoadScreens(NZString menuSubCD)
        {
            // Show screen list of selected MenuSub.
            DataTable dtView = m_menuRegisterController.LoadScreenFromMenuSub(menuSubCD);

            fpScreen.DataSource = dtView;
            CtrlUtil.EnabledControl(true, fpScreen);
        }
Beispiel #15
0
 private void tsbEdit_Click(object sender, EventArgs e)
 {
     tsbEdit.Enabled   = false;
     tsbSave.Enabled   = true;
     tsbCancel.Enabled = true;
     fpView.Enabled    = false;
     CtrlUtil.EnabledControl(true, txtChrData);
 }
Beispiel #16
0
        private void InitialScreen()
        {
            InitialSpread();

            txtItemCD.KeyPress += CtrlUtil.SetNextControl;

            CtrlUtil.EnabledControl(false, txtItemDesc);
            CtrlUtil.EnabledControl(true, txtItemCD, btnItemCD, fpView);
        }
Beispiel #17
0
 private void InitialScreen()
 {
     ClearData(true);
     InitialSpread();
     CtrlUtil.EnabledControl(false, txtPartName);
     rdoTagTypeFG.Checked     = true;
     txtNumberofCopies.Double = 1;
     txtPartNo.Focus();
     txtPartNo.Select();
 }
Beispiel #18
0
 private void chkToEndMonth_CheckedChanged(object sender, EventArgs e)
 {
     if (chkToEndMonth.Checked)
     {
         CtrlUtil.EnabledControl(true, dtPeriodEnd);
     }
     else
     {
         CtrlUtil.EnabledControl(false, dtPeriodEnd);
     }
 }
Beispiel #19
0
        private void InitialScreen()
        {
            //txtFilter.KeyPress += CommonLib.CtrlUtil.SetRestrictKeyInput;
            //txtFilter.KeyUp += CommonLib.CtrlUtil.FilterRestrictChar;

            // add search button
            tsbSearch       = new ToolStripButton("Refresh");
            tsbSearch.Image = Forms.Properties.Resources.REFRESH;
            tslControl.Items.Insert(0, tsbSearch);
            tsbSearch.Click += tsbSearch_Click;

            // add Export Cost button
            tsbExportCost       = new ToolStripButton("Export Cost");
            tsbExportCost.Image = Forms.Properties.Resources.EXPORT;
            tslControl.Items.Add(tsbExportCost);
            tsbExportCost.Click += new EventHandler(tsbExportCost_Click);

            //Disable function
            tsbExportCost.Visible = false;

            chkToEndMonth.Checked = false;
            CtrlUtil.EnabledControl(false, dtPeriodEnd);

            shtView.ActiveSkin = Common.ACTIVE_SKIN;
            MapSpreadData();

            LookupDataBIZ bizLookup = new LookupDataBIZ();

            switch (Common.CurrentUserInfomation.DateFormat)
            {
            case eDateFormat.YMD:
                dtPeriodBegin.Format = "yyyy/MM";
                break;

            case eDateFormat.MDY:
            case eDateFormat.DMY:
                dtPeriodBegin.Format = "MM/yyyy";
                break;
            }

            dtPeriodEnd.Format = Common.CurrentUserInfomation.DateFormatString;

            rdoGroupItem.Checked = true;
            LoadDefaultPeriod();

            LookupDataBIZ biz = new LookupDataBIZ();

            LookupData locationLookupData = biz.LoadLookupLocation();

            shtView.Columns[(int)eColView.CUSTOMER_CD].CellType = CtrlUtil.CreateReadOnlyPairCellType(locationLookupData);


            LoadData(dtPeriodBegin.NZValue, dtPeriodEnd.NZValue, txtFilter.Text.Trim(), false);
        }
Beispiel #20
0
        private void InitializeScreen()
        {
            shtScreen.ActiveSkin = Common.ACTIVE_SKIN;
            CtrlUtil.MappingDataFieldWithEnum(shtScreen, typeof(eColScreen));

            ReloadMenuSetTree();
            trvMenu.ExpandAll();

            CtrlUtil.EnabledControl(false, fpScreen);
            CtrlUtil.EnabledControl(true, trvMenu);
        }
Beispiel #21
0
        private void SetScreenMode(eScreenMode screenMode)
        {
            switch (screenMode)
            {
            case eScreenMode.VIEW:
                CtrlUtil.EnabledControl(false, txtItemDesc);
                break;

            default:
                break;
            }
        }
Beispiel #22
0
        private void InitialScreen()
        {
            txtFileName.Clear();

            CtrlUtil.EnabledControl(false, dtpLastSTKDate, txtLastPreProcessBy, txtLastRemark);
            CtrlUtil.EnabledControl(false, txtFileName);

            CtrlUtil.EnabledControl(true, btnBrowse, btnClearAll);
            CtrlUtil.EnabledControl(false, btnImport);

            LoadLastStockTaking();
        }
Beispiel #23
0
        private void cboStoredLoc_TextChanged(object sender, EventArgs e)
        {
            if (string.Empty.Equals(cboStoredLoc.Text))
            {
                txtOnhandQty.Decimal = 0;
                txtAdjustQty.Decimal = !(string.Empty.Equals(txtAdjustWeight.Text.Trim())) ? 0 : txtAdjustQty.Decimal;

                //Clear Lot
                CtrlUtil.ClearControlData(txtPackNo, txtLotNo, txtCustomerLotNo, txtFGNo);
                CtrlUtil.EnabledControl(false, txtLotNo, btnLotNo, txtCustomerLotNo, txtFGNo);
            }
        }
Beispiel #24
0
 private void tsbEdit_Click(object sender, EventArgs e)
 {
     tsbEdit.Enabled   = false;
     tsbAdd.Enabled    = false;
     tsbDelete.Enabled = false;
     tsbSave.Enabled   = true;
     tsbCancel.Enabled = true;
     fpView.Enabled    = false;
     CtrlUtil.EnabledControl(true, txtClsDesc);
     CtrlUtil.EnabledControl(true, txtSEQ);
     AddCheck = 1;
 }
Beispiel #25
0
        private void InitialScreen()
        {
            dtpStockTakingDate.KeyPress += CtrlUtil.SetNextControl;
            txtRemark.KeyPress          += CtrlUtil.SetNextControl;

            picWaiting.Visible = false;

            dtpLastSTKDate.Format     = Common.CurrentUserInfomation.DateFormatString;
            dtpStockTakingDate.Format = Common.CurrentUserInfomation.DateFormatString;

            CtrlUtil.EnabledControl(false, txtYearMonth, dtpLastSTKDate, txtLastPreProcessBy, txtLastRemark);

            LoadCurrentStockTakingData();
        }
Beispiel #26
0
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            string strFilePath = SaveDialogUtil.GetBrowseFileDialog("Please select import file.", CONST_STR_IMPORT_FILE_TYPE);

            if (string.Empty.Equals(strFilePath))
            {
                CtrlUtil.EnabledControl(!string.Empty.Equals(txtFileName.Text.Trim()), btnImport);

                return;
            }

            txtFileName.Text = strFilePath;
            CtrlUtil.EnabledControl(true, btnImport);
        }
Beispiel #27
0
        /// <summary>
        /// ปรังปรุงการ เปิด/ปิดของปุ่มเลื่อนค่า Seq
        /// </summary>
        private void UpdateUpDownButton()
        {
            int rowIndex = shtView.ActiveRowIndex;

            if (shtView.RowCount == 0 || rowIndex < 0)
            {
                CtrlUtil.EnabledControl(false, btnMoveDown, btnMoveUp);
                return;
            }

            BOMSetupViewDTO dto   = ((BOMNode)shtView.Rows[shtView.ActiveRowIndex].Tag).DTO;
            List <BOMNode>  nodes = GetNodes(dto.UPPER_ITEM_CD.StrongValue, dto.LOWER_ITEM_CD.StrongValue);

            BOMNode node = null;

            if (nodes != null && nodes.Count > 0)
            {
                node = nodes[0];
            }

            if (node == null)
            {
                CtrlUtil.EnabledControl(false, btnMoveDown, btnMoveUp);
                return;
            }

            if (node.Parent == null)
            {
                CtrlUtil.EnabledControl(false, btnMoveUp, btnMoveDown);
                return;
            }

            if (node.Equals(node.Parent.FirstNode))
            {
                CtrlUtil.EnabledControl(false, btnMoveUp);
            }
            else
            {
                CtrlUtil.EnabledControl(true, btnMoveUp);
            }

            if (node.Equals(node.Parent.LastNode))
            {
                CtrlUtil.EnabledControl(false, btnMoveDown);
            }
            else
            {
                CtrlUtil.EnabledControl(true, btnMoveDown);
            }
        }
Beispiel #28
0
 private void fpView_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (Convert.ToBoolean(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.EDIT_FLAG].Value) == true)
     {
         tsbEdit.Enabled = true;
     }
     else
     {
         tsbEdit.Enabled = false;
     }
     CtrlUtil.EnabledControl(false, txtChrData);
     txtSysGroupId.Text = Convert.ToString(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.SYS_GROUP_ID].Value);
     txtSysKey.Text     = Convert.ToString(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.SYS_KEY].Value);
     txtChrData.Text    = Convert.ToString(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.CHAR_DATA].Value);
 }
Beispiel #29
0
        private void InitializeScreen()
        {
            //txtFind.KeyPress += CommonLib.CtrlUtil.SetRestrictKeyInput;
            //txtFind.KeyUp += CommonLib.CtrlUtil.FilterRestrictChar;

            shtScreen.ActiveSkin = Common.ACTIVE_SKIN;
            CtrlUtil.MappingDataFieldWithEnum(shtScreen, typeof(eColScreen));

            txtFind.KeyPress += CtrlUtil.SetNextControl;

            CtrlUtil.EnabledControl(true, txtFind, fpScreen, btnCancel, btnRegister);

            m_dtView            = m_menuRegisterController.LoadAllScreenForRegister(m_menuSubCD);
            fpScreen.DataSource = FilterData(m_dtView, txtFind.Text.Trim());
        }
Beispiel #30
0
 private void tsbAdd_Click(object sender, EventArgs e)
 {
     tsbEdit.Enabled   = false;
     tsbAdd.Enabled    = false;
     tsbDelete.Enabled = false;
     tsbSave.Enabled   = true;
     tsbCancel.Enabled = true;
     fpView.Enabled    = false;
     CtrlUtil.EnabledControl(true, txtClsCd);
     CtrlUtil.EnabledControl(true, txtClsDesc);
     CtrlUtil.EnabledControl(true, txtSEQ);
     txtClsCd.Text   = "";
     txtClsDesc.Text = "";
     txtSEQ.Text     = "";
 }