• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# SimpleActionExecuteEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SimpleActionExecuteEventArgs的典型用法代码示例。如果您正苦于以下问题:C# SimpleActionExecuteEventArgs类的具体用法?C# SimpleActionExecuteEventArgs怎么用?C# SimpleActionExecuteEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SimpleActionExecuteEventArgs类属于命名空间,在下文中一共展示了SimpleActionExecuteEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: showOperationsAction_Execute

 private void showOperationsAction_Execute(object sender, SimpleActionExecuteEventArgs e)
 {
     var newView = Application.CreateDetailView(Application.CreateObjectSpace(), new OperationObjects());
     e.ShowViewParameters.CreatedView = newView;
     e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow;
     e.ShowViewParameters.Context = TemplateContext.PopupWindow;
 }
开发者ID:LSTANCZYK,项目名称:devexpress_xaf_aurum,代码行数:7,代码来源:OperationWindowController.cs


示例2: hideAction_Execute

 private void hideAction_Execute(object sender, SimpleActionExecuteEventArgs e)
 {
     if (View.CanClose())
     {
         View.Close();
     }
 }
开发者ID:LSTANCZYK,项目名称:devexpress_xaf_aurum,代码行数:7,代码来源:OperationObject_DetailViewController.cs


示例3: AcceptAction_Execute

 // Завершение мастера
 private void AcceptAction_Execute(object sender, SimpleActionExecuteEventArgs e)
 {
     Validator.RuleSet.Validate(objectSpace, wizard, ContextIdentifier.Save);
     OwnedReportData reportData = objectSpace.CreateObject<OwnedReportData>();
     wizard.Generate(Application.TypesInfo, reportData, style);
     objectSpace.CommitChanges();
 }
开发者ID:LSTANCZYK,项目名称:devexpress_xaf_aurum,代码行数:8,代码来源:OwnedReportWizardController.cs


示例4: btnCompleteShipment_Execute

        private void btnCompleteShipment_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            UnitOfWork uow = (UnitOfWork)View.ObjectSpace.Session;

            try
            {
                foreach (Shipment shipment in e.SelectedObjects)
                {
                    if (shipment.Status == Shipment.PackStatus.Ready)
                    {
                        shipment.AddPackedQty(shipment.UnPackedQty);

                    }

                    if (shipment.Status == Shipment.PackStatus.Active)
                    {
                        shipment.CompleteShipment();
                    }

                }

                uow.CommitChanges();
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message, "¿ù»~", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
                uow.RollbackTransaction();
            }

            View.ObjectSpace.Refresh();
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:31,代码来源:ShipmentComplete_View.cs


示例5: XafBootstrapConfigurationActionItem_Execute

 private void XafBootstrapConfigurationActionItem_Execute(object sender, SimpleActionExecuteEventArgs e)
 {
     XAFBootstrapConfiguration._Instance = null;
     var os = Application.CreateObjectSpace();
     var view = Application.CreateDetailView(os, XAF_Bootstrap.DatabaseUpdate.Updater.Configuration(os));
     Application.MainWindow.SetView(view);
 }
开发者ID:Terricks,项目名称:XAFBootstrap,代码行数:7,代码来源:XafBootstrapConfigurationAction.cs


示例6: btnCheckBomLine_Execute

        private void btnCheckBomLine_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            StringBuilder sbLog = new StringBuilder();
            UnitOfWork uow = (UnitOfWork)((XPObjectSpace)View.ObjectSpace).Session;
            uow.BeginTransaction();

            foreach (BomLine bomLine in View.SelectedObjects)
            {
                if (bomLine.LineType == Item.ItemSource.Make)
                {
                    if (bomLine.BomItem.RouteLines.Count == 0 || bomLine.BomItem.BomLines.Count == 0)
                    {
                        sbLog.AppendLine(string.Format("��Ʒ : '{0}', Bom��Ʒ : '{1}'�����Ϊ��ʱ����Ҫ��Bom����������.", bomLine.Item.ItemNo, bomLine.BomItem.ItemNo));
                        bomLine.LineType = Item.ItemSource.None;
                        bomLine.Save();
                    }

                    if (bomLine.BomItem == bomLine.Item)
                    {
                        sbLog.AppendLine(string.Format("��Ʒ : '{0}', Bom��Ʒ : '{1}'�IJ��������ѵ�BOM.", bomLine.Item.ItemNo, bomLine.BomItem.ItemNo));
                    }
                }
            }

            uow.CommitChanges();
            if (sbLog.ToString() != "")
            {
                sbLog.AppendLine("����Bom����Դ�Ѿ��Զ�תΪδ��");
                XtraMessageBox.Show(sbLog.ToString(), "������ !!");
                View.ObjectSpace.Refresh();
            }
            else
                XtraMessageBox.Show("��ϲ, û�д��� !!");
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:34,代码来源:BomLine_View.cs


示例7: btnListDetail_Execute

        private void btnListDetail_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            if (View.CurrentObject == null)
                return;

            ControlDrawing drawing = (ControlDrawing)View.CurrentObject;

            if (drawing.Control == null)
            {
                XtraMessageBox.Show("����ѡ�������� !!!");
                return;
            }

            DialogResult dr = XtraMessageBox.Show("ע�� : ԭ�еĹ���ͼ���Ͻ���ɾ�� !!!", "����", MessageBoxButtons.OKCancel);

            if (dr == DialogResult.Cancel)
                return;

            foreach (ControlDrawingDetail detail in drawing.ControlDrawingDetails)
            {
                detail.Delete();
            }

            foreach (Dim dim in drawing.Control.Dims)
            {
                ControlDrawingDetail detail = new ControlDrawingDetail(drawing.Session);
                detail.ControlDrawing = drawing;
                detail.Dim = dim;
                detail.Save();
            }
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:31,代码来源:ControlDrawing_View.cs


示例8: btnConfirmIQC_Execute

        private void btnConfirmIQC_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            if (View.CurrentObject == null)
            {
                XtraMessageBox.Show("����ѡȡҪIQCȷ�ϵĵ�");
                return;
            }

            SubPurchOrderLine poLine = (SubPurchOrderLine)View.CurrentObject;

            if (poLine.OrderStatus != SubPurchOrderLine.PurchOrderStatus.Waiting)
            {
                XtraMessageBox.Show("�ⵥ��״̬����Waiting");
                return;
            }

            if (poLine.SubItem.ItemType != SubItem.SubItemType.Subcon)
            {
                XtraMessageBox.Show("�ⵥ���Ǿ�����");
                return;
            }

            frmSubConfirmIQC frm = new frmSubConfirmIQC();
            frm.poLine = poLine;
            frm.ShowDialog();

            View.ObjectSpace.Refresh();
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:28,代码来源:SubPurchOrder_View.cs


示例9: btnConfirmSubCon_Execute

        private void btnConfirmSubCon_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            if (View.CurrentObject == null)
            {
                XtraMessageBox.Show("����ѡȡҪ4¥���ȷ�ϵĵ�");
                return;
            }

            UnitOfWork uow = new UnitOfWork();
            uow.BeginTransaction();

            foreach (SubPurchOrderLine pLine in View.SelectedObjects)
            {
                if (pLine.SubItem.ItemType == SubItem.SubItemType.QC &&
                    pLine.OrderStatus == SubPurchOrderLine.PurchOrderStatus.Waiting)
                {
                    SubPurchOrderLine poLine = uow.GetObjectByKey<SubPurchOrderLine>(pLine.Oid);
                    poLine.OrderStatus = SubPurchOrderLine.PurchOrderStatus.Active;
                    poLine.Save();
                }
            }

            uow.CommitTransaction();
            View.ObjectSpace.Refresh();
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:25,代码来源:SubPurchOrder_View.cs


示例10: AcceptActionOnExecute

 void AcceptActionOnExecute(object sender, SimpleActionExecuteEventArgs simpleActionExecuteEventArgs) {
     var currentObject = simpleActionExecuteEventArgs.CurrentObject;
     var jobDataMap = new JobDataMap();
     GetDataMapMemberInfos(TypesInfo.FindTypeInfo(currentObject.GetType())).Each(MapItsValue(jobDataMap, currentObject));
     var jobDetail = ((IJobDetail)View.CurrentObject);
     jobDetail.JobDataMap = jobDataMap;
 }
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:_JobDataMapController.cs


示例11: btnCancelPurchOrderReceive_Execute

        private void btnCancelPurchOrderReceive_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            if (View.CurrentObject == null)
                return;

            StringBuilder sb = new StringBuilder();

            sb.AppendLine("请确认是否把以下采购单取消 !!");

            foreach (PurchOrderReceive poReceive in View.SelectedObjects)
                sb.AppendLine(string.Format("采购单号 : {0}, 产品编码 ; {1}, 数量 ; {2}", poReceive.PurchOrderLine.PurchOrderNo, poReceive.Item.ItemNo, poReceive.Qty));

            DialogResult dr = XtraMessageBox.Show(sb.ToString(), "确认取消", MessageBoxButtons.YesNo);

            if (dr == DialogResult.Yes)
            {
                UnitOfWork uow = (UnitOfWork)((XPObjectSpace)View.ObjectSpace).Session;
                uow.BeginTransaction();

                foreach (PurchOrderReceive poReceive in e.SelectedObjects)
                    poReceive.CancelPurchOrderReceive();

                uow.CommitChanges();
                View.ObjectSpace.Refresh();
            }
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:26,代码来源:PurchOrderReceive_View.cs


示例12: btnMassPurchOrderReceive_Execute

 private void btnMassPurchOrderReceive_Execute(object sender, SimpleActionExecuteEventArgs e)
 {
     CreatePurchOrderReceive(SubItem.SubItemType.QC);
     View.ObjectSpace.Refresh();
     btnMassPurchOrderReceive.Enabled["ABC"] = false;
     XtraMessageBox.Show("����ɳ�����ֻ�, \n����Ҫ�ٳ���ֻ�, Ո���˳���ҳ��");
 }
开发者ID:kamchung322,项目名称:Namwah,代码行数:7,代码来源:SubPurchOrderReceive_View.cs


示例13: btnCreateProdOrderPickList_Execute

        private void btnCreateProdOrderPickList_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            if (View.CurrentObject == null)
                return;

            XPObjectSpace objectSpace = (XPObjectSpace)Application.CreateObjectSpace();

            ProdBom pBom = (ProdBom)View.CurrentObject;
            XPCollection<ProdBom> prodBoms = new XPCollection<ProdBom>(objectSpace.Session);
            prodBoms.Criteria = DevExpress.Data.Filtering.CriteriaOperator.Parse(string.Format("Oid = '{0}'", pBom.Oid));

            ProdBom prodBom = prodBoms[0];
            ProdOrder pOrder = prodBom.ProdOrder;
            ProdOrderStart prodOrderStart = pOrder.GetLastProdOrderStart();
            ProdOrderPickList pickList = objectSpace.CreateObject<ProdOrderPickList>();
            pickList.ProdBom = prodBom;
            pickList.ProdOrderStart = prodOrderStart;
            pickList.PickQty = pickList.RecommendQty;

            e.ShowViewParameters.CreatedView = Application.CreateDetailView(objectSpace, pickList);
            e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow;
            e.ShowViewParameters.Context = TemplateContext.PopupWindow;
            e.ShowViewParameters.CreateAllControllers = true;

            DialogController dialogController = new DialogController();
            e.ShowViewParameters.Controllers.Add(dialogController);
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:27,代码来源:ProdBom_View.cs


示例14: collectExecute

 void collectExecute(object sender, SimpleActionExecuteEventArgs e)
 {
     if (detController != null && detController.View != null)
     {
         XafDeltaModule.Instance.CollectObjectSpace(detController.View.ObjectSpace);
     }
 }
开发者ID:xafdelta,项目名称:xafdelta,代码行数:7,代码来源:VcWebActions.cs


示例15: btnAddDwgDrawing_Execute

        private void btnAddDwgDrawing_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            if (View.CurrentObject == null)
                return;

            Namwah.Module.ENG.Control control = View.CurrentObject as Namwah.Module.ENG.Control;

            if (control.IsNewRecord())
            {
                XtraMessageBox.Show("���ȴ����¼��ż�DWGͼ");
                return;
            }

            using (OpenFileDialog fileDialog = new OpenFileDialog())
            {
                fileDialog.Filter = "Dwg File (*.dwg)|*.dwg";
                fileDialog.Title = "��ѡȡ��ص�DWG��";

                if (fileDialog.ShowDialog() == DialogResult.OK)
                {
                    string cadFilePath = string.Format("{0}{1}.dwg", DefaultDwgFolder, control.ControlNo);
                    System.IO.File.Copy(fileDialog.FileName, cadFilePath, true);
                    CADHelper.ExportToJpg(fileDialog.FileName, string.Format("{0}{1}_DWG.jpg", DefaultImagesFolder, control.ControlNo));
                }
            }
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:26,代码来源:Control_View.cs


示例16: exchangeChoiceAction_Execute

        void exchangeChoiceAction_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            var objectSpace = Application.CreateObjectSpace();
            var exchangeType = e.Action.Tag as Type;
            var parType = ExchangeOperation.GetParametersType(exchangeType);

            if (parType != null)
            {
                var parInstance = ExchangeOperation.CreateParameters(exchangeType, objectSpace);
                var view = Application.CreateDetailView(objectSpace, parInstance);

                e.ShowViewParameters.CreatedView = view;
                e.ShowViewParameters.Context = TemplateContext.PopupWindow;
                e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow;

                var ctr = new DialogController { CanCloseWindow = false };

                ctr.AcceptAction.Execute += (object io, SimpleActionExecuteEventArgs ie) =>
                {
                    Validator.RuleSet.Validate(objectSpace, ie.CurrentObject, DefaultContexts.Save);
                    var exchangeInstance = (ExchangeOperation)Activator.CreateInstance(exchangeType, Application);
                    exchangeInstance.ParametersObject = parInstance;
                    RunExchangeOperation(exchangeInstance, ie.ShowViewParameters);
                };
                ctr.CancelAction.Execute += (_, __) => view.Close();

                e.ShowViewParameters.Controllers.Add(ctr);
            }
            else
            {
                var exchangeInstance = (ExchangeOperation)Activator.CreateInstance(exchangeType, Application);
                RunExchangeOperation(exchangeInstance, e.ShowViewParameters);
            }
        }
开发者ID:LSTANCZYK,项目名称:devexpress_xaf_aurum,代码行数:34,代码来源:ExchangeWindowController.cs


示例17: btnProdRouteAdjustQty_Execute

        private void btnProdRouteAdjustQty_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            if (View.CurrentObject == null)
                return;

            ProdRoute prodRoute = (ProdRoute)View.CurrentObject;

            float adjustQty = 0;

            try
            {
                adjustQty = float.Parse(
                    Microsoft.VisualBasic.Interaction.InputBox(string.Format("请输入要调整的数量, 现时最多可调整的数量为{0}\n输入0则取消调整", prodRoute.WipQty + prodRoute.TotalAdjustQty), "调整的数量", "0", 0, 0));

                if (adjustQty > prodRoute.WipQty + prodRoute.TotalAdjustQty)
                {
                    XtraMessageBox.Show("输入调整数量大于可调整数 !!");
                    return;
                }
            }
            catch
            {
                XtraMessageBox.Show("输入数量错误 !!");
                return;
            }

            UnitOfWork uow = new UnitOfWork();
            uow.BeginTransaction();
            ProdRoute pRoute = uow.GetObjectByKey<ProdRoute>(prodRoute.Oid);
            pRoute.TotalAdjustQty = adjustQty;
            pRoute.UpdateTotalIOQty();
            pRoute.Save();
            uow.CommitChanges();
            View.ObjectSpace.Refresh();
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:35,代码来源:ProdRoute_View.cs


示例18: ImportAction_Execute

        private void ImportAction_Execute(object sender, SimpleActionExecuteEventArgs e) {
            var objectSpace = Application.CreateObjectSpace(View.ObjectTypeInfo.Type);

            ShowWizard(objectSpace);
            View.Refresh();
            View.ObjectSpace.Refresh();
        }
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:ImportWizViewControllerBase.cs


示例19: btnCopyNewVersion_Execute

        private void btnCopyNewVersion_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            if (View.CurrentObject == null)
                return;

            ControlDrawing CurrentControlDrawing = (ControlDrawing)View.CurrentObject;
            if (CurrentControlDrawing.CurrentVersion == false)
            {
                XtraMessageBox.Show("�˲�Ʒ����ͼ���������°汾 !!", "����", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            DialogResult dr = XtraMessageBox.Show("��ȷ�������Ҫ�����°汾, ��Ϊ�⶯���Dz����޸ĵ� !!!", "����", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);

            if (dr == DialogResult.Cancel)
            {
                XtraMessageBox.Show("�]�н����°汾", "��Ϣ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            UnitOfWork uow = (UnitOfWork)((XPObjectSpace)View.ObjectSpace).Session;
            ControlDrawing NewControlDrawing = new ControlDrawing(uow);
            CurrentControlDrawing.CopyTo(NewControlDrawing);
            CurrentControlDrawing.Revision++;
            CurrentControlDrawing.Save();
            NewControlDrawing.CurrentVersion = false;
            NewControlDrawing.Save();
            uow.CommitChanges();
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:29,代码来源:ControlDrawing_View.cs


示例20: btnCompleteShipment_Execute

        private void btnCompleteShipment_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            UnitOfWork uow = (UnitOfWork)((XPObjectSpace)View.ObjectSpace).Session;
            uow.BeginTransaction();
            try
            {
                foreach (Shipment shipment in e.SelectedObjects)
                {
                    if (shipment.Status == Shipment.PackStatus.Waiting)
                        shipment.ChangeStatusToReady();

                    if (shipment.Status == Shipment.PackStatus.Ready)
                        shipment.AddPackedQty(shipment.UnPackedQty);

                    if (shipment.Status == Shipment.PackStatus.Active)
                        shipment.CompleteShipment();
                }

                uow.CommitChanges();
            }
            catch (Exception ex)
            {
                DevExpress.XtraEditors.XtraMessageBox.Show(ex.Message, "錯誤", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
                uow.RollbackTransaction();
            }

            View.ObjectSpace.Refresh();

            //Shipment.PrintShipmentOrder((XPObjectSpace)View.ObjectSpace, DateTime.Today);
        }
开发者ID:kamchung322,项目名称:Namwah,代码行数:30,代码来源:Shipment_View.cs



注:本文中的SimpleActionExecuteEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SimpleBooleanDelegate类代码示例发布时间:2022-05-24
下一篇:
C# SimiasWebService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap