public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
        {
            if (args.Item.Id == ButtonIdHelper.ButtonIdAdd)
            {
                CurrentRecord = new MenuDataAdapterModel();
                #region 針對新增的紀錄所要做的初始值設定商業邏輯
                CurrentRecord.ForceLoad = false;
                #endregion
                EditRecordDialogTitle    = "新增紀錄";
                isNewRecordMode          = true;
                IsShowEditRecord         = true;
                CurrentRecord.MenuRoleId = Header.Id;
                //CurrentRecord.Name = Header.Title;
            }
            else if (args.Item.Id == ButtonIdHelper.ButtonIdRefresh)
            {
                dataGrid.RefreshGrid();
            }
            else if (args.Item.Id == ButtonIdHelper.ButtonIdReOrder)
            {
                await CurrentService.ReorderByHeaderIDAsync(Header.Id);

                dataGrid.RefreshGrid();
            }
        }
 public void ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
 {
     if (args.Item.Text == "新增")
     {
         CurrentRecord         = new DepartmentAdapterModel();
         EditRecordDialogTitle = "新增紀錄";
         isNewRecordMode       = true;
         IsShowEditRecord      = true;
     }
     else if (args.Item.Text == "重新整理")
     {
         dataGrid.RefreshGrid();
     }
 }
Exemple #3
0
 public void ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
 {
     if (args.Item.Id == ButtonIdHelper.ButtonIdAdd)
     {
         CurrentRecord = new ProductAdapterModel();
         #region 針對新增的紀錄所要做的初始值設定商業邏輯
         #endregion
         EditRecordDialogTitle = "新增紀錄";
         isNewRecordMode       = true;
         IsShowEditRecord      = true;
     }
     else if (args.Item.Id == ButtonIdHelper.ButtonIdRefresh)
     {
         dataGrid.RefreshGrid();
     }
 }
Exemple #4
0
        public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
        {
            if (args.Item.Id == ButtonIdHelper.ButtonIdAdd)
            {
                CurrentRecord = new MailQueueAdapterModel();
                //#region 針對新增的紀錄所要做的初始值設定商業邏輯
                //#endregion
                //EditRecordDialogTitle = "新增紀錄";
                //isNewRecordMode = true;
                //IsShowEditRecord = true;

                #region 產生測試發送郵件紀錄
                CurrentRecord.Body      = "這是測試郵件的<h1>內容</h1>";
                CurrentRecord.CreatedAt = DateTime.Now;
                CurrentRecord.SendedAt  = null;
                CurrentRecord.SendTimes = 0;
                CurrentRecord.Status    = MagicHelper.MailStatus等待;
                CurrentRecord.Subject   = $"測試郵件主旨 {DateTime.Now}";
                CurrentRecord.To        = $"*****@*****.**";
                await CurrentService.AddAsync(CurrentRecord);

                dataGrid.RefreshGrid();
                #endregion
            }
            else if (args.Item.Id == ButtonIdHelper.ButtonIdRefresh)
            {
                dataGrid.RefreshGrid();
            }
        }
        public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
        {
            if (args.Item.Id == ButtonIdHelper.ButtonIdAdd)
            {
                CurrentRecord = new LeaveFormAdapterModel();
                #region 針對新增的紀錄所要做的初始值設定商業邏輯
                CurrentRecord.FormDate     = DateTime.Now;
                CurrentRecord.BeginDate    = DateTime.Now;
                CurrentRecord.CompleteDate = DateTime.Now;
                await 取得額外清單查詢物件Async();

                #endregion
                EditRecordDialogTitle = "新增紀錄";
                isNewRecordMode       = true;
                IsShowEditRecord      = true;
            }
            else if (args.Item.Id == ButtonIdHelper.ButtonIdRefresh)
            {
                dataGrid.RefreshGrid();
            }
        }
Exemple #6
0
        public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
        {
            if (args.Item.Id == ButtonIdHelper.ButtonIdAdd)
            {
                CurrentRecord = new FlowMasterAdapterModel();
                #region 針對新增的紀錄所要做的初始值設定商業邏輯
                #endregion
                EditRecordDialogTitle = "新增紀錄";
                IsNewRecordMode       = true;
                IsShowEditRecord      = true;
                var user = await CurrentUserHelper.GetCurrentUserAsync();

                CurrentRecord.MyUserId     = user.Id;
                CurrentRecord.MyUserName   = user.Name;
                CurrentRecord.Status       = 0;
                CurrentRecord.ProcessLevel = 0;
                CurrentRecord.Code         = UniqueStringHelper.GetCode();
                CurrentRecord.CreateDate   = DateTime.Now;
            }
            else if (args.Item.Id == ButtonIdHelper.ButtonIdRefresh)
            {
                dataGrid.RefreshGrid();
            }
        }
Exemple #7
0
 public void ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
 {
     if (args.Item.Id == ButtonIdHelper.ButtonIdAdd)
     {
         CurrentRecord = new MyUserAdapterModel();
         #region 針對新增的紀錄所要做的初始值設定商業邏輯
         CurrentRecord.Status = true;
         #endregion
         EditRecordDialogTitle                     = "新增紀錄";
         isNewRecordMode                           = true;
         IsShowEditRecord                          = true;
         CurrentRecord.ForceLogoutDatetime         = DateTime.Now;
         CurrentRecord.ForceChangePassword         = true;
         CurrentRecord.ForceChangePasswordDatetime = DateTime.Now;
         CurrentRecord.LoginFailUnlockDatetime     = DateTime.Now;
         CurrentRecord.LoginFailTimes              = 0;
         CurrentRecord.LastLoginDatetime           = DateTime.Now;
     }
     else if (args.Item.Id == ButtonIdHelper.ButtonIdRefresh)
     {
         dataGrid.RefreshGrid();
     }
 }
        public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
        {
            if (args.Item.Id == ButtonIdHelper.ButtonIdAdd)
            {
                CurrentRecord = new WorkOrderAdapterModel();
                #region 針對新增的紀錄所要做的初始值設定商業邏輯
                #endregion
                EditRecordDialogTitle = "新增紀錄";
                isNewRecordMode       = true;
                IsShowEditRecord      = true;

                CurrentRecord.CreatedAt = DateTime.Now;
                CurrentRecord.Status    = 0;
                CurrentRecord.Code      = UniqueStringHelper.GetCode();

                await GetCategoryMainAdapterModels();
            }
            else if (args.Item.Id == ButtonIdHelper.ButtonIdRefresh)
            {
                dataGrid.RefreshGrid();
            }
        }