コード例 #1
0
 private void SetAccessControl()
 {
     //权限控制:
     btnNew.IsEnabled = AuthMgr.HasFunctionPoint(AuthKeyConst.RMA_Refund_New);
     dataRMARefundList.IsShowAllExcelExporter = false;
     //dataRMARefundList.IsShowAllExcelExporter=AuthMgr.HasFunctionPoint(AuthKeyConst.RMA_Refund_Export);
 }
コード例 #2
0
ファイル: EIMSEventMemo.xaml.cs プロジェクト: sanlonezhang/ql
        /// <summary>
        /// 报表导出
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.EIMS_EventMemo_Export))
            {
                Window.Alert(ResEIMSEventMemo.Msg_HasNoRight);
                return;
            }
            if (dgQueryResult.ItemsSource == null)
            {
                Window.Alert(ResEIMSEventMemo.Msg_PleaseQueryData);
                return;
            }
            m_QueryFilter.PagingInfo = new PagingInfo()
            {
                PageSize  = ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = string.Empty
            };

            ComprehensiveReportFacade facade = new ComprehensiveReportFacade(this);

            ColumnSet col = new ColumnSet(dgQueryResult);

            m_QueryFacde.ExportEventMemo(m_QueryFilter, new ColumnSet[] { col });
        }
コード例 #3
0
        private void Button_Save_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Invoice_SysAccountAddPoint_AddPoint))
            {
                Window.Alert(ResCommon.Message_NoAuthorize);
                return;
            }

            ValidationManager.Validate(this.LayoutRoot);
            if (vm.HasValidationErrors)
            {
                return;
            }
            facade.AjustPoint(vm, (obj, args) =>
            {
                Window.Alert(ResSysAccountAddPoint.Msg_AdjustSuccess);
                facade.LoadSysAccountValidScore(int.Parse(vm.CustomerSysNo), (obj1, args1) =>
                {
                    Text_CurrentPoint.Visibility = Visibility.Visible;
                    Text_CurrentPoint.Text       = string.Format(ResSysAccountAddPoint.Message_CurrentAccountPoint, args1.Result.ToString());


                    vm.Memo  = string.Empty;
                    vm.Point = string.Empty;
                });
            });
        }
コード例 #4
0
 //设置按钮权限点
 private void SetConvertRight()
 {
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ConvertRequest_Create))
     {
         btnSave.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ConvertRequest_Reset))
     {
         btnReset.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ConvertRequest_Abandon))
     {
         btnAbandon.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ConvertRequest_CancelAbandon))
     {
         btnCancelAbandon.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ConvertRequest_Audit))
     {
         btnAudit.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ConvertRequest_CancelAudit))
     {
         btnCancelAudit.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ConvertRequest_OutStock))
     {
         btnOutStock.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ConvertRequest_Print))
     {
         btnPrint.IsEnabled = false;
     }
 }
コード例 #5
0
        /// <summary>
        /// 导出报表数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.EIMS_ReceiveByVendor_Export))
            {
                Window.Alert(ResEIMSReceiveReport.Msg_HasNoRight);
                return;
            }
            if (dgQueryResult.ItemsSource == null)
            {
                Window.Alert(ResEIMSReceiveReport.Msg_PleaseQueryData);
                return;
            }
            m_queryRequest.PagingInfo = new PagingInfo()
            {
                PageSize  = ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = string.Empty
            };

            ReceivedReportFacade facade = new ReceivedReportFacade(this);

            ColumnSet col = new ColumnSet(dgQueryResult);

            facade.ExportReceiveByVendor(m_queryRequest, new ColumnSet[] { col });
        }
コード例 #6
0
 private void CheckRights()
 {
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_OrderCheck_PayType_Save))
     {
         this.Button_MoveToLeft.IsEnabled = this.Button_MoveToRight.IsEnabled = this.Button_Save.IsEnabled = false;
     }
 }
コード例 #7
0
        private void Hyperlink_DeleteData_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Common_FreeShippingChargeRule_Delete))
            {
                Window.Alert("您没有此功能的操作权限!");
                return;
            }
            dynamic rows = QueryResult.SelectedItem;

            if (rows == null)
            {
                return;
            }
            int sysno = (int)rows.SysNo;

            Window.Confirm("你确定要删除该条免运费规则吗", (obj, arg) =>
            {
                if (arg.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK)
                {
                    _facade.Delete(sysno, (x, y) =>
                    {
                        if (y.FaultsHandle())
                        {
                            return;
                        }
                        Window.Alert("删除成功!");
                        QueryResult.Bind();
                    });
                }
            });
        }
コード例 #8
0
        private void LoadGridData(Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
        {
            queryFilter.PageInfo = new ECCentral.QueryFilter.Common.PagingInfo()
            {
                PageSize  = QueryResultGrid.PageSize,
                PageIndex = QueryResultGrid.PageIndex,
                SortBy    = e.SortField
            };
            queryFilter.IsManagerPM     = AuthMgr.HasFunctionAbsolute(AuthKeyConst.PO_SeniorPM_Query);
            queryFilter.PageInfo.SortBy = e.SortField;
            serviceFacade.QueryConsignSettlements(queryFilter, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                var consignList             = args.Result.Rows;
                int totalCount              = args.Result.TotalCount;
                QueryResultGrid.TotalCount  = totalCount;
                QueryResultGrid.ItemsSource = consignList;

                decimal totalDiffAmt = 0m;

                foreach (var x in consignList)
                {
                    totalDiffAmt += x["Balance"] == null ? 0m : Convert.ToDecimal(x["Balance"].ToString());
                }

                this.lblSettleDiffTotalAmt.Text = string.Format("结算差额总计:{0}", totalDiffAmt.ToString("f2"));
            });
        }
コード例 #9
0
ファイル: GatherQuery.xaml.cs プロジェクト: sanlonezhang/ql
 private void SetAccessControl()
 {
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.PO_Gather_Query_New))
     {
         btnNewGatherSettled.IsEnabled = false;
     }
 }
コード例 #10
0
        private void btnMaintainMaliceUser_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_MaintainMaliceUser))
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResCustomerBasicInfo.rightMsg_NoRight_MaintainMaliceUser);
                return;
            }
            CustomerBasicVM vm    = this.DataContext as CustomerBasicVM;
            bool            flag  = ValidationManager.Validate(this.gridBadCustomer);
            string          path  = txtMemo.GetBindingExpression(TextBox.TextProperty).ParentBinding.Path.Path;
            var             error = vm.ValidationErrors.FirstOrDefault(p => p.MemberNames.Contains(path));

            if (error == null && vm.ValidationErrors.Count > 0)
            {
                vm.ValidationErrors.Clear();
            }
            if (flag)
            {
                new CustomerFacade().MaintainMaliceUser(vm, (obj, args) =>
                {
                    if (args.FaultsHandle())
                    {
                        return;
                    }
                    CPApplication.Current.CurrentPage.Context.Window.Refresh();
                    CPApplication.Current.CurrentPage.Context.Window.Alert(ResCustomerMaintain.Info_SaveSuccessfully);
                });
            }
        }
コード例 #11
0
 private void SetAccessControl()
 {
     //权限控制:
     Button_Dispatch.IsEnabled       = AuthMgr.HasFunctionPoint(AuthKeyConst.RMA_RMATracking_Dispatch);
     Button_CancelDispatch.IsEnabled = AuthMgr.HasFunctionPoint(AuthKeyConst.RMA_RMATracking_CancelDispatch);
     this.DataGrid_Query_ResultList.IsShowAllExcelExporter = AuthMgr.HasFunctionPoint(AuthKeyConst.RMA_RMATracking_Export);
 }
コード例 #12
0
        public void SetButtonStatus()
        {
            RegisterVM vm = this.Tag as RegisterVM;

            btnUpdate.IsEnabled = AuthMgr.HasFunctionPoint(AuthKeyConst.RMA_Register_CanUpdate);
            //btnPrint.IsEnabled = AuthMgr.HasFunctionPoint(AuthKeyConst.RMA_Register_can);
        }
コード例 #13
0
ファイル: ReasonCode.xaml.cs プロジェクト: sanlonezhang/ql
        //添加
        private void btnNew_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Common_ReasonCode_Add))
            {
                Window.Alert("您没有此功能的操作权限");
                return;
            }
            ReasonCodeNode node = this.tvReasonCode.SelectedNode;

            if (node == null)
            {
                Window.Alert("请选择一个节点");
                return;
            }

            string path = this.tvReasonCode.ReasonCodePath;

            UCReasonCodeEdit reasonCodeCtrl = new UCReasonCodeEdit(node.SysNo, node.ParentSysNo, node.Description, path, false);

            reasonCodeCtrl.Dialog = Window.ShowDialog(
                "添加节点"
                , reasonCodeCtrl
                , (s, args) =>
            {
                if (args.DialogResult == DialogResultType.OK)
                {
                    BindDataFromDB();
                }
            }
                , new Size(550, 300)
                );
        }
コード例 #14
0
        private void ButtonPassAudit_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(_ViewModel.VerifyMemo))
            {
                //this.txtVerifyMemo.Validation("请输入审核理由");
                this.txtVerifyMemo.Validation(ResCountdownMaintain.Msg_AuditReason);
                return;
            }

            _ViewModel.Status = CountdownStatus.Ready;
            if (_ViewModel.IsPromotionSchedule)
            {
                if (!AuthMgr.HasFunctionPoint(AuthKeyConst.MKT_PromotionSchedule_AdvancedAuditPromotionSchedule_Check))
                {
                    _ViewModel.Status = CountdownStatus.WaitForVerify;
                }
            }
            else
            {
                if (!AuthMgr.HasFunctionPoint(AuthKeyConst.MKT_Countdown_AdvancedAuditCountDown_Check))
                {
                    _ViewModel.Status = CountdownStatus.WaitForVerify;
                }
            }

            _Facade.Verify(_ViewModel, (o, arg) =>
            {
                if (!arg.FaultsHandle())
                {
                    // Window.Alert("操作成功");
                    Window.Alert(ResCountdownMaintain.Msg_OperationSuccess);
                    Window.Refresh();
                }
            });
        }
コード例 #15
0
        private void hyperlinkPropertyValueMultiLanguage_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.IM_ProductMaintain_ItemMultiLanguage))
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert("你无此操作权限");
                return;
            }

            dynamic selectItem = this.dgProductPropertyInfo.SelectedItem as dynamic;

            if (selectItem.SysNo == null)
            {
                MessageBox.Show("还没有输入该属性的值,请输入值保存之后再刷新页面!");
                return;
            }

            UCMultiLanguageMaintain item = new UCMultiLanguageMaintain(selectItem.SysNo, "ProductHasProperty");

            item.Dialog = MyWindow.ShowDialog("设置属性多语言", item, (s, args) =>
            {
                if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK)
                {
                    //this.dgProductPropertyInfo.Bind();
                }
            }, new Size(750, 600));
        }
コード例 #16
0
        public void SetButtonStatus()
        {
            RegisterRevertVM vm = this.DataContext as RegisterRevertVM;

            btnAudit.IsEnabled = vm.RevertStatus == RMARevertStatus.WaitingAudit &&
                                 AuthMgr.HasFunctionPoint(AuthKeyConst.RMA_Register_CanRevertAudit);
        }
コード例 #17
0
        private void Hyperlink_EditData_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Common_ShipTypeAreaPrice_Edit))
            {
                Window.Alert("您没有此功能的操作权限!");
                return;
            }
            ShipTypeAreaPriceInfoVM _infoView = new ShipTypeAreaPriceInfoVM();
            dynamic row = QueryResult.SelectedItem;

            if (row != null)
            {
                _infoView.AreaSysNo     = row.AreaSysNo;
                _infoView.ShipTypeSysNo = row.ShipTypeSysNo;
                _infoView.BaseWeight    = row.BaseWeight.ToString();
                _infoView.TopWeight     = row.TopWeight.ToString();
                _infoView.UnitWeight    = row.UnitWeight.ToString();
                _infoView.UnitPrice     = row.UnitPrice.ToString();
                _infoView.MaxPrice      = row.MaxPrice.ToString();
                _infoView.SysNo         = row.SysNo;
                _infoView.ChannelID     = _infoView.ListWebChannel[1].ChannelID;
                _infoView.VendorName    = row.VendorName;
                _infoView.VendorSysNo   = row.VendorSysNo;
                Dialog(_infoView);
            }
        }
コード例 #18
0
ファイル: UserRoleAdd.xaml.cs プロジェクト: sanlonezhang/ql
        //生效
        private void btnValid_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Vendor_RoleAdd_Effect))
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResVendorInfo.Msg_HasNoRight);
                return;
            }
            Role role = new Role();

            role.SysNo       = this.roleSysNo;
            role.RoleName    = this.RoleName.Text;
            role.Status      = "A";
            role.CompanyCode = CPApplication.Current.CompanyCode;
            role.InUser      = CPApplication.Current.LoginUser.DisplayName;
            role.EditUser    = CPApplication.Current.LoginUser.DisplayName;

            m_facade.UpdateRoleStatus(role, (o, arg) =>
            {
                if (!arg.FaultsHandle())
                {
                    this.Dialog.ResultArgs.DialogResult = DialogResultType.OK;
                    this.Dialog.Close(true);
                }
            });
        }
コード例 #19
0
        private void BtnBatchActiveClick(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.IM_ProductMaintain_ItemProductBatchActive))
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert("你无此操作权限");
                return;
            }

            List <int> batchOnSaleList =
                VM.GroupProductList.Where(p => p.IsChecked).Select(p => p.ProductSysNo).ToList();

            if (!batchOnSaleList.Any())
            {
                CPApplication.Current.CurrentPage.Context.Window.Alert("请选择商品", MessageType.Error);
            }
            else
            {
                var facade = new ProductFacade(CPApplication.Current.CurrentPage);
                facade.ProductBatchOnSale(batchOnSaleList, (obj, args)
                                          =>
                {
                    if (!args.FaultsHandle())
                    {
                        var successCount = 0;

                        var result = new StringBuilder();

                        foreach (var p in VM.GroupProductList.Where(p => p.IsChecked).Where(p => !args.Result.ContainsKey(p.ProductSysNo)))
                        {
                            successCount++;
                            p.ProductStatus = ProductStatus.Active;
                            if (VM.ProductID == p.ProductID)
                            {
                                ((ProductMaintain)CPApplication.Current.CurrentPage).VM.ProductMaintainBasicInfo.ProductMaintainBasicInfoStatusInfo.ProductStatus = ProductStatus.Active;
                            }
                        }

                        if (args.Result.Any())
                        {
                            foreach (var r in args.Result)
                            {
                                result.AppendLine(r.Value);
                            }
                        }

                        result.AppendLine("更新成功,影响记录数" + successCount + "条");
                        if (args.Result.Any())
                        {
                            CPApplication.Current.CurrentPage.Context.
                            Window.Alert(result.ToString());
                        }
                        else
                        {
                            CPApplication.Current.CurrentPage.Context.
                            Window.MessageBox.Show(result.ToString().Trim(), MessageBoxType.Success);
                        }
                    }
                });
            }
        }
コード例 #20
0
        /// <summary>
        /// 验证权限,控制按钮的可用性
        /// </summary>
        private void VerifyPermission()
        {
            this.dgPostIncomeQueryResult.IsShowExcelExporter = false;

            this.btnBatchConfirm.IsEnabled = AuthMgr.HasFunctionPoint(AuthKeyConst.Invoice_PostIncomeQuery_Confirm);
            this.dgPostIncomeQueryResult.IsShowAllExcelExporter = AuthMgr.HasFunctionPoint(AuthKeyConst.Invoice_PostIncomeQuery_Export);
        }
コード例 #21
0
        private void Hyperlink_EditData_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Common_FreeShippingChargeRule_Edit))
            {
                Window.Alert("您没有此功能的操作权限!");
                return;
            }
            dynamic rows = QueryResult.SelectedItem;

            if (rows == null)
            {
                return;
            }
            var sysno = rows.SysNo;

            UCFreeShippingChargeRule dialog = new UCFreeShippingChargeRule(sysno);

            dialog.CurrentDialog = CPApplication.Current.CurrentPage.Context.Window.ShowDialog("编辑免运费规则", dialog, (obj, args) =>
            {
                if (args.DialogResult == Newegg.Oversea.Silverlight.Controls.Components.DialogResultType.OK)
                {
                    QueryResult.Bind();
                }
            });
        }
コード例 #22
0
 public void OnActionExecuting(ActionExecutingContext filterContext)
 {
     if (!AuthMgr.HasAuth(permissionKeys))
     {
         throw new BusinessException("对不起,您没有此功能的操作权限,请联系管理员。");
     }
 }
コード例 #23
0
 private void CheckRights()
 {
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_Gift_Add))
     {
         this.ButtonCreate.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_Gift_Abandon))
     {
         this.ButtonAbandon.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_Gift_CancelAbandon))
     {
         this.ButtonCancelAbandon.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_Gift_SendGiftMsg))
     {
         this.ButtonSendWinGift.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_Gift_SendGiftAwoke))
     {
         this.ButtonSendAlert.IsEnabled = false;
     }
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_Gift_SendAbandonMsg))
     {
         this.ButtonVoid.IsEnabled = false;
     }
 }
コード例 #24
0
        private void dgVirtualRequestMemoQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_VirtualRequestMemoQuery_ExportExcell))
            {
                Window.Alert("对不起,你没有权限进行此操作!");
                return;
            }

            if (this.dgVirtualRequestMemoQueryResult == null || this.dgVirtualRequestMemoQueryResult.TotalCount == 0)
            {
                Window.Alert("没有可供导出的数据!");
                return;
            }
            //导出全部:
            if (null != PageView.QueryInfo)
            {
                VirtualRequestQueryVM exportQueryRequest = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <VirtualRequestQueryVM>(PageView.QueryInfo);
                exportQueryRequest.PagingInfo = new QueryFilter.Common.PagingInfo()
                {
                    PageIndex = 0, PageSize = ConstValue.MaxRowCountLimit
                };
                ColumnSet columnSet = new ColumnSet()
                                      .Add("ProductID", ResVirtualRequestMemoQuery.Grid_ProductID, 40)
                                      .Add("ProductName", ResVirtualRequestMemoQuery.Grid_ProductName, 40)
                                      .Add("VirtualQuantity", ResVirtualRequestMemoQuery.Grid_AdjustVirtualQty, 40)
                                      .Add("VirtualType", ResVirtualRequestMemoQuery.Grid_VirtualType, 40)
                                      .Add("CreateUserName", ResVirtualRequestMemoQuery.Grid_OperationUser, 40)
                                      .Add("CreateDate", ResVirtualRequestMemoQuery.Grid_OperationDate, 30)
                                      .Add("Note", ResVirtualRequestMemoQuery.Grid_ActionMemo, 30);
                new VirtualRequestQueryFacade(this).ExportExcelForVirtualRequestMemo(exportQueryRequest, new ColumnSet[] { columnSet });
            }
        }
コード例 #25
0
        private void dgItemCardQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ItemAllocatedCardQuery_ExportExcellAll))
            {
                Window.Alert("对不起,你没有权限进行此操作!");
                return;
            }

            if (this.dgItemCardQueryResult == null | this.dgItemCardQueryResult.TotalCount == 0)
            {
                Window.Alert("没有可供导出的数据!");
                return;
            }
            //导出全部:
            if (null != PageView.QueryInfo)
            {
                InventoryAllocatedCardQueryVM exportQueryRequest = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <InventoryAllocatedCardQueryVM>(PageView.QueryInfo);
                exportQueryRequest.PagingInfo = new QueryFilter.Common.PagingInfo()
                {
                    PageIndex = 0, PageSize = ConstValue.MaxRowCountLimit
                };
                ColumnSet columnSet = new ColumnSet()
                                      .Add("OrderNameString", ResItemAllocatedCardQuery.GridHeader_OrderName, 40)
                                      .Add("OrderSysNo", ResItemAllocatedCardQuery.GridHeader_OrderCode, 40)
                                      .Add("OrderTime", ResItemAllocatedCardQuery.GridHeader_OrderTime, 20)
                                      .Add("OrderQty", ResItemAllocatedCardQuery.GridHeader_OrderQty, 20)
                                      .Add("OrderThenQty", ResItemAllocatedCardQuery.GridHeader_OrderThenQty, 20);
                new ItemAllocatedCardQueryFacade(this).ExportExcelForItemAllocatedCardOrders(exportQueryRequest, new ColumnSet[] { columnSet });
            }
        }
コード例 #26
0
 public override void OnPageLoad(object sender, EventArgs e)
 {
     viewModel = new CustomerCalingQueryVM();
     viewModel.HasExportRight = AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_CallsEvents_Export);
     this.DataContext         = viewModel;
     CheckRights();
     facade = new CustomerCallingFacade(this);
     facade.GetUpdateUser((obj, args) =>
     {
         if (args.FaultsHandle())
         {
             return;
         }
         if (args.Result != null && args.Result.Rows != null)
         {
             List <UserInfo> list = new List <UserInfo>();
             foreach (var item in args.Result.Rows)
             {
                 list.Add(new UserInfo()
                 {
                     UserDisplayName = item.DisplayName, SysNo = item.LastEditUserSysNo
                 });
             }
             list.Insert(0, new UserInfo()
             {
                 UserDisplayName = ResCommonEnum.Enum_All
             });
             cbLastUpdateUser.ItemsSource = list;
         }
     });
     base.OnPageLoad(sender, e);
 }
コード例 #27
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void hlbtnEdit_Click(object sender, RoutedEventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.EIMS_InvoiceEntry_Edit))
            {
                Window.Alert(ResEIMSInvoiceEntry.Msg_HasNoRight);
                return;
            }
            EIMSInvoiceEntryVM selectView = this.dgQueryResult.SelectedItem as EIMSInvoiceEntryVM;

            m_QueryFacde.QueryInvoiceList(selectView.InvoiceNumber, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                if (args.Result.EIMSList.Convert <EIMSInvoiceInfoEntity, EIMSInvoiceInfoEntityVM>().Count > 1)
                {
                    MutiEdit(selectView);
                }
                else
                {
                    SingleEdit(selectView);
                }
            });
        }
コード例 #28
0
 private void CheckRights()
 {
     if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_CustomerCalling_Add))
     {
         this.btnNew.IsEnabled = false;
     }
 }
コード例 #29
0
        private void dgShiftRequestMemoQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Inventory_ShiftRequestMemoQuery_ExportExcell))
            {
                Window.Alert("对不起,你没有权限进行此操作!");
                return;
            }

            if (this.dgShiftRequestMemoQueryResult == null || this.dgShiftRequestMemoQueryResult.TotalCount == 0)
            {
                Window.Alert("没有可供导出的数据!");
                return;
            }
            //导出全部:
            if (null != PageView.QueryInfo)
            {
                ShiftRequestMemoQueryVM exportQueryRequest = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <ShiftRequestMemoQueryVM>(PageView.QueryInfo);
                exportQueryRequest.PagingInfo = new QueryFilter.Common.PagingInfo()
                {
                    PageIndex = 0, PageSize = ConstValue.MaxRowCountLimit
                };
                ColumnSet columnSet = new ColumnSet()
                                      .Add("RequestSysNo", ResShiftRequestMemoMaintain.Grid_ShiftRequestSysNo, 40)
                                      .Add("Content", ResShiftRequestMemoMaintain.Grid_MemoContent, 40)
                                      .Add("MemoStatus", ResShiftRequestMemoMaintain.Grid_MemoStatus, 40)
                                      .Add("CreateUserName", ResShiftRequestMemoMaintain.Grid_CreateUser, 40)
                                      .Add("CreateDate", ResShiftRequestMemoMaintain.Grid_CreateDate, 40)
                                      .Add("EditDate", ResShiftRequestMemoMaintain.Grid_CloseTime, 40)
                                      .Add("RemindTime", ResShiftRequestMemoMaintain.Grid_RemindTime, 40)
                                      .Add("Note", ResShiftRequestMemoMaintain.Grid_MemoNote, 40);
                new ShiftRequestQueryFacade(this).ExportRequestMemo(exportQueryRequest, new ColumnSet[] { columnSet });
            }
        }
コード例 #30
0
        private bool ValidateRight()
        {
            int point = 0;

            if (int.TryParse(tbPoint.Text, out point))
            {
                if (Math.Abs(point) > 300 && !AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_PointAddRequest_Audit_NoLimit))
                {
                    CPApplication.Current.CurrentPage.Context.Window.Alert(ResCustomerPointsAddRequest.rightMsg_NoRight_Audit_NoLimit);
                    return(false);
                }
                else if (Math.Abs(point) <= 300 && Math.Abs(point) > 80 &&
                         !AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_PointAddRequest_Audit_NoLimit) &&
                         !AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_PointAddRequest_Audit_Lessthan300P))
                {
                    CPApplication.Current.CurrentPage.Context.Window.Alert(ResCustomerPointsAddRequest.rightMsg_NoRight_Audit_Lessthan300P);
                    return(false);
                }
                else if (Math.Abs(point) <= 80 &&
                         !AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_PointAddRequest_Audit_NoLimit) &&
                         !AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_PointAddRequest_Audit_Lessthan300P) &&
                         !AuthMgr.HasFunctionPoint(AuthKeyConst.Customer_PointAddRequest_Audit_Lessthan80P)
                         )
                {
                    CPApplication.Current.CurrentPage.Context.Window.Alert(ResCustomerPointsAddRequest.rightMsg_NoRight_Audit_Lessthan80P);
                    return(false);
                }
            }
            return(true);
        }