public void SetFileGroup(DetailedWorkbenchInfo workbenchInfo) { if (workbenchInfo.DailyFilegroup <= 0) { txtDailyFileGroup.Text = "N/A"; txtDailyFileGroup.ToolTip = string.Empty; txtDailyFileGroup.ToolTipTitle = string.Empty; } else { txtDailyFileGroup.Text = workbenchInfo.DailyFilegroup.ToString("000"); txtDailyFileGroup.ToolTip = workbenchInfo.GetMember(Constants.Workbenches.Daily); txtDailyFileGroup.ToolTipTitle = "Daily Member"; txtDailyFileGroup.ShowToolTips = true; } if (workbenchInfo.WeeklyFilegroup <= 0) { txtWeeklyFileGroup.Text = "N/A"; txtWeeklyFileGroup.ToolTip = string.Empty; txtWeeklyFileGroup.ToolTipTitle = string.Empty; } else { txtWeeklyFileGroup.Text = workbenchInfo.WeeklyFilegroup.ToString("000"); txtWeeklyFileGroup.ToolTip = workbenchInfo.GetMember(Constants.Workbenches.Weekly); txtWeeklyFileGroup.ToolTipTitle = "Weekly Member"; txtWeeklyFileGroup.ShowToolTips = true; } }
public void SetValues(DetailedWorkbenchInfo workbenchInfo) { txtStoreType.EditValue = Constants.GetStoreTypeName(workbenchInfo.StoreType); txtWorkbench.EditValue = Constants.GetWorkbenchName(workbenchInfo.Workbench); txtParameter.EditValue = DetailedWorkbenchInfo.GetParameterName(workbenchInfo.Parameter); if (workbenchInfo.FocusGroup != DetailedWorkbenchInfo.FocusGroups.Unselected) txtFocusGroup.EditValue = workbenchInfo.NumberOf.ToString() + " " + DetailedWorkbenchInfo.GetFocusGroupName(workbenchInfo.FocusGroup); txtDepartment.EditValue = ALL(workbenchInfo.DepartmentText); if (workbenchInfo.SelectedItem.StockItem.HasValue) { txtItemClass.EditValue = ALL(workbenchInfo.SelectedItem.StockItem.Class); txtItemVendor.EditValue = ALL(workbenchInfo.SelectedItem.StockItem.Vendor); txtItemStyle.EditValue = ALL(workbenchInfo.SelectedItem.StockItem.Style); txtItemColour.EditValue = ALL(workbenchInfo.SelectedItem.StockItem.Colour); txtItemSize.EditValue = ALL(workbenchInfo.SelectedItem.StockItem.Size); txtStore.EditValue = ALL(workbenchInfo.SelectedItem.StoreId); txtStoreGrade.EditValue = ALL(workbenchInfo.SelectedItem.GradeId); txtMarket.EditValue = ALL(workbenchInfo.SelectedItem.Market); } else { txtItemClass.EditValue = ALL(workbenchInfo.Item.Class); txtItemVendor.EditValue = ALL(workbenchInfo.Item.Vendor); txtItemStyle.EditValue = ALL(workbenchInfo.Item.Style); txtItemColour.EditValue = ALL(workbenchInfo.Item.Colour); txtItemSize.EditValue = ALL(workbenchInfo.Item.Size); txtStore.EditValue = ALL(workbenchInfo.StoreId); txtStoreGrade.EditValue = ALL(workbenchInfo.StoreGradeId); if (workbenchInfo.Markets.Count > 0) txtMarket.EditValue = Selected(workbenchInfo.Markets); else txtMarket.EditValue = ALL(workbenchInfo.Market); } txtFranchise.EditValue = ALL(workbenchInfo.FranchiseId); txtCoordinateGroup.EditValue = ALL(workbenchInfo.CoordinateGroup); txtUPC.EditValue = ALL(workbenchInfo.UPC); txtEventCode.EditValue = ALL(workbenchInfo.EventCodeText); txtStoreGroup.EditValue = ALL(workbenchInfo.StoreGroup); if (workbenchInfo.Promotions.Count == 0) txtPromotions.EditValue = "ALL"; else txtPromotions.EditValue = Selected(workbenchInfo.Promotions); chkExcludeItemsWithZeroStock.Checked = workbenchInfo.ExcludeZeroStock; chkShowProposedMarkedDownLines.Checked = workbenchInfo.ShowProposedMarkedDownLines; chkShowMarkDownLines.Checked = workbenchInfo.ShowMarkedDownLines; chkShowFullPriceLines.Checked = workbenchInfo.ShowFullPriceLines; }
public override void ShowDetailedForm(DetailedWorkbenchInfo workbench) { _resetControls = (workbench == null); if (workbench != null) base.Instance = workbench; base.Instance.Stage = BusinessLayer.DetailedWorkbenchInfo.Stages.Parameters; this.RestoreFormLocation(); this.Show(); }
public override void ShowDetailedForm(DetailedWorkbenchInfo workbench) { base.Instance = workbench; base.Instance.Stage = BusinessLayer.DetailedWorkbenchInfo.Stages.SelectStore; if (RefreshStoreView()) { StoresAvailable = true; this.RestoreFormLocation(); btnNext.Enabled = false; this.Show(); this.Cursor = Cursors.Default; } else { StoresAvailable = false; MessageBox.Show("No stores available that match your selection critiera", "Store/Class", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.Close(); } }
public override void ShowDetailedForm(DetailedWorkbenchInfo WBDetailedInfo) { if (base.Setup()) { Application.UseWaitCursor = true; Application.DoEvents(); base.Instance = WBDetailedInfo; base.Instance.ProgressEvent += ((message, percentageComplete) => { base.UpdateProgress(message, percentageComplete); }); base.Instance.SelectedItem.Clear(); base.Instance.Stage = BusinessLayer.DetailedWorkbenchInfo.Stages.DetailedWorkbench; this.Text = base.Instance.DepartmentId.ToString() + " - Detailed Allocators Workbench"; this.Show(); Application.UseWaitCursor = false; RefreshGrid(true); } }
private void SwitchLevel(DetailedWorkbenchInfo.Parameters newParameter) { var switchLevel = false; if (IsDirty) switch (Question.YesNoCancel("Changes have been made to these items, save them before switching levels", this.Text)) { case System.Windows.Forms.DialogResult.Yes: base.Instance._giveItBackChanged = _giveItBackChanged; switchLevel = base.Instance.ApplyChanges(); _giveItBackChanged = false; base.Instance._giveItBackChanged = false; break; case System.Windows.Forms.DialogResult.No: base.Instance.DiscardChanges(); switchLevel = true; break; case System.Windows.Forms.DialogResult.Cancel: switchLevel = false; break; } else switchLevel = true; if (switchLevel) { // Get rid of any existing locks base.Instance.ReleaseLocks(); // not switching levels, just showing all values for this level as originally selected. if (base.Instance.Parameter == newParameter) { base.Instance.SelectedItem.Clear(); RefreshGrid(true); } else { var curParameter = base.Instance.Parameter; if (base.Instance.Parameter.ToString().ToLower().Contains("style") || newParameter.ToString().ToLower().Contains("style")) base.Instance.SelectedItem.SetItem(Convert.ToDecimal(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colClass)), Convert.ToDecimal(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colVendor)), Convert.ToDecimal(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colStyle))); else base.Instance.SelectedItem.SetItem(Convert.ToDecimal(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colClass)), Convert.ToDecimal(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colVendor)), Convert.ToDecimal(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colStyle)), Convert.ToDecimal(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colColour)), Convert.ToDecimal(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colSize))); base.Instance.SelectedItem.SetGradeId(null); base.Instance.SelectedItem.SetMarket(null); base.Instance.SelectedItem.SetStoreId(null); var storeId = Convert.ToDecimal(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colStore)); switch (curParameter) { case DetailedWorkbenchInfo.Parameters.ItemMarketLevel: case DetailedWorkbenchInfo.Parameters.StyleMarketLevel: if (newParameter == DetailedWorkbenchInfo.Parameters.ItemLevel || newParameter == DetailedWorkbenchInfo.Parameters.StyleLevel) base.Instance.Promotions.Clear(); else base.Instance.SelectedItem.SetMarket(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colMarket)); break; case DetailedWorkbenchInfo.Parameters.ItemGradeLevel: case DetailedWorkbenchInfo.Parameters.StyleGradeLevel: if (newParameter == DetailedWorkbenchInfo.Parameters.ItemLevel || newParameter == DetailedWorkbenchInfo.Parameters.StyleLevel) base.Instance.Promotions.Clear(); else base.Instance.SelectedItem.SetGradeId(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colGrade)); break; case DetailedWorkbenchInfo.Parameters.ItemStoreLevel: case DetailedWorkbenchInfo.Parameters.StyleStoreLevel: switch (newParameter) { case DetailedWorkbenchInfo.Parameters.ItemLevel: case DetailedWorkbenchInfo.Parameters.StyleLevel: base.Instance.Promotions.Clear(); break; case DetailedWorkbenchInfo.Parameters.ItemMarketLevel: case DetailedWorkbenchInfo.Parameters.StyleMarketLevel: base.Instance.SelectedItem.SetMarket(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colMarket)); break; case DetailedWorkbenchInfo.Parameters.ItemGradeLevel: case DetailedWorkbenchInfo.Parameters.StyleGradeLevel: base.Instance.SelectedItem.SetGradeId(viewLevers.GetFocusedRowCellDisplayText(DetailedWorkbenchInfo.colGrade)); break; case DetailedWorkbenchInfo.Parameters.ItemStoreLevel: case DetailedWorkbenchInfo.Parameters.StyleStoreLevel: base.Instance.SelectedItem.SetStoreId(storeId); break; } break; } base.Instance.PreviousParameter = curParameter; base.Instance.Parameter = newParameter; RefreshGrid(true, curParameter); } } }
public virtual void ShowDetailedForm(DetailedWorkbenchInfo workbenchInfo) { }