Esempio n. 1
0
        private void LoadData(NZDateTime dtPeriod, string keyFilter)
        {
            try
            {
                //== Start to search data.
                InventoryOnhandController ctlInvent = new InventoryOnhandController();

                //== 20091203 Add by Teerayt S.

                //NZString yearMonth = GetLatestYearMonthInInvOnhand();

                NZString yearMonth = dtMonth.Value.Value.ToString("yyyyMM").ToNZString();
                //== 20091203 End Add by Teerayt S.


                //List<InventorySummaryViewDTO> dtoView = ctlInvent.LoadInventorySummary(yearMonth);
                //m_dtAllData = DTOUtility.ConvertListToDataTable(dtoView);

                m_dtAllData = ctlInvent.LoadInventorySummary(yearMonth);

                FindDataFromMemory(keyFilter);

                CtrlUtil.SpreadUpdateColumnSorting(shtInventorySummary);
            }
            catch (Exception ex)
            {
                MessageDialog.ShowBusiness(this, ex.Message);
            }
        }
Esempio n. 2
0
        //public SheetView SortingData { get { return m_SheetViewData; } }

        #endregion

        #region Handles and Overrides

        private void AdvanceSearchDialog_Load(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                this.SuspendLayout();

                shtQueryList.ActiveSkin = CommonLib.Common.ACTIVE_SKIN;

                fpQueryList.Enabled = true;

                shtQueryList.Columns[(int)eCol.ColumnIndex].Visible = false;
                shtQueryList.Columns[(int)eCol.ColumnType].Visible  = false;

                CtrlUtil.SpreadSetColumnsLocked(shtQueryList, false, (int)eCol.Checkbox);
                CtrlUtil.SpreadSetColumnsLocked(shtQueryList, true, (int)eCol.ColumnName);
                CtrlUtil.SpreadSetColumnsLocked(shtQueryList, true, (int)eCol.Sign);
                CtrlUtil.SpreadSetColumnsLocked(shtQueryList, true, (int)eCol.Value1);
                CtrlUtil.SpreadSetColumnsLocked(shtQueryList, true, (int)eCol.Value2);

                ShowColumnName();

                // Add by Pongthorn S. @ 2012-05-18
                //fpQueryList.KeyPress += CtrlUtil.SetRestrictKeyInput;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                this.ResumeLayout();
                this.Cursor = Cursors.Default;
            }
        }
        private void RetriveData()
        {
            try
            {
                if (custpResult == null)
                {
                    custpResult          = new sp_MAS202_GetCustomerProject_Result();
                    custpResult.CRT_DATE = DateTime.Now;
                    this.ToolBarSwitch   = "2122222222";
                }
                else if (custpResult.DEL_ID.IsNull())
                {
                    this.ToolBarSwitch = "2122222102";
                }
                else
                {
                    this.ToolBarSwitch = "2022222012";
                }

                CtrlUtil.EnableControls(custpResult.DEL_ID.IsNull(), txtCustomer, txtNameTh, txtNameEn, txtAddrNo, txtMoo, txtBuildingEn, txtBuildingTh, txtAlleyEn, txtAlleyTh, txtLaneEn, txtLaneTh, txtRoadEn, txtRoadTh, txtSubDictrictEn, txtSubDictrictTh, txtDictrictEn, txtDictrictTh, cboProvince, txtPostCode, txtSeq);

                bs.DataSource = custpResult;
            }
            catch (Exception ex)
            {
                rMessageBox.ShowException(this, ex);
            }
        }
Esempio n. 4
0
 private void FindDataFromMemory()
 {
     //CtrlUtil.FilterRestrictChar(txtSearch);
     shtDelivery.DataSource = FilterData(m_AllShipTransData, txtSearch.Text);
     CtrlUtil.SpreadUpdateColumnSorting(shtDelivery);
     CalTotatValue();
 }
Esempio n. 5
0
        protected bool SetConfig()
        {
            if (mConfig == null && mManager != null)
            {
                mConfig = mManager.CreateConfigInstance();
            }

            if (mConfig != null)
            {
                (mConfig as CConfig).Name = textBox_name.Text;
                mConfig.SetValue("Name", textBox_name.Text);

                mConfig.Desc        = textBox_desc.Text;
                mConfig.Type        = CtrlUtil.GetComboBoxText(comboBox_type);
                mConfig.FPS         = (int)numericUpDown_fps.Value;
                mConfig.IP          = textBox_ip.Text;
                mConfig.Port        = (short)numericUpDown_port.Value;
                mConfig.Channel     = (int)numericUpDown_channel.Value;
                mConfig.ShowOSDType = (int)numericUpDown_osd.Value;
                mConfig.UserName    = textBox_username.Text;
                mConfig.Password    = textBox_password.Text;
                mConfig.IsRecord    = checkBox_record.Checked;
                mConfig.Enabled     = checkBox_enabled.Checked;

                return(true);
            }
            return(false);
        }
Esempio n. 6
0
        private void RetriveData()
        {
            try
            {
                if (posResult == null)
                {
                    posResult          = new sp_MAS104_GetPosition_Result();
                    posResult.CRT_DATE = DateTime.Now;
                    this.ToolBarSwitch = "2122222222";
                }
                else if (posResult.DEL_ID.IsNull())
                {
                    this.ToolBarSwitch = "2122222102";
                }
                else
                {
                    this.ToolBarSwitch = "2022222012";
                }

                CtrlUtil.EnableControls(posResult.DEL_ID.IsNull(), txtNameTh, txtNameEn, txtSeq);

                bs.DataSource = posResult;
            }
            catch (Exception ex)
            {
                rMessageBox.ShowException(this, ex);
            }
        }
 private void txtStdLight_OnSelected(object sender, EventArgs e)
 {
     try
     {
         if (txtStdLight.IntValue != null)
         {
             sp_MAS302_GetSTDLight_Result data = (txtStdLight.SelectedData as sp_MAS302_GetSTDLight_Result);
             sp_MAS201_GetCustomer_Result cust = vmMas.GetCustomer(this.result.CUSTOMER_ID);
             txtStdValue.NullableIntValue = data.STANDARD;
             txtStdName.Text = data.ALIAS_NAME.GetValueOrDefault(data.NAME);
             if (cust != null)
             {
                 if (cust.IS_LANG_TH == true)
                 {
                     txtStdName.Text = data.ALIAS_NAME.GetValueOrDefault(data.NAME);
                 }
                 else
                 {
                     txtStdName.Text = data.ALIAS_NAME_EN.GetValueOrDefault(data.NAME);
                 }
             }
             CtrlUtil.EnableControls(true, txtStdName);
         }
         else
         {
             txtStdValue.NullableIntValue = null;
             txtStdName.Text = null;
             CtrlUtil.EnableControls(false, txtStdName);
         }
     }
     catch (Exception ex)
     {
         rMessageBox.ShowException(this, ex);
     }
 }
Esempio n. 8
0
        private void ClearAllExceptDefault()
        {
            lblAdjustNo.Text = string.Empty;

            CtrlUtil.ClearControlData(
                //lblAdjustNo,
                txtMasterNo,
                txtItemDesc,
                txtCustomerName,
                cboStoredLoc,
                txtLotNo,
                txtPackNo,
                txtFGNo,
                txtCustomerLotNo,
                txtOnhandQty,
                txtAdjustWeight,
                txtAdjustQty,
                txtRemark,
                cboInventoryUM,
                cboReasonCode

                );

            rdoIncrease.Checked = true;
        }
Esempio n. 9
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);
            }
        }
Esempio n. 10
0
        protected bool SetConfig()
        {
            if (mConfig == null && mManager != null)
            {
                mConfig = mManager.CreateConfigInstance();
            }

            if (mConfig != null)
            {
                (mConfig as CConfig).Name = textBox_name.Text;
                mConfig.SetValue("Name", textBox_name.Text);

                mConfig.Desc      = textBox_desc.Text;
                mConfig.Type      = CtrlUtil.GetComboBoxText(comboBox_type);
                mConfig.Scheduler = CtrlUtil.GetComboBoxText(comboBox_scheduler);
                mConfig.AutoRun   = checkBox_autorun.Checked;
                mConfig.Enabled   = checkBox_enabled.Checked;

                mConfig.ClearActions();
                foreach (IActionParam config in checkedListBox_action.Items)
                {
                    mConfig.AppendAction(config);
                }

                return(true);
            }
            return(false);
        }
Esempio n. 11
0
        private void LoadData(NZDateTime from, NZDateTime to)
        {
            if (dtPeriodBegin.NZValue.IsNull || dtPeriodEnd.NZValue.IsNull)
            {
                if (dtPeriodBegin.NZValue.IsNull && dtPeriodEnd.NZValue.IsNull)
                {
                    MessageDialog.ShowBusiness(this, Message.LoadMessage(TKPMessages.eValidate.VLM0105.ToString(), new object[] { "Return date begin and Delivery date end" }));
                }
                else if (dtPeriodBegin.NZValue.IsNull)
                {
                    MessageDialog.ShowBusiness(this, Message.LoadMessage(TKPMessages.eValidate.VLM0105.ToString(), new object[] { "Return date begin" }));
                }
                else
                {
                    MessageDialog.ShowBusiness(this, Message.LoadMessage(TKPMessages.eValidate.VLM0105.ToString(), new object[] { "Return date end" }));
                }
                return;
            }

            DataTable dt = m_controller.Load_ReturnProductionList(from, to, false);

            //DataTable dt = DTOUtility.ConvertListToDataTable(list);
            m_dtAllData = dt;
            shtReturnProductList.RowCount   = 0;
            shtReturnProductList.DataSource = null;
            FindDataFromMemory();
            //shtReturnProductList.DataSource = m_dtAllData;

            CtrlUtil.SpreadUpdateColumnSorting(shtReturnProductList);
        }
Esempio n. 12
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);
            }
        }
Esempio n. 13
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);
        }
Esempio n. 14
0
        private void InitializeSpread()
        {
            shtPackingList.ActiveSkin = Common.ACTIVE_SKIN;

            #region Initial Cell Type

            LookupDataBIZ biz = new LookupDataBIZ();

            LookupData shiftCls = biz.LoadLookupClassType(DataDefine.SHIFT_CLS.ToNZString());
            shtPackingList.Columns[(int)eColView.SHIFT_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(shiftCls);

            LookupData PersonInCharge = biz.LoadPersonInCharge();
            shtPackingList.Columns[(int)eColView.PERSON_IN_CHARGE].CellType = CtrlUtil.CreateReadOnlyPairCellType(PersonInCharge);

            shtPackingList.Columns[(int)eColView.TRANS_DATE].CellType = CtrlUtil.CreateDateTimeCellType();

            #endregion

            #region Initial export column

            shtPackingList.Columns[(int)eColView.TRANS_ID].StyleName       = DataDefine.EXPORT_LAST.ToString();
            shtPackingList.Columns[(int)eColView.GROUP_TRANS_ID].StyleName = DataDefine.EXPORT_LAST.ToString();

            shtPackingList.Columns[(int)eColView.TRANS_ID].Visible              = false;
            shtPackingList.Columns[(int)eColView.GROUP_TRANS_ID].Visible        = false;
            shtPackingList.Columns[(int)eColView.SHIFT_CLS_NAME].Visible        = false;
            shtPackingList.Columns[(int)eColView.PERSON_IN_CHARGE_NAME].Visible = false;

            #endregion

            CtrlUtil.MappingDataFieldWithEnum(shtPackingList, typeof(eColView));
        }
Esempio n. 15
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);
            }
        }
Esempio n. 16
0
 private void rdoIncrease_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == '\r')
     {
         CtrlUtil.FocusControl(txtMasterNo);
     }
 }
Esempio n. 17
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();
             */
        }
Esempio n. 18
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);
        }
Esempio n. 19
0
        private void InitialSpread()
        {
            shtIssueList.ActiveSkin = Common.ACTIVE_SKIN;

            m_keyboardSpread             = new KeyboardSpread(fpIssueList);
            m_keyboardSpread.RowAdding  += m_keyboardSpread_RowAdding;
            m_keyboardSpread.RowAdded   += m_keyboardSpread_RowAdded;
            m_keyboardSpread.RowRemoved += m_keyboardSpread_RowRemoved;
            if (m_Mode != eSaveMode.VIEW)
            {
                m_keyboardSpread.StartBind();
            }

            fpIssueList.SubEditorOpening += CtrlUtil.SpreadDisableSubEditorOpening;

            string[] names = Enum.GetNames(typeof(eColView));
            for (int i = 0; i < names.Length; i++)
            {
                shtIssueList.Columns[i].DataField = names[i];
                CtrlUtil.SpreadSetColumnsLocked(shtIssueList, true, i);
            }
            if (m_Mode == eSaveMode.ADD || m_Mode == eSaveMode.UPDATE)
            {
                CtrlUtil.SpreadSetColumnsLocked(shtIssueList, false, (int)eColView.ISSUE_QTY);
            }
            if (m_Mode == eSaveMode.ADD)
            {
                CtrlUtil.SpreadSetColumnsLocked(shtIssueList, false, (int)eColView.LOT_NO);
                CtrlUtil.SpreadSetColumnsLocked(shtIssueList, false, (int)eColView.LOT_BTN);
            }
        }
Esempio n. 20
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;
        }
Esempio n. 21
0
        private void InitailSpread()
        {
            shtDelivery.ActiveSkin = CommonLib.Common.ACTIVE_SKIN;

            CtrlUtil.MappingDataFieldWithEnum(shtDelivery, typeof(eColView));

            //shtView.Columns[(int)eColView.SHIP_DATE].CellType = CtrlUtil.CreateDateTimeCellType();

            shtDelivery.Columns[(int)eColView.TRANS_ID].StyleName       = DataDefine.EXPORT_LAST.ToString();
            shtDelivery.Columns[(int)eColView.GROUP_TRANS_ID].StyleName = DataDefine.EXPORT_LAST.ToString();
            shtDelivery.Columns[(int)eColView.LOC_CD].StyleName         = DataDefine.NO_EXPORT.ToString();
            shtDelivery.Columns[(int)eColView.CURRENCY].StyleName       = DataDefine.NO_EXPORT.ToString();
            shtDelivery.Columns[(int)eColView.RETURN_QTY].StyleName     = DataDefine.NO_EXPORT.ToString();

            shtDelivery.Columns[(int)eColView.TRANS_ID].Visible        = false;
            shtDelivery.Columns[(int)eColView.GROUP_TRANS_ID].Visible  = false;
            shtDelivery.Columns[(int)eColView.ORDER_DETAIL_NO].Visible = false;
            shtDelivery.Columns[(int)eColView.LOC_CD].Visible          = false;
            shtDelivery.Columns[(int)eColView.LOC_DESC].Visible        = false;
            shtDelivery.Columns[(int)eColView.CURRENCY].Visible        = false;
            shtDelivery.Columns[(int)eColView.RETURN_QTY].Visible      = false;

            LookupDataBIZ m_bizLookupData = new LookupDataBIZ();

            LookupData locData = m_bizLookupData.LoadLookupLocation();

            shtDelivery.Columns[(int)eColView.DEALING_NO].CellType = CtrlUtil.CreateReadOnlyPairCellType(locData);
        }
Esempio n. 22
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();
        }
Esempio n. 23
0
        private void RetriveData()
        {
            try
            {
                if (user == null)
                {
                    user               = new sp_MAS101_GetUser_Result();
                    user.CRT_DATE      = DateTime.Now;
                    this.ToolBarSwitch = "2122222222";
                    CtrlUtil.EnableControls(true, txtID);
                }
                else if (user.DEL_ID.IsNull())
                {
                    this.ToolBarSwitch = "2122222102";
                    CtrlUtil.EnableControls(false, txtID);
                }
                else
                {
                    this.ToolBarSwitch = "2022222012";
                    CtrlUtil.EnableControls(false, txtID);
                }

                CtrlUtil.EnableControls(user.DEL_ID.IsNull(), cboPreName, cboDivision, cboSubDivision, cboPosition, cboGroup);
                CtrlUtil.EnableControls(user.DEL_ID.IsNull(), txtFName_En, txtLName_En, txtFName_Th, txtLName_Th, txtNickName, txtIDCard, dtBirthDate, dtStartDate, txtPassword, txtRegistrationNo, txtLabSupervisorNo);

                user.PASS     = null;
                bs.DataSource = user;
            }
            catch (Exception ex)
            {
                rMessageBox.ShowException(this, ex);
            }
        }
Esempio n. 24
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);
            }
        }
Esempio n. 25
0
 private void InitialScreen()
 {
     this.ToolBarSwitch = "2122222222";
     ConfigDTO          = vmSys.GetSystemConfig();
     bs2.DataSource     = ConfigDTO;
     CtrlUtil.VisibleControls(OISDataInfo.UserInfomation.GROUP_ID == 1, gbSystem);
 }
Esempio n. 26
0
        private void InitializeSpread()
        {
            shtView.ActiveSkin = Common.ACTIVE_SKIN;

            LookupDataBIZ biz = new LookupDataBIZ();

            NZString[] classInfos =
            {
                (NZString)DataDefine.Convert2ClassCode(DataDefine.eTRANS_TYPE.Receiving),
                (NZString)DataDefine.Convert2ClassCode(DataDefine.eTRANS_TYPE.Receive_Return)
            };

            LookupData receiveTypeLookupData = biz.LoadLookupClassType(DataDefine.TRANS_TYPE.ToNZString(), classInfos);

            shtView.Columns[(int)eColView.TRANS_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(receiveTypeLookupData);

            LookupData locationLookupData = biz.LoadLookupLocation();

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

            LookupData umClassLookupData = biz.LoadLookupClassType(DataDefine.UM_CLS.ToNZString());

            shtView.Columns[(int)eColView.ORDER_UM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(umClassLookupData);
            shtView.Columns[(int)eColView.INV_UM_CLS].CellType   = CtrlUtil.CreateReadOnlyPairCellType(umClassLookupData);

            LookupData refTypeLookupData = biz.LoadLookupClassType(DataDefine.REF_SLIP_CLS.ToNZString());

            shtView.Columns[(int)eColView.REF_SLIP_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(refTypeLookupData);

            shtView.Columns[(int)eColView.TRANS_DATE].CellType = CtrlUtil.CreateDateTimeCellType();
            CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView));
        }
Esempio n. 27
0
        private void RetriveData()
        {
            try
            {
                if (LabExtResult == null)
                {
                    LabExtResult          = new sp_MAS310_GetLabExt_Result();
                    LabExtResult.CRT_DATE = DateTime.Now;
                    this.ToolBarSwitch    = "2122222222";
                }
                else if (LabExtResult.DEL_ID.IsNull())
                {
                    this.ToolBarSwitch = "2122222102";
                }
                else
                {
                    this.ToolBarSwitch = "2022222012";
                }

                CtrlUtil.EnableControls(LabExtResult.DEL_ID.IsNull(), txtName, txtSeq);

                bdSource.DataSource = LabExtResult;
            }
            catch (Exception ex)
            {
                rMessageBox.ShowException(this, ex);
            }
        }
Esempio n. 28
0
        private void ORD020_DemandOrder_Load(object sender, EventArgs e)
        {
            m_BIZDemandOrder = new DemandOrderBIZ();
            CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColumn));
            shtView.Columns[(int)eColumn.ITEM_DESC].Locked = true;

            //Add by Sansanee K. 06 June 2011
            dtpDemand.Focus();

            dtpDemand.Format = MRPDateTimeUtil.SetShortDate(Common.CurrentUserInfomation.DateFormat);

            if (m_DTODemandOrder == null)
            {
                dtpDemand.Text = txtCusCD.Text = txtCusName.Text = string.Empty;
                SetScreenState(eScreenState.View);
            }
            else
            {
                dtpDemand.Value    = m_DTODemandOrder.YEAR_MONTH;
                txtCusCD.Text      = m_DTODemandOrder.CUSTOMER_CD;
                txtCusName.Text    = (new DealingBIZ().LoadLocation(m_DTODemandOrder.CUSTOMER_CD)).LOC_DESC.StrongValue;
                shtView.DataSource = SearchData(m_DTODemandOrder);
                SetScreenState(eScreenState.Edit);
                SetHolidayColor();
            }
        }
Esempio n. 29
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);
        }
Esempio n. 30
0
        private void RetriveData()
        {
            try
            {
                if (MethodResult == null)
                {
                    MethodResult          = new sp_MAS304_GetMethodAnalysis_Result();
                    MethodResult.CRT_DATE = DateTime.Now;
                    this.ToolBarSwitch    = "2122222222";
                }
                else if (MethodResult.DEL_ID.IsNull())
                {
                    this.ToolBarSwitch = "2122222102";
                }
                else
                {
                    this.ToolBarSwitch = "2022222012";
                }

                CtrlUtil.EnableControls(MethodResult.DEL_ID.IsNull(), txtName, cboInstitution, txtSeq);

                bdSource.DataSource = MethodResult;
            }
            catch (Exception ex)
            {
                rMessageBox.ShowException(this, ex);
            }
        }