コード例 #1
0
        private void popupWindowShowActionCrgTms_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            ArchivoCarga obj = e.PopupWindowViewCurrentObject as ArchivoCarga;

            if (obj != null && obj.File != null &&
                !string.IsNullOrEmpty(obj.File.FileName))
            {
                using (var stream = new MemoryStream())
                {
                    Workbook wb = new Workbook();

                    obj.File.SaveToStream(stream);
                    stream.Position = 0;
                    wb.LoadDocument(stream, DocumentFormat.Xlsx);

                    // errorEn = "No se pudo procesar el archivo. Posiblemente esté dañado.";
                    if (wb != null && wb.Worksheets.Count > 0)
                    {
                        Worksheet fp = wb.Worksheets[0];

                        Planeacion pln = View.CurrentObject as Planeacion;
                        cargaTemas(fp, 1, obj.CldDrcn, pln);
                    }
                }
            }
        }
コード例 #2
0
        private void ProcessStep(PopupWindowShowActionExecuteEventArgs e, DialogController dialogController, int step)
        {
            if (step == 10)
            {
                e.CanCloseWindow = true;
                //  TaskStatusAction.Enabled["By Criteria"] = savedEnabledItem;
                dialogController.CancelAction.Active.RemoveItem("InactiveReason");
            }
            else
            {
                (View.CurrentObject as DemoTask).Status = DevExpress.Persistent.Base.General.TaskStatus.InProgress;
                View.ObjectSpace.CommitChanges();

                e.CanCloseWindow = false;

                var wizardObjectSpace = Application.CreateObjectSpace();

                var        objectToShow = wizardObjectSpace.GetObject(View.CurrentObject);
                DetailView dv           = Application.CreateDetailView(wizardObjectSpace, objectToShow);
                dv.Caption = $"Action Result {step}";
                dialogController.AcceptAction.Caption = $"Dalej ({step})";
                dialogController.CancelAction.Active.SetItemValue("InactiveReason", false);
                e.PopupWindow.SetView(dv);
            }
        }
コード例 #3
0
        private void RemoveCategory_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            ResourceLibrary currentResource = (ResourceLibrary)View.CurrentObject;

            View.ObjectSpace.SetModified(currentResource);

            ArrayList arrayList = new ArrayList();

            foreach (TemporaryResourceCategory temp in e.PopupWindow.View.SelectedObjects)
            {
                foreach (ResourceCategory cat in currentResource.ResourceCategories)
                {
                    if (cat.Oid == temp.Category.Oid)
                    {
                        arrayList.Add(cat);
                    }
                }
            }
            foreach (ResourceCategory toDelete in arrayList)
            {
                currentResource.ResourceCategories.Remove(toDelete);
            }

            if (View is DetailView && ((DetailView)View).ViewEditMode == ViewEditMode.View)
            {
                View.ObjectSpace.CommitChanges();
                Frame.View.ObjectSpace.Refresh();
            }
        }
コード例 #4
0
ファイル: StudentController.cs プロジェクト: yangyang722/test
 /// <summary>
 /// 计划转订单
 /// </summary>
 private void plantomanubill_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
 {
     try
     {
         DetailView dv = e.PopupWindow.View as DetailView;
         if (dv != null)
         {
             StudentPersistent sp = dv.CurrentObject as StudentPersistent;
             if (sp != null)
             {
                 IObjectSpace ios           = Application.CreateObjectSpace();
                 ListView     lvconvertbill = Application.CreateListView("Student_ListView_CheckBox",
                                                                         new CollectionSource(ios, typeof(Student)), false);
                 e.ShowViewParameters.CreatedView  = lvconvertbill;
                 e.ShowViewParameters.Context      = TemplateContext.PopupWindow;
                 e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow;
                 SaveAndCancelAction dc = new SaveAndCancelAction();
                 dc.btnconvertbillsave.Execute   += Btnconvertbillsave_Execute;
                 dc.btnconvertbillcancel.Execute += Btnconvertbillcancel_Execute;
                 e.ShowViewParameters.Controllers.Add(dc);
                 dv.Close();
             }
         }
     }
     catch (Exception ex)
     {
     }
 }
コード例 #5
0
        private void selectRegAdressAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            var card = View.CurrentObject as CallCardUrgent;

            card.SetRegAddress(e.PopupWindowViewCurrentObject.ToString());
            ObjectSpace.Refresh();
        }
コード例 #6
0
        private void CustomRequest_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            ItemRequest ccr = (ItemRequest)e.PopupWindowViewCurrentObject;

            //  string x = "1";
            // ccr.Customer.AddNote(ccr.Customer, string.Format("Item Request has been sent for Item: {0} {1} for Customer {2}", ccr.ItemNumber.AccountingNumber, ccr.ItemNumber.ItemDescription, ccr.Customer.CustomerName));

            e.PopupWindow.View.ObjectSpace.CommitChanges();
            //  ((ListView)View).CollectionSource.Reload();
            View.ObjectSpace.Refresh();

            MessageOptions options = new MessageOptions();

            options.Message = string.Format("Item Request has been sent for Item: {0} {1} for Customer {2}",
                                            ccr.ItemNumber.AccountingNumber,
                                            ccr.ItemNumber.ItemDescription,
                                            ccr.Customer.CustomerName);
            options.Type         = InformationType.Success;
            options.Web.Position = InformationPosition.Right;
            options.Win.Caption  = "Success";
            options.Win.Type     = WinMessageType.Alert;
            options.Duration     = 1000;
            Application.ShowViewStrategy.ShowMessage(options);

            View.Refresh();
        }
コード例 #7
0
        private void ShInventoryController_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            e.PopupWindow.View.ObjectSpace.CommitChanges();

            View.ObjectSpace.Refresh();
            View.Refresh();

            MessageOptions options = new MessageOptions();

            if (1 == 1)
            {
                options.Duration     = 20000;
                options.Message      = string.Format("Inventory Batch for {0} has been entered", "dan test");
                options.Type         = InformationType.Success;
                options.Web.Position = InformationPosition.Right;
                options.Win.Caption  = "Success";
                options.Win.Type     = WinMessageType.Alert;
            }
            else
            {
                options.Duration     = 20000;
                options.Message      = string.Format("Inventory Batch for {0} has been entered is in Compliance due to the following ", "Dan Test");
                options.Type         = InformationType.Warning;
                options.Web.Position = InformationPosition.Right;
                options.Win.Caption  = "Success Need Compliance";
                options.Win.Type     = WinMessageType.Alert;
            }

            Application.ShowViewStrategy.ShowMessage(options);
        }
コード例 #8
0
        private void ScanRecieveItems_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            ReceiverPackage RP = (ReceiverPackage)e.PopupWindowViewCurrentObject;
            //string erromsg;

            MessageOptions options = new MessageOptions();
            //if (CBL.SoComplianceCheck(so, out erromsg) == 0)
            //{

            //    options.Duration = 20000;
            //    options.Message = string.Format("Sales Order for {0} has been entered", so.CustomerNumber.CustomerName);
            //    options.Type = InformationType.Success;
            //    options.Web.Position = InformationPosition.Right;
            //    options.Win.Caption = "Success";
            //    options.Win.Type = WinMessageType.Alert;
            //}
            //else
            //{

            //    options.Duration = 20000;
            //    options.Message = string.Format("Sales Order for {0} has been entered is in Compliance due to the following {1}", so.CustomerNumber.CustomerName, erromsg);
            //    options.Type = InformationType.Warning;
            //    options.Web.Position = InformationPosition.Right;
            //    options.Win.Caption = "Success Need Compliance";
            //    options.Win.Type = WinMessageType.Alert;
            //}
            //options.OkDelegate = () => {
            //    IObjectSpace os = Application.CreateObjectSpace(typeof(Customer));
            // DetailView newTaskDetailView = Application.CreateDetailView(os, os.CreateObject<ItemRequest>());
            // Application.ShowViewStrategy.ShowViewInPopupWindow(newTaskDetailView);
            //};
            //Application.ShowViewStrategy.ShowMessage(options);
        }
コード例 #9
0
 public static void popupWindowShowAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
 {
     if (((ActionBase)sender).Controller is ActionBaseController)
     {
         ((ActionBaseController)((ActionBase)sender).Controller).LogTrace(e.Action);
     }
 }
コード例 #10
0
        private void RemoveParticipantAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            Schedule currentSchedule = (Schedule)View.CurrentObject;

            View.ObjectSpace.SetModified(currentSchedule);

            ArrayList arrayList = new ArrayList();

            foreach (TemporaryScheduleParticipant temp in e.PopupWindow.View.SelectedObjects)
            {
                foreach (ScheduleParticipant partic in currentSchedule.ScheduleParticipants)
                {
                    if (partic.Participant.Oid == temp.Participant.Oid)
                    {
                        arrayList.Add(partic);
                    }
                }
            }
            foreach (ScheduleParticipant toDelete in arrayList)
            {
                currentSchedule.ScheduleParticipants.Remove(toDelete);
            }

            if (View is DetailView && ((DetailView)View).ViewEditMode == ViewEditMode.View)
            {
                View.ObjectSpace.CommitChanges();
            }
        }
コード例 #11
0
        private void TaskStatusAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            DialogController dialogController = e.PopupWindow.GetController <DialogController>();

            ProcessStep(e, dialogController, step);
            step++;
        }
コード例 #12
0
 void LinkActionOnExecute(object sender, PopupWindowShowActionExecuteEventArgs e)
 {
     if (e.PopupWindow.View.SelectedObjects.Count > 0)
     {
         MasterObject.CreateMembersFromInterfaces();
     }
 }
コード例 #13
0
        private void objectWindowAction_OnExecute(Object sender, PopupWindowShowActionExecuteEventArgs args)
        {
            _popupWindowHelper.Assign(args, (ISupportSequenceObject)View.CurrentObject);
            string displayValue = GetPropertyDisplayValue();

            ((PopupWindow)args.PopupWindow).ClosureScript = "if(window.opener != null) window.opener.resultObject = '" + (displayValue?.Replace("'", "\\'") ?? "") + "';";
        }
コード例 #14
0
        private void generarContrapartidaAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            if (e.PopupWindow.View.SelectedObjects.Count < 1)
            {
                return;
            }

            var cuentaDestino = ( Cuenta )e.PopupWindow.View.SelectedObjects[0];

            var comprobante = this.GetMasterObject <Comprobante>( );

            foreach (ComprobanteItem comprobanteItem in View.SelectedObjects)
            {
                var nuevoComprobanteItem = ObjectSpace.CreateObject <ComprobanteItem>( );

                nuevoComprobanteItem.Cuenta    = cuentaDestino;
                nuevoComprobanteItem.DebeHaber = comprobanteItem.DebeHaber == DebeHaber.Debe ? DebeHaber.Haber : DebeHaber.Debe;
                nuevoComprobanteItem.Especie   = comprobanteItem.Especie;
                nuevoComprobanteItem.Importe   = comprobanteItem.Importe;
                nuevoComprobanteItem.Cambio    = comprobanteItem.Cambio;

                foreach (ComprobanteItemValor valor in comprobanteItem.Valores)
                {
                    var comprobanteItemValor = ObjectSpace.CreateObject <ComprobanteItemValor>( );
                    comprobanteItemValor.Valor = valor.Valor;
                    nuevoComprobanteItem.Valores.Add(comprobanteItemValor);
                }

                comprobante.Items.Add(nuevoComprobanteItem);
            }
        }
コード例 #15
0
 private void ItemReceiver_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
 {
     e.PopupWindow.View.ObjectSpace.CommitChanges();
     //  ((ListView)View).CollectionSource.Reload();
     View.ObjectSpace.Refresh();
     View.Refresh();
 }
コード例 #16
0
        private void MinMaint_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            e.PopupWindow.View.ObjectSpace.CommitChanges();
            IObjectSpace objectSpace = Application.CreateObjectSpace();

            //  Items item = objectSpace.CreateObject<Items>();
            ItemMinChangeHistory currentMinChange = objectSpace.GetObject <ItemMinChangeHistory>((ItemMinChangeHistory)e.PopupWindowViewCurrentObject);

            //item = objectSpace.GetObject<Items>((Items)View.CurrentObject);
            //item.MinPrice = currentMinChange.ItemMin;
            //item.Save();
            currentMinChange.Item.MinPrice = currentMinChange.ItemMin;
            currentMinChange.Save();
            objectSpace.CommitChanges();
            View.ObjectSpace.Refresh();
            View.Refresh();

            // item.MinPrice = e.PopupWindow.View<ItemMinHistory>.CurrentObject.ItemMin;
            MessageOptions options = new MessageOptions();

            options.Duration     = 20000;
            options.Message      = string.Format("Min has been changed for Item: {0} to {1}", currentMinChange.Item.ItemNumber, currentMinChange.ItemMin.ToString());
            options.Type         = InformationType.Success;
            options.Web.Position = InformationPosition.Right;
            options.Win.Caption  = "Success";
            options.Win.Type     = WinMessageType.Alert;
            options.Duration     = 10000;
            Application.ShowViewStrategy.ShowMessage(options);
        }
コード例 #17
0
        private void CustomerRequestPopup_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            ItemRequest ccr = (ItemRequest)e.PopupWindowViewCurrentObject;

            ccr.Customer.AddNote(ccr.Customer, string.Format("Item Request has been sent to purchasing \r\n Item: {0} {1} \r\n Customer: {2} \r\n Qty: {3} \r\n Price: {4} ", ccr.ItemNumber.AccountingNumber, ccr.ItemNumber.ItemDescription, ccr.Customer.CustomerName, ccr.RequestQty.ToString(), ccr.UnitPrice.ToString("c")));

            e.PopupWindow.View.ObjectSpace.CommitChanges();
            //  ((ListView)View).CollectionSource.Reload();
            View.ObjectSpace.Refresh();

            MessageOptions options = new MessageOptions();

            options.Message = string.Format("Item Request has been sent for Item: {0} {1} for Customer {2}",
                                            ccr.ItemNumber.AccountingNumber,
                                            ccr.ItemNumber.ItemDescription,
                                            ccr.Customer.CustomerName);
            options.Type         = InformationType.Success;
            options.Web.Position = InformationPosition.Right;
            options.Win.Caption  = "Success";
            options.Win.Type     = WinMessageType.Alert;
            options.Duration     = 10000;
            Application.ShowViewStrategy.ShowMessage(options);

            View.Refresh();
            sendnewrequestemail(sender, e);
        }
コード例 #18
0
        private void cloneViewPopupWindowShowAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            DictionaryNode variantsNode = GetDefaultVariantsNode();
            ViewCloner viewCloner;
            DictionaryNode newVariantNode = GetNewVariantNode(variantsNode, e, out viewCloner);

            DictionaryNode clonedNode = View.Info.Clone();
            setAttributes(clonedNode, viewCloner);
            Application.Model.RootNode.FindChildNode("Views").AddChildNode(clonedNode);

            var changeVariantController = Frame.GetController<ChangeVariantController>();
            SingleChoiceAction changeVariantAction = changeVariantController.ChangeVariantAction;
            if (changeVariantController.Active.ResultValue)
            {
                var choiceActionItem = new ChoiceActionItem(newVariantNode,
                                                            newVariantNode.GetAttributeValue("ViewID"));
                changeVariantAction.Items.Add(choiceActionItem);
                changeVariantAction.SelectedItem=choiceActionItem;
            }
            else
            {
                changeVariantController.Frame.SetView(View);
                changeVariantAction.SelectedItem = (from item in changeVariantAction.Items
                                                    where item.Caption == viewCloner.Caption
                                                    select item).Single();
            }
            View.SetInfo(clonedNode);
        }
コード例 #19
0
 private DictionaryNode GetNewVariantNode(DictionaryNode variantsNode, PopupWindowShowActionExecuteEventArgs e, out ViewCloner viewCloner) {
     DictionaryNode newVariantNode = variantsNode.AddChildNode("Variant");
     viewCloner = ((ViewCloner) e.PopupWindow.View.CurrentObject);
     newVariantNode.SetAttribute("ViewID", viewCloner.Caption);
     setAttributes(newVariantNode, viewCloner);
     return newVariantNode;
 }
コード例 #20
0
        private void ReceiptOfGoodsScan_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            IObjectSpace objectSpace = Application.CreateObjectSpace();



            // ReceiptOfGoodsScans RoGScan = (ReceiptOfGoodsScans)e.PopupWindowView.CurrentObject;
            // RoGScan lsg = lotGenSerial.LotId;

            //RepackLots RL = (RepackLots)objectSpace.GetObjectByKey(typeof(RepackLots), lsg.Oid);
            //eSerialTypes stype;
            //int snumber = 1965;
            //if (lsg == null)
            //{
            //    stype = eSerialTypes.sequential;
            //}
            //stype = RL.RepackItem.SerialType;


            //objectSpace.CommitChanges();
            //ObjectSpace.Refresh();
            //MessageOptions options = new MessageOptions();
            //options.Duration = 20000;
            //options.Message = string.Format("{0} Serial Number for Lot {1} has been entered", lotGenSerial.QtyToGenerate, lotGenSerial.LotId.LotId.ToString());
            //options.Type = InformationType.Success;
            //options.Web.Position = InformationPosition.Right;
            //options.Win.Caption = "Success";
            //options.Win.Type = WinMessageType.Alert;

            //Application.ShowViewStrategy.ShowMessage(options);
        }
コード例 #21
0
        private void rozliczWplateAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            //  IObjectSpace objectSpace = Application.CreateObjectSpace();
            var wplata = (Wplata)ObjectSpace.GetObject(View.CurrentObject);

            if (wplata != null)
            {
                WplataDoRozliczeniaDC parameters = e.PopupWindow.View.CurrentObject as WplataDoRozliczeniaDC;
                foreach (var obj in parameters.Naleznosci)
                {
                    var roz = ObjectSpace.GetObject(obj);
                    if (roz.KwotaDoRozliczenia != 0)
                    {
                        var rozrachunek = ObjectSpace.CreateObject <Rozrachunek>();
                        rozrachunek.Wplata  = wplata;
                        rozrachunek.Faktura = ObjectSpace.GetObject(roz.Faktura);
                        rozrachunek.Kwota   = roz.KwotaDoRozliczenia;
                    }
                }
            }
            //if (View is DetailView && ((DetailView)View).ViewEditMode == ViewEditMode.View)
            //{
            //    objectSpace.CommitChanges();
            //}
            if (View is ListView)
            {
                ObjectSpace.CommitChanges();
                View.ObjectSpace.Refresh();
            }
        }
コード例 #22
0
        private void AddShortDescriptionAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            News news = (News)View.CurrentObject;

            View.ObjectSpace.SetModified(news);
            news.ShortDescription = ((ShortDescriptionParametersObject)e.PopupWindow.View.CurrentObject).ShortDescription;
        }
コード例 #23
0
ファイル: ShippingController.cs プロジェクト: ewin66/OfficeRX
        private void PickingSheetPrint_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            ArrayList SelectedSo = new ArrayList();

            if ((e.SelectedObjects.Count > 0) &&
                ((e.SelectedObjects[0] is XafDataViewRecord) ||
                 (e.SelectedObjects[0] is XafInstantFeedbackRecord)))
            {
                foreach (var selectedObject in e.SelectedObjects)
                {
                    SelectedSo.Add((SOHeader)ObjectSpace.GetObject(selectedObject));
                }
            }
            else
            {
                SelectedSo = (ArrayList)e.SelectedObjects;
            }
            foreach (SOHeader selectedContact in SelectedSo)
            {
                XtraReport myReport = new rptShippingPickSht();
                myReport.DataSource = SelectedSo;


                //selectedContact.Street1
            }
            ObjectSpace.CommitChanges();
            ObjectSpace.Refresh();
        }
コード例 #24
0
        private void FilterForDoctorAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            var listView = this.View as ListView;

            var filterFields = e.PopupWindowViewCurrentObject as FilterForDoctorDnevnoyStacionarFields;

            if (filterFields.ToDate == DateTime.MinValue)
            {
                filterFields.ToDate = DateTime.MaxValue;
            }

            listView.CollectionSource.Criteria.Clear();

            // если задан диапазон дат
            if ((filterFields.FromDate != DateTime.MinValue) || (filterFields.ToDate != DateTime.MaxValue))
            {
                listView.CollectionSource.Criteria.Add("DateFilter",
                                                       CriteriaOperator.And(
                                                           new BinaryOperator("DataVypiski", filterFields.FromDate, BinaryOperatorType.GreaterOrEqual),
                                                           new BinaryOperator("DataVypiski", filterFields.ToDate, BinaryOperatorType.LessOrEqual)));
            }

            string currentRegionOKATO = BusinessObjects.Settings.RegionSettings.GetCurrentRegionOKATO(View.ObjectSpace);

            if (filterFields.ByDoctor != null)
            {
                listView.CollectionSource.Criteria.Add("DoctorFilter",
                                                       CriteriaOperator.Parse("Doctor.InnerCode=?", filterFields.ByDoctor.InnerCode));
            }

            /*listView.CollectionSource.Criteria.Add("InogorodniyFilter",
             *      CriteriaOperator.Parse("Pacient.IsInogorodniy=?", filterFields.IsInogorodniy)
             *  );*/
        }
コード例 #25
0
ファイル: RepackLabelPrint.cs プロジェクト: ewin66/OfficeRX
 private void MarkAsPrinted(PopupWindowShowActionExecuteEventArgs e)
 {
     foreach (RepackLotSerialNo rlsn in e.SelectedObjects)
     {
         rlsn.Isprinted = true;
         rlsn.Save();
     }
 }
コード例 #26
0
 private void addGoiThau_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
 {
     if (objspc != null)
     {
         objspc.CommitChanges();
     }
     View.ObjectSpace.Refresh();
 }
コード例 #27
0
 private void newObjectWindowAction_OnExecute(Object sender, PopupWindowShowActionExecuteEventArgs args)
 {
     if (objectSpace != args.PopupWindow.View.ObjectSpace)
     {
         args.PopupWindow.View.ObjectSpace.CommitChanges();
     }
     //AddObjectToDataSource(helper.ObjectSpace.GetObject(((DetailView)args.PopupWindow.View).CurrentObject));
     ((PopupWindow)args.PopupWindow).ClosureScript = "if(window.opener != null) window.dialogOpener.ddLookupResult = '" + helper.GetObjectKey(((DetailView)args.PopupWindow.View).CurrentObject) + "';";
 }
コード例 #28
0
ファイル: LookupEdit.cs プロジェクト: xyyhqq/eXpand
 private void showObjectAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs args)
 {
     args.PopupWindow.View.ObjectSpace.CommitChanges();
     EditValue  = null;
     EditValue  = Properties.Helper.ObjectSpace.GetObject(args.PopupWindow.View.CurrentObject);
     IsModified = true;
     UpdateMaskBoxDisplayText();
     RaiseEditValueChanged();
 }
コード例 #29
0
        private void CopyToSTR_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            CopyToAction p = (CopyToAction)e.PopupWindow.View.CurrentObject;

            if (p.IsErr)
            {
                return;
            }

            string      company    = "";
            SystemUsers CreateUser = ObjectSpace.GetObjectByKey <SystemUsers>(SecuritySystem.CurrentUserId);

            if (CreateUser.Company is null)
            {
                company = "-";
            }
            else
            {
                company = CreateUser.Company.BoCode;
            }

            int cnt = 0;
            StockTransferRequest obj = null;
            IObjectSpace         os  = null;

            foreach (vwSAP_ITEM_AVAILABILITY dtl in ((ListView)View).SelectedObjects)
            {
                cnt++;
                if (cnt == 1)
                {
                    os  = Application.CreateObjectSpace();
                    obj = os.CreateObject <StockTransferRequest>();
                }
                StockTransferRequestDetail dtlobj = os.CreateObject <StockTransferRequestDetail>();
                dtlobj.Oid      = cnt * -1;
                dtlobj.VisOrder = cnt;
                dtlobj.ItemCode = os.FindObject <vwItemMasters>(CriteriaOperator.Parse("ItemCode=? and CompanyCode=?", dtl.ItemCode, company));
                if (p.ParamAction == CopyToEnum.CopyAvailableQty)
                {
                    dtlobj.FromWhsCod = os.FindObject <vwWarehouses>(CriteriaOperator.Parse("WhsCode=? and CompanyCode=?", dtl.WhsCode, company));
                    //dtlobj.WhsCode = os.FindObject<vwWarehouses>(CriteriaOperator.Parse("WhsCode=? and CompanyCode=?", obj.ToWhsCode.WhsCode, company));
                    if (dtl.OnHand - dtl.IsCommited + dtl.OnOrder > 0)
                    {
                        dtlobj.Quantity = dtl.OnHand - dtl.IsCommited + dtl.OnOrder;
                    }
                }
                else if (p.ParamAction == CopyToEnum.CopyOnhandQty)
                {
                    dtlobj.FromWhsCod = os.FindObject <vwWarehouses>(CriteriaOperator.Parse("WhsCode=? and CompanyCode=?", dtl.WhsCode, company));
                    //dtlobj.WhsCode = os.FindObject<vwWarehouses>(CriteriaOperator.Parse("WhsCode=? and CompanyCode=?", obj.ToWhsCode.WhsCode, company));
                    dtlobj.Quantity = dtl.OnHand;
                }
                obj.StockTransferRequestDetail.Add(dtlobj);
            }
            gen.openNewView(os, obj, ViewEditMode.Edit);
            return;
        }
コード例 #30
0
        public void Assign(PopupWindowShowActionExecuteEventArgs popupWindowShowActionExecuteEventArgs, ISupportSequenceObject sequenceObject)
        {
            var sequenceReleasedObject = ((ISequenceReleasedObject)popupWindowShowActionExecuteEventArgs.PopupWindow.View.CurrentObject);

            _sequenceReleasedObjectKey = popupWindowShowActionExecuteEventArgs.PopupWindow.View.ObjectSpace.GetKeyValue(popupWindowShowActionExecuteEventArgs.PopupWindow.View.CurrentObject);
            var sequence = sequenceReleasedObject.Sequence;

            sequenceObject.Sequence = sequence;
        }
コード例 #31
0
ファイル: LookupEdit.cs プロジェクト: aries544/eXpand
 private void showObjectAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs args)
 {
     args.PopupWindow.View.ObjectSpace.CommitChanges();
     EditValue = null;
     EditValue = Properties.Helper.ObjectSpace.GetObject(args.PopupWindow.View.CurrentObject);
     IsModified = true;
     UpdateMaskBoxDisplayText();
     RaiseEditValueChanged();
 }
コード例 #32
0
ファイル: VCBancaria.cs プロジェクト: icpac/cap
        private void popupWindowShowActionTrnsfrr_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            Transferencia obj = e.PopupWindowViewCurrentObject as Transferencia;

            if (View != null)
            {
                NegocioBancos.GrabaTransfer(obj);
                View.ObjectSpace.CommitChanges();
            }
        }
コード例 #33
0
        private void AddNewMOMAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            Schedule currentSchedule = (Schedule)View.CurrentObject;

            View.ObjectSpace.SetModified(currentSchedule);
            if (View is DetailView && ((DetailView)View).ViewEditMode == ViewEditMode.View)
            {
                View.ObjectSpace.CommitChanges();
            }
        }
コード例 #34
0
ファイル: VcActions.cs プロジェクト: xafdelta/xafdelta
 private void BuildSnapshotActionPop_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
 {
     var target = (SnapshotTarget) e.PopupWindow.View.CurrentObject;
     var platform = GetPlatform(e.Action.Id);
     if (platform != null)
     {
         if (target != null && target.TargetNode != null)
         {
             platform.ExecuteAction(e.Action.Id, buildSnapshotExec,
                 new SnapshotWorker(target.TargetNode), actionComplete);
         }
     }
 }
コード例 #35
0
 private void ShowNotesAction_Execute(Object sender, PopupWindowShowActionExecuteEventArgs args) {
     DemoTask task = (DemoTask)View.CurrentObject;
     View.ObjectSpace.SetModified(task);
     foreach(Note note in args.PopupWindow.View.SelectedObjects) {
         if(!String.IsNullOrEmpty(task.Description)) {
             task.Description += Environment.NewLine;
         }
         task.Description += note.Text;
     }
     ViewItem item = ((DetailView)View).FindItem("Description");
     ((PropertyEditor)item).ReadValue();
     if(View is DetailView && ((DetailView)View).ViewEditMode == ViewEditMode.View) {
         View.ObjectSpace.CommitChanges();
     }
 }
コード例 #36
0
        void PopupWindowShowActionOnExecute(object sender, PopupWindowShowActionExecuteEventArgs e) {
            if (HttpContext.Current != null && !(_loginAttempts >= 3)) {
                _loginAttempts++;
                var anonymousLogonParameters = (AnonymousLogonParameters)e.PopupWindow.View.CurrentObject;
                try {
                    ((SecurityStrategyBase) Application.Security).Authentication.Authenticate(e.PopupWindow.View.ObjectSpace);
                }
                catch (AuthenticationException) {
                    if (_loginAttempts >= 3) {
                        anonymousLogonParameters.UserName = _userName;
                        e.PopupWindow.SetView(LogonAttemptsAmountedToLimitDetailView());
                        e.CanCloseWindow = false;
                        return;
                    }
                    throw;
                }
                LoginAnonymously(anonymousLogonParameters);
            }

        }
コード例 #37
0
 void ShowObjectActionOnExecute(object sender, PopupWindowShowActionExecuteEventArgs popupWindowShowActionExecuteEventArgs) {
     Assign(popupWindowShowActionExecuteEventArgs, _supportSequenceObject);
 }
コード例 #38
0
 public void Assign(PopupWindowShowActionExecuteEventArgs popupWindowShowActionExecuteEventArgs, ISupportSequenceObject sequenceObject) {
     var sequenceReleasedObject = ((ISequenceReleasedObject)popupWindowShowActionExecuteEventArgs.PopupWindow.View.CurrentObject);
     _sequenceReleasedObjectKey = popupWindowShowActionExecuteEventArgs.PopupWindow.View.ObjectSpace.GetKeyValue(popupWindowShowActionExecuteEventArgs.PopupWindow.View.CurrentObject);
     var sequence = sequenceReleasedObject.Sequence;
     sequenceObject.Sequence = sequence;
 }
コード例 #39
0
ファイル: VcActions.cs プロジェクト: xafdelta/xafdelta
 private void ImportFilesAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
 {
     var platform = GetPlatform(e.Action.Id);
     if (platform != null)
     {
         var files = new Dictionary<string, byte[]>();
         ((IXafDeltaWebPlatform) platform).GetFilesToImport(files, e.PopupWindow.View);
         platform.ExecuteAction(e.Action.Id, importFilesExec, new FilesWorker(files), actionComplete);
     }
 }
コード例 #40
0
 private void popupWindowShowAction1_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
 {
     string s = e.PopupWindowViewCurrentObject.ToString();
     Console.WriteLine(s);
 }
コード例 #41
0
        private void filterWindowShowAction_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            FilterWindowView filter = e.PopupWindowView as FilterWindowView;

            ListView listView = View as ListView;
            if (listView != null)
            {
                filter.UpdateValues();

                List<CriteriaOperator> ops = new List<CriteriaOperator>();
                foreach (var cr in filter.GetCriteries())
                {
                    if (!ReferenceEquals(cr, null))
                        ops.Add(cr);
                }
                CriteriaOperator criteria = CriteriaOperator.And(ops);
                GridListEditor editor = listView.Editor as GridListEditor;
                if (editor != null)
                {
                    GridControl grid = editor.Grid;
                    ColumnView colView = grid.FocusedView as ColumnView;
                    if (colView != null)
                    {
                        colView.ActiveFilterCriteria = criteria;
                        colView.Tag = filter.GetValues();
                    }
                }
            }
        }
コード例 #42
0
 void newObjectWindowAction_OnExecute(Object sender, PopupWindowShowActionExecuteEventArgs args) {
     if (!DataSource.AllowAdd) {
         throw new InvalidOperationException();
     }
     if (_objectSpace != args.PopupWindow.View.ObjectSpace) {
         args.PopupWindow.View.ObjectSpace.CommitChanges();
     }
     var detailView = (DetailView)args.PopupWindow.View;
     DataSource.Add(helper.ObjectSpace.GetObject(detailView.CurrentObject));
     ((PopupWindow)args.PopupWindow).ClosureScript =
         "if(window.dialogOpener != null) window.dialogOpener.ddLookupResult = '" +
         detailView.ObjectSpace.GetKeyValueAsString(detailView.CurrentObject) + "';";
 }
コード例 #43
0
 private void helpPopupWindowShowAction1_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
 {
     e.PopupWindowView.ObjectSpace.CommitChanges();
 }
コード例 #44
0
 private void objectWindowAction_OnExecute(Object sender, PopupWindowShowActionExecuteEventArgs args) {
     _popupWindowHelper.Assign(args, (ISupportSequenceObject)View.CurrentObject);
     string displayValue = GetPropertyDisplayValue();
     ((PopupWindow)args.PopupWindow).ClosureScript = "if(window.opener != null) window.opener.resultObject = '" + (displayValue != null ? displayValue.Replace("'", "\\'") : "") + "';";
 }
コード例 #45
0
ファイル: WinApplication.cs プロジェクト: dimajanzen/eXpand
 protected override void Logon(PopupWindowShowActionExecuteEventArgs logonWindowArgs) {
     StartSplash();
     base.Logon(logonWindowArgs);
 }