public CategoryMainViewModel(ICategoryMainService CurrentService, BackendDBContext context, IMapper Mapper, TranscationResultHelper transcationResultHelper) { this.CurrentService = CurrentService; this.context = context; mapper = Mapper; TranscationResultHelper = transcationResultHelper; CategoryMainSort.Initialization(SortConditions); #region 工具列按鈕初始化 Toolbaritems.Add(new ItemModel() { Id = ButtonIdHelper.ButtonIdAdd, Text = "新增", TooltipText = "新增", Type = ItemType.Button, PrefixIcon = "mdi mdi-plus-thick", Align = ItemAlign.Left, }); Toolbaritems.Add(new ItemModel() { Id = ButtonIdHelper.ButtonIdRefresh, Text = "重新整理", TooltipText = "重新整理", PrefixIcon = "mdi mdi-refresh", Align = ItemAlign.Left, }); Toolbaritems.Add("Search"); #endregion }
public WorkOrderViewModel(IWorkOrderService CurrentService, BackendDBContext context, IMapper Mapper, TranscationResultHelper transcationResultHelper, IFlowMasterService flowMasterService, UserHelper currentUserHelper, CurrentUser currentUser, ICategoryMainService categoryMainService, ICategorySubService categorySubService) { this.CurrentService = CurrentService; this.context = context; mapper = Mapper; TranscationResultHelper = transcationResultHelper; FlowMasterService = flowMasterService; CurrentUserHelper = currentUserHelper; CurrentUser = currentUser; CategoryMainService = categoryMainService; CategorySubService = categorySubService; WorkOrderSort.Initialization(SortConditions); WorkOrderStatusCondition.Initialization(WorkOrderStatusConditions); CurrentWorkOrderStatusCondition.Id = WorkOrderStatusConditions[0].Id; CurrentWorkOrderStatusCondition.Title = WorkOrderStatusConditions[0].Title; FilterWorkOrderStatusCondition = CurrentWorkOrderStatusCondition.Id; WorkOrderStatusCondition.Initialization(WorkOrderStatusRecordConditions); WorkOrderStatusRecordConditions.RemoveAt(0); #region 工具列按鈕初始化 Toolbaritems.Add(new ItemModel() { Id = ButtonIdHelper.ButtonIdAdd, Text = "新增", TooltipText = "新增", Type = ItemType.Button, PrefixIcon = "mdi mdi-plus-thick", Align = ItemAlign.Left, }); Toolbaritems.Add(new ItemModel() { Id = ButtonIdHelper.ButtonIdRefresh, Text = "重新整理", TooltipText = "重新整理", PrefixIcon = "mdi mdi-refresh", Align = ItemAlign.Left, }); Toolbaritems.Add("Search"); #endregion #region 互動式彈出功能表 ContextMenu 初始化 ContextMenuItems.Add(new ContextMenuItemModel { Text = "送審", Target = ".e-content", Id = "送審", IconCss = "mdi mdi-send-circle", }); ContextMenuItems.Add(new ContextMenuItemModel { Text = "查看送審記錄", Target = ".e-content", Id = "查看送審記錄", IconCss = "mdi mdi-file-find", }); #endregion }