Exemplo n.º 1
0
 public void OnPickerCompletion(DepartmentAdapterModel e)
 {
     if (e != null)
     {
         CurrentRecord.DepartmentId   = e.DepartmentId;
         CurrentRecord.DepartmentName = e.Name;
     }
     ShowAontherRecordPicker = false;
 }
 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();
     }
 }
        public void OnCommandClicked(CommandClickEventArgs <DepartmentAdapterModel> args)
        {
            DepartmentAdapterModel item = args.RowData as DepartmentAdapterModel;

            if (args.CommandColumn.ButtonOption.Content == "修改")
            {
                CurrentRecord         = item;
                EditRecordDialogTitle = "修改紀錄";
                IsShowEditRecord      = true;
                isNewRecordMode       = false;
            }
            else if (args.CommandColumn.ButtonOption.Content == "刪除")
            {
                #region 檢查關聯資料是否存在
                #endregion
                CurrentNeedDeleteRecord = item;
                ConfirmMessageBox.Show("400px", "200px", "警告", "確認要刪除這筆紀錄嗎?");
            }
        }