private void InitializeSpread() { shtView.ActiveSkin = Common.ACTIVE_SKIN; shtView.Columns[(int)eColView.TRANS_DATE].CellType = CtrlUtil.CreateDateTimeCellType(Common.CurrentUserInfomation.DateFormatString); shtView.Columns[(int)eColView.TRANS_ID].StyleName = DataDefine.EXPORT_LAST.ToString(); shtView.Columns[(int)eColView.TRANS_ID].Visible = false; shtView.Columns[(int)eColView.IN_OUT_CLS_NAME].Visible = false; shtView.Columns[(int)eColView.LOC_DESC].Visible = false; shtView.Columns[(int)eColView.TRAN_SUB_CLS_NAME].Visible = false; shtView.Columns[(int)eColView.PACK_NO].Visible = false; shtView.Columns[(int)eColView.FG_NO].Visible = false; shtView.Columns[(int)eColView.LOT_NO].Visible = false; CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView)); }
private void InitializeScreen() { shtView.ActiveSkin = Common.ACTIVE_SKIN; // Mapping DataField. CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView)); txtItem.KeyPress += CtrlUtil.SetNextControl; txtLocation.KeyPress += CtrlUtil.SetNextControl; txtLotNo.KeyPress += CtrlUtil.SetNextControl; txtInvPeriod.KeyPress += CtrlUtil.SetNextControl; txtOnHandQty.KeyPress += CtrlUtil.SetNextControl; cboItemType.KeyPress += CtrlUtil.SetNextControl; // Set default Column Cell Type. LookupDataBIZ bizLookupData = new LookupDataBIZ(); LookupData transTypelookupData = bizLookupData.LoadLookupClassType(DataDefine.TRANS_TYPE.ToNZString()); LookupData refClassTypelookupData = bizLookupData.LoadLookupClassType(DataDefine.REF_SLIP_CLS.ToNZString()); shtView.Columns[(int)eColView.TRANS_INFO].CellType = CtrlUtil.CreateReadOnlyPairCellType(transTypelookupData); shtView.Columns[(int)eColView.REF_TYPE].CellType = CtrlUtil.CreateReadOnlyPairCellType(refClassTypelookupData); shtView.Columns[(int)eColView.TRANS_DATE].CellType = CtrlUtil.CreateDateTimeCellType(Common.CurrentUserInfomation.DateFormatString); cboItemType.Format += Common.ComboBox_Format; LookupData itemTypelookupData = bizLookupData.LoadLookupClassType(DataDefine.ITEM_CLS.ToNZString()); cboItemType.LoadLookupData(itemTypelookupData); // Enable/Disable Controls CtrlUtil.EnabledControl(false, txtItem, txtLocation, txtLotNo, txtInvPeriod, txtOnHandQty, txtUnitMeasure, txtPackNo); CtrlUtil.EnabledControl(true, fpView); // Load data. txtItem.Text = ItemCode.NVL(string.Empty); txtLocation.Text = WareHouseCode.NVL(string.Empty); txtLotNo.Text = LotNo.NVL(string.Empty); txtInvPeriod.Text = String.Format("{0} - {1}", CtrlUtil.ConvertDateTimeToCurrentFormat(PeriodBeginDate), CtrlUtil.ConvertDateTimeToCurrentFormat(PeriodEndDate)); CtrlUtil.EnabledControl(false, cboItemType); LoadData(); }
private void InitializeScreen() { //txtFind.KeyPress += CommonLib.CtrlUtil.SetRestrictKeyInput; //txtFind.KeyUp += CommonLib.CtrlUtil.FilterRestrictChar; //################### //Bind Spread's DataField with Enum //################### shtView.ActiveSkin = Common.ACTIVE_SKIN; CtrlUtil.MappingDataFieldWithEnum(fpView.Sheets[0], typeof(eColView)); //################### // Load lookup combobox data. //################### LookupData(); //################### // Binding event to control (movenext). //################### cboLanguage.KeyPress += CtrlUtil.SetNextControl; txtFind.KeyPress += CtrlUtil.SetNextControl; //################### // Binding Model //################### dmcSubMenu.AddRangeControl( cboLanguage, txtFind ); //################### // LoadData && Assign Value to control. //################### cboLanguage.SelectedValue = Common.CurrentUserInfomation.LanguageCD.Value; //################### // Startup Enable/Disable control. //################### CtrlUtil.EnabledControl(true, cboLanguage, txtFind, fpView); tslEditing.Text = C_STR_READY; }
private void InitializeScreen() { shtView.ActiveSkin = Common.ACTIVE_SKIN; CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView)); txtSearch.KeyPress += CtrlUtil.SetNextControl; //------------ Location --------------------// LookupDataBIZ m_bizLookupData = new LookupDataBIZ(); //LookupData locationData = m_bizLookupData.LoadLookupLocation(null, null); LookupData locationData = m_bizLookupData.LoadLookupClassType(DataDefine.LOCATION_CLS.ToNZString()); shtView.Columns[(int)eColView.LOC_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(locationData); LoadItemData(txtSearch.Text); IsSelected = false; }
private void QRS010_QueryLunch_Load(object sender, EventArgs e) { this.tsbNew.Visible = false; this.tsSeperator1.Visible = false; this.tsbRefresh.Text = "Query"; this.shtQueryList.ActiveSkin = Common.ACTIVE_SKIN; this.shtView.ActiveSkin = Common.ACTIVE_SKIN; CtrlUtil.MappingDataFieldWithEnum(shtQueryList, typeof(eColQueryList)); QueryLunchBiz biz = new QueryLunchBiz(); DataTable dt = biz.GetQueryList(); m_dtQueryList = dt; this.shtQueryList.DataSource = dt; }
private void InitialSpread() { shtView.ActiveSkin = Common.ACTIVE_SKIN; CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColumns)); shtView.OperationMode = OperationMode.Normal; shtView.Columns[(int)eColumns.CHECK_FLAG].CellType = CtrlUtil.CreateCheckboxCellType(); shtView.Columns[(int)eColumns.CHECK_FLAG].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; CtrlUtil.SpreadSetColumnsLocked(shtView, false, (int)eColumns.CHECK_FLAG); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.LAST_RECEIVE_DATE); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.PACK_NO); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.FG_NO); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.LOT_NO); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.EXTERNAL_LOT_NO); CtrlUtil.SpreadSetColumnsLocked(shtView, true, (int)eColumns.ONHAND_QTY); fpView.ContextMenuStrip = null; fpView.SubEditorOpening += CtrlUtil.SpreadDisableSubEditorOpening; }
private void InitializeSpread() { shtMovePartList.ActiveSkin = Common.ACTIVE_SKIN; LookupDataBIZ biz = new LookupDataBIZ(); NZString[] locationtype = new NZString[1]; locationtype[0] = DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Production).ToNZString(); LookupData fromProcess = biz.LoadLookupLocation(locationtype); shtMovePartList.Columns[(int)eColView.FROM_PROCESS].CellType = CtrlUtil.CreateReadOnlyPairCellType(fromProcess); LookupData toProcess = biz.LoadLookupLocation(locationtype); shtMovePartList.Columns[(int)eColView.TO_PROCESS].CellType = CtrlUtil.CreateReadOnlyPairCellType(toProcess); LookupData moveReason = biz.LoadLookupClassType(DataDefine.MOVE_REASON.ToNZString()); shtMovePartList.Columns[(int)eColView.REASON].CellType = CtrlUtil.CreateReadOnlyPairCellType(moveReason); LookupData shiftCls = biz.LoadLookupClassType(DataDefine.SHIFT_CLS.ToNZString()); shtMovePartList.Columns[(int)eColView.SHIFT_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(shiftCls); shtMovePartList.Columns[(int)eColView.MOVE_DATE].CellType = CtrlUtil.CreateDateTimeCellType(); shtMovePartList.Columns[(int)eColView.TRANS_ID_FROM].StyleName = DataDefine.EXPORT_LAST.ToString(); shtMovePartList.Columns[(int)eColView.TRANS_ID_TO].StyleName = DataDefine.EXPORT_LAST.ToString(); shtMovePartList.Columns[(int)eColView.CUSTOMER_CD].StyleName = DataDefine.NO_EXPORT.ToString(); shtMovePartList.Columns[(int)eColView.WEIGHT].StyleName = DataDefine.NO_EXPORT.ToString(); shtMovePartList.Columns[(int)eColView.TRANS_ID_FROM].Visible = false; shtMovePartList.Columns[(int)eColView.TRANS_ID_TO].Visible = false; shtMovePartList.Columns[(int)eColView.CUSTOMER_CD].Visible = false; shtMovePartList.Columns[(int)eColView.SHIFT_CLS_NAME].Visible = false; shtMovePartList.Columns[(int)eColView.FROM_PROCESS_NAME].Visible = false; shtMovePartList.Columns[(int)eColView.TO_PROCESS_NAME].Visible = false; shtMovePartList.Columns[(int)eColView.REASON_NAME].Visible = false; shtMovePartList.Columns[(int)eColView.WEIGHT].Visible = false; CtrlUtil.MappingDataFieldWithEnum(shtMovePartList, typeof(eColView)); }
private void InitializeSpread() { shtView.ActiveSkin = Common.ACTIVE_SKIN; LookupDataBIZ biz = new LookupDataBIZ(); LookupData locationLookupData = biz.LoadLookupLocation(); shtView.Columns[(int)eColView.LOC_CD].CellType = CtrlUtil.CreateReadOnlyPairCellType(locationLookupData); LookupData shiftLookupData = biz.LoadLookupClassType(DataDefine.SHIFT_CLS.ToNZString()); shtView.Columns[(int)eColView.SHIFT_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(shiftLookupData); shtView.Columns[(int)eColView.TRANS_DATE].CellType = CtrlUtil.CreateDateTimeCellType(); CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView)); }
private void LoadData(NZDateTime FromPeriod, NZDateTime ToPeriod, NZString ItemFrom, NZString ItemTo, NZString LotNo) { try { if (ItemFrom == "") { ItemFrom = null; } if (ItemTo == "") { ItemTo = null; } bool GroupByItem = rdoGroupItem.Checked; NGInquiryController ctlInvent = new NGInquiryController(); List <NGInquiryViewDTO> dto = ctlInvent.LoadNGInquiry(FromPeriod, ToPeriod, ItemFrom, ItemTo, GroupByItem, LotNo); if (dto.Count == 0) { MessageDialog.ShowBusiness(this, new EVOFramework.Message(TKPMessages.eInformation.INF0001.ToString())); return; } m_dtAllData = DTOUtility.ConvertListToDataTable(dto); DataTable dtView = m_dtAllData.Clone(); foreach (DataRow dr in m_dtAllData.Rows) { dtView.ImportRow(dr); } //Hide Column When ByGroupItem RefreshSpreadColumn(); fpView.DataSource = dtView; CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColumns)); } catch (Exception ex) { MessageDialog.ShowBusiness(this, ex.Message); } }
private void InitializeSpread() { shtView.ActiveSkin = Common.ACTIVE_SKIN; m_keyboardSpread = new KeyboardSpread(fpView); shtView.Columns[(int)eColView.CHECKBOX].CellType = CtrlUtil.CreateCheckboxCellType(); shtView.Columns[(int)eColView.CHECKBOX].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; m_keyboardSpread.RowAdding += new KeyboardSpread.RowAddingHandler(m_keyboardSpread_RowAdding); m_keyboardSpread.RowAdded += new KeyboardSpread.RowAddedHandler(m_keyboardSpread_RowAdded); m_keyboardSpread.RowRemoving += new KeyboardSpread.RowRemovingHandler(m_keyboardSpread_RowRemoving); fpView.ContextMenuStrip = null; fpView.SubEditorOpening += CtrlUtil.SpreadDisableSubEditorOpening; LookupDataBIZ biz = new LookupDataBIZ(); FormatUtil.SetNumberFormat(shtView.Columns[(int)eColView.ONHAND_QTY], FormatUtil.eNumberFormat.Qty_PCS); //shtView.Columns[(int)eColView.INV_UM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(biz.LoadLookupClassType(DataDefine.UM_CLS.ToNZString())); CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView)); }
private void InitialSpread() { shtView.ActiveSkin = Common.ACTIVE_SKIN; //m_keyboardSpread = new KeyboardSpread(fpView); //m_keyboardSpread.RowAdding += m_keyboardSpread_RowAdding; //m_keyboardSpread.RowAdded += m_keyboardSpread_RowAdded; //m_keyboardSpread.RowRemoved += m_keyboardSpread_RowRemoved; //if (m_screenMode != Common.eScreenMode.VIEW) // m_keyboardSpread.StartBind(); //fpNGInfo.SubEditorOpening += CtrlUtil.SpreadDisableSubEditorOpening; //CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eNGInfoCol)); //fpCustomerOrderList.LeaveCell += new LeaveCellEventHandler(fpView_LeaveCell); //fpCustomerOrderList.SubEditorOpening += CtrlUtil.SpreadDisableSubEditorOpening; CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColumns)); string[] names = Enum.GetNames(typeof(eColumns)); for (int i = 0; i < names.Length; i++) { shtView.Columns[i].DataField = names[i]; CtrlUtil.SpreadSetColumnsLocked(shtView, true, i); } CtrlUtil.SpreadSetColumnsLocked(shtView, false, (int)eColumns.EDIT_FLAG); //if (m_screenMode == Common.eScreenMode.ADD || m_screenMode == Common.eScreenMode.EDIT) //{ // CtrlUtil.SpreadSetColumnsLocked(shtCustomerOrderList, false, (int)eColView.ITEM_CD_BTN); // CtrlUtil.SpreadSetColumnsLocked(shtCustomerOrderList, false, (int)eColView.ITEM_DELIVERY_DATE); // CtrlUtil.SpreadSetColumnsLocked(shtCustomerOrderList, false, (int)eColView.QTY); //} //if (m_screenMode == Common.eScreenMode.ADD) //{ // CtrlUtil.SpreadSetColumnsLocked(shtCustomerOrderList, false, (int)eColView.ITEM_CD_BTN); // CtrlUtil.SpreadSetColumnsLocked(shtCustomerOrderList, false, (int)eColView.ITEM_DELIVERY_DATE); // CtrlUtil.SpreadSetColumnsLocked(shtCustomerOrderList, false, (int)eColView.QTY); //} }
private void InitialScreen() { // add search button tsbSearch = new ToolStripButton("Refresh"); tsbSearch.Image = Forms.Properties.Resources.REFRESH; tslControl.Items.Insert(0, tsbSearch); tsbSearch.Click += tsbSearch_Click; shtInventorySummary.ActiveSkin = Common.ACTIVE_SKIN; CtrlUtil.MappingDataFieldWithEnum(this.shtInventorySummary, typeof(eColView)); for (int i = 0; i < shtInventorySummary.Columns.Count; i++) { CtrlUtil.SpreadSetColumnsLocked(shtInventorySummary, true, i); } CtrlUtil.SpreadUpdateColumnSorting(shtInventorySummary); //LookupDataBIZ bizLookup = new LookupDataBIZ(); //LookupData umClsLookup = bizLookup.LoadLookupClassType((NZString)DataDefine.UM_CLS); //shtView.Columns[(int)eColView.INV_UM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(umClsLookup); //LookupData itemClsLookup = bizLookup.LoadLookupClassType((NZString)DataDefine.ITEM_CLS); //shtView.Columns[(int)eColView.ITEM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(itemClsLookup); //LookupData itemClsMinorLookup = bizLookup.LoadLookupClassType((NZString)DataDefine.ITEM_CLS_MINOR04); //shtView.Columns[(int)eColView.ITEM_CLS_MINOR].CellType = CtrlUtil.CreateReadOnlyPairCellType(itemClsMinorLookup); //LookupData locCustomer = bizLookup.LoadLookupLocation(); //shtView.Columns[(int)eColView.FOR_CUSTOMER].CellType = CtrlUtil.CreateReadOnlyPairCellType(locCustomer); LoadDefaultPeriod(); }
public PUR020_PurchaseOrderEntry(PurchaseOrderHDTO hdtoPurchaseOrder) { InitializeComponent(); #region Set Component shtView.ActiveSkin = Common.ACTIVE_SKIN; this.WindowState = FormWindowState.Maximized; CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColumn)); m_BIZPurchaseOrder = new PurchaseOrderBIZ(); LookupDataBIZ BIZLookupData = new LookupDataBIZ(); cboSupplierCode.Format += CommonLib.Common.ComboBox_Format; cboSupplierCode.LoadLookupData(BIZLookupData.LoadLookupLocation(new NZString[] { (NZString)"04", (NZString)"05" })); cboSupplierCode.SelectedIndex = -1; cboDelivery.Format += CommonLib.Common.ComboBox_Format; cboDelivery.LoadLookupData(BIZLookupData.LoadLookupLocation(new NZString[] { (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.Customer), (NZString)DataDefine.Convert2ClassCode(DataDefine.eLOCATION_CLS.CustomerVendor) })); cboDelivery.SelectedIndex = -1; cboTermOfPayment.Format += CommonLib.Common.ComboBox_Format; cboTermOfPayment.LoadLookupData(BIZLookupData.LoadLookupClassType(DataDefine.TERM_OF_PAYMENT.ToNZString())); cboTermOfPayment.SelectedIndex = -1; cboCurrency.Format += CommonLib.Common.ComboBox_Format; cboCurrency.LoadLookupData(BIZLookupData.LoadLookupClassType(DataDefine.CURRENCY.ToNZString())); cboCurrency.SelectedIndex = -1; shtView.Columns[(int)eColumn.UNIT].CellType = CtrlUtil.CreateComboBoxCellType(BIZLookupData.LoadLookupClassType(DataDefine.UM_CLS.ToNZString()), true); shtView.Columns[(int)eColumn.INV_UM].CellType = CtrlUtil.CreateComboBoxCellType(BIZLookupData.LoadLookupClassType(DataDefine.UM_CLS.ToNZString()), true); //shtView.Columns[(int)eColumn.STATUS].CellType = CtrlUtil.CreateComboBoxCellType(BIZLookupData.LoadLookupClassType(DataDefine.PO_STATUS.ToNZString()), true); // ซ่อน column บางตัว for (eColumn column = eColumn.PO_LINE; column < eColumn.STATUS; column++) { FarPoint.Win.Spread.Column hiddenColumn = shtView.Columns[(int)column]; hiddenColumn.Visible = false; hiddenColumn.Label = column.ToString(); if (column == eColumn.PO_NO) { column = eColumn.BACK_ORDER_QTY; } } shtView.Columns[(int)eColumn.ModifyState].Visible = false; shtView.Columns[(int)eColumn.KeptStatus].Visible = false; shtView.Columns[(int)eColumn.RATE].Visible = false; for (int iColumn = 0; iColumn < shtView.ColumnCount; iColumn++) { if (iColumn != (int)eColumn.BUTTON) { shtView.Columns[iColumn].AllowAutoFilter = true; shtView.Columns[iColumn].AllowAutoSort = true; } } #endregion this.m_HDTOPurchaseOrder = hdtoPurchaseOrder; }
private void InitialSpread() { LoadLookupCellType(); #region No Export Column shtItemView.Columns[(int)eColView.KIND_OF_PRODUCT_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.BOI_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.PRODUCTION_DI_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.ITEM_LEVEL_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.KIND_OF_MAT_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.MAT_DI_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.SCREW_KIND_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.SCREW_HEAD_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.SCREW_TYPE_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.SCREW_REMARK1_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.SCREW_REMARK2_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.MACHINE_TYPE1_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.MACHINE_TYPE2_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.MACHINE_TYPE3_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.MACHINE_TYPE4_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.MACHINE_TYPE5_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.MACHINE_TYPE6_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.HEAT_TYPE_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.PLATING_KTC_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.BAKING_TIME_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.BAKING_TEMP_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.OTHER_TREATMENT1_KIND_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); shtItemView.Columns[(int)eColView.OTHER_TREATMENT2_KIND_NAME].StyleName = DataDefine.NO_EXPORT.ToString(); #endregion #region visible column shtItemView.Columns[(int)eColView.CUSTOMER_NAME].Visible = false; shtItemView.Columns[(int)eColView.BOI_NAME].Visible = false; shtItemView.Columns[(int)eColView.PRODUCTION_DI_NAME].Visible = false; shtItemView.Columns[(int)eColView.KIND_OF_PRODUCT_NAME].Visible = false; shtItemView.Columns[(int)eColView.ITEM_LEVEL_NAME].Visible = false; shtItemView.Columns[(int)eColView.MAT_SUPPLIER_NAME].Visible = false; shtItemView.Columns[(int)eColView.KIND_OF_MAT_NAME].Visible = false; shtItemView.Columns[(int)eColView.MAT_DI_NAME].Visible = false; shtItemView.Columns[(int)eColView.SCREW_KIND_NAME].Visible = false; shtItemView.Columns[(int)eColView.SCREW_HEAD_NAME].Visible = false; shtItemView.Columns[(int)eColView.SCREW_TYPE_NAME].Visible = false; shtItemView.Columns[(int)eColView.SCREW_REMARK1_NAME].Visible = false; shtItemView.Columns[(int)eColView.SCREW_REMARK2_NAME].Visible = false; shtItemView.Columns[(int)eColView.MACHINE_TYPE1_NAME].Visible = false; shtItemView.Columns[(int)eColView.MACHINE_TYPE2_NAME].Visible = false; shtItemView.Columns[(int)eColView.MACHINE_TYPE3_NAME].Visible = false; shtItemView.Columns[(int)eColView.MACHINE_TYPE4_NAME].Visible = false; shtItemView.Columns[(int)eColView.MACHINE_TYPE5_NAME].Visible = false; shtItemView.Columns[(int)eColView.MACHINE_TYPE6_NAME].Visible = false; shtItemView.Columns[(int)eColView.PROCESS1_NAME].Visible = false; shtItemView.Columns[(int)eColView.PROCESS2_NAME].Visible = false; shtItemView.Columns[(int)eColView.PROCESS3_NAME].Visible = false; shtItemView.Columns[(int)eColView.PROCESS4_NAME].Visible = false; shtItemView.Columns[(int)eColView.PROCESS5_NAME].Visible = false; shtItemView.Columns[(int)eColView.PROCESS6_NAME].Visible = false; shtItemView.Columns[(int)eColView.HEAT_TYPE_NAME].Visible = false; shtItemView.Columns[(int)eColView.PLATING_KTC_NAME].Visible = false; shtItemView.Columns[(int)eColView.PLATING_SUPPLIER_CD_NAME].Visible = false; shtItemView.Columns[(int)eColView.BAKING_TIME_NAME].Visible = false; shtItemView.Columns[(int)eColView.BAKING_TEMP_NAME].Visible = false; shtItemView.Columns[(int)eColView.OTHER_TREATMENT1_KIND_NAME].Visible = false; shtItemView.Columns[(int)eColView.OTHER_TREATMENT1_CONDITION_NAME].Visible = false; shtItemView.Columns[(int)eColView.OTHER_TREATMENT2_KIND_NAME].Visible = false; shtItemView.Columns[(int)eColView.OTHER_TREATMENT2_CONDITION_NAME].Visible = false; #endregion CtrlUtil.MappingDataFieldWithEnum(shtItemView, typeof(eColView)); CtrlUtil.SpreadUpdateColumnSorting(shtItemView); }
private void loadData() { tsbSave.Enabled = false; tsbCancel.Enabled = false; CtrlUtil.EnabledControl(false, txtClsCd); CtrlUtil.EnabledControl(false, txtClsDesc); CtrlUtil.EnabledControl(false, txtSEQ); shtView.ActiveSkin = Common.ACTIVE_SKIN; try { ClassListController ctlsys = new ClassListController(); ClassListUIDM model = ctlsys.LoadClassList(); //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)) //{ // txtClsInfoCd.Text = Convert.ToString(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.CLS_INFO_CD].Value); // txtClsCd.Text = Convert.ToString(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.CLS_CD].Value); // txtClsDesc.Text = Convert.ToString(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.CLS_DESC].Value); // txtSEQ.Text = Convert.ToString(shtView.Cells[shtView.ActiveRowIndex, (int)eColumns.SEQ].Value); // tsbEdit.Enabled = true; // tsbAdd.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); } }
private void InitializeSpread() { shtView.ActiveSkin = Common.ACTIVE_SKIN; LookupDataBIZ biz = new LookupDataBIZ(); LookupData locationLookupData = biz.LoadLookupLocation(); shtView.Columns[(int)eColView.CUSTOMER_CD].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 itemClassLookupData = biz.LoadLookupClassType(DataDefine.ITEM_CLS.ToNZString()); //shtView.Columns[(int)eColView.ITEM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(itemClassLookupData); //LookupData ordClassLookupData = biz.LoadLookupClassType(DataDefine.ORDER_PROCESS_CLS.ToNZString()); //shtView.Columns[(int)eColView.ORDER_PROCESS_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(ordClassLookupData); //LookupData ordcClassLookupData = biz.LoadLookupClassType(DataDefine.ORDER_CONDITION.ToNZString()); //shtView.Columns[(int)eColView.ORDER_CONDITION].CellType = CtrlUtil.CreateReadOnlyPairCellType(ordcClassLookupData); //LookupData ordpClassLookupData = biz.LoadLookupClassType(DataDefine.ORDER_PROCESS_CLS.ToNZString()); //shtView.Columns[(int)eColView.ORDER_PROCESS_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(ordpClassLookupData); //LookupData mrpClassLookupData = biz.LoadLookupClassType(DataDefine.MRP_FLAG.ToNZString()); //shtView.Columns[(int)eColView.MRP_FLAG].CellType = CtrlUtil.CreateReadOnlyPairCellType(mrpClassLookupData); //shtView.Columns[(int)eColView.CRT_DATE].CellType = CtrlUtil.CreateDateTimeCellType(); //shtView.Columns[(int)eColView.UPD_DATE].CellType = CtrlUtil.CreateDateTimeCellType(); //shtView.Columns[(int)eColView.AT_DATE].CellType = CtrlUtil.CreateDateTimeCellType(); //shtView.Columns[(int)eColView.IS_ACTIVE].CellType = CtrlUtil.CreateCheckboxCellType("",""); int[] iHideColumn = { (int)eColView.CRT_BY, (int)eColView.CRT_DATE, (int)eColView.CRT_MACHINE, (int)eColView.UPD_BY, (int)eColView.UPD_DATE, (int)eColView.UPD_MACHINE, (int)eColView.IS_ACTIVE, (int)eColView.ORDER_TYPE, (int)eColView.PRIORITY, (int)eColView.Reserve, (int)eColView.REVISION, (int)eColView.ORDER_ID, (int)eColView.YEAR_MONTH }; for (int iColumn = 0; iColumn < iHideColumn.Length; iColumn++) { shtView.Columns[iHideColumn[iColumn]].Visible = false; } CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView)); shtView.Columns[(int)eColView.DUE_DATE].CellType = CtrlUtil.CreateDateTimeCellType(); }
private void InitialSpread() { shtItemView.ActiveSkin = Common.ACTIVE_SKIN; CtrlUtil.MappingDataFieldWithEnum(shtItemView, typeof(eColView)); }
private void InitializeSpread() { shtView.ActiveSkin = Common.ACTIVE_SKIN; LookupDataBIZ biz = new LookupDataBIZ(); LookupData locationLookupData = biz.LoadLookupLocation(); shtView.Columns[(int)eColView.ORDER_LOC_CD].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 itemClassLookupData = biz.LoadLookupClassType(DataDefine.ITEM_CLS.ToNZString()); shtView.Columns[(int)eColView.ITEM_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(itemClassLookupData); LookupData ordClassLookupData = biz.LoadLookupClassType(DataDefine.ORDER_PROCESS_CLS.ToNZString()); shtView.Columns[(int)eColView.ORDER_PROCESS_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(ordClassLookupData); LookupData ordcClassLookupData = biz.LoadLookupClassType(DataDefine.ORDER_CONDITION.ToNZString()); shtView.Columns[(int)eColView.ORDER_CONDITION].CellType = CtrlUtil.CreateReadOnlyPairCellType(ordcClassLookupData); LookupData ordpClassLookupData = biz.LoadLookupClassType(DataDefine.ORDER_PROCESS_CLS.ToNZString()); shtView.Columns[(int)eColView.ORDER_PROCESS_CLS].CellType = CtrlUtil.CreateReadOnlyPairCellType(ordpClassLookupData); LookupData mrpClassLookupData = biz.LoadLookupClassType(DataDefine.MRP_FLAG.ToNZString()); shtView.Columns[(int)eColView.MRP_FLAG].CellType = CtrlUtil.CreateReadOnlyPairCellType(mrpClassLookupData); shtView.Columns[(int)eColView.CRT_DATE].CellType = CtrlUtil.CreateDateTimeCellType(Common.CurrentUserInfomation.DateFormatString); shtView.Columns[(int)eColView.CRT_DATE].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; shtView.Columns[(int)eColView.UPD_DATE].CellType = CtrlUtil.CreateDateTimeCellType(Common.CurrentUserInfomation.DateFormatString); shtView.Columns[(int)eColView.UPD_DATE].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; shtView.Columns[(int)eColView.AT_DATE].CellType = CtrlUtil.CreateDateTimeCellType(Common.CurrentUserInfomation.DateFormatString); shtView.Columns[(int)eColView.AT_DATE].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; shtView.Columns[(int)eColView.IS_ACTIVE].CellType = CtrlUtil.CreateCheckboxCellType("", ""); shtView.Columns[(int)eColView.CRT_BY].Visible = false; shtView.Columns[(int)eColView.CRT_DATE].Visible = false; shtView.Columns[(int)eColView.CRT_MACHINE].Visible = false; shtView.Columns[(int)eColView.UPD_BY].Visible = false; shtView.Columns[(int)eColView.UPD_DATE].Visible = false; shtView.Columns[(int)eColView.UPD_MACHINE].Visible = false; shtView.Columns[(int)eColView.IS_ACTIVE].Visible = false; shtView.Columns[(int)eColView.BAL_QTY].Visible = false; shtView.Columns[(int)eColView.ITEM_CLS].Visible = false; shtView.Columns[(int)eColView.MAX_CAPACITY].Visible = false; CtrlUtil.MappingDataFieldWithEnum(shtView, typeof(eColView)); for (int i = 0; i < shtView.ColumnCount; i++) { shtView.Columns[i].AllowAutoFilter = true; shtView.Columns[i].AllowAutoSort = true; } }