Example #1
0
        /// <summary>
        /// Creates the search popup with a tree.
        /// </summary>
        /// <param name="searchBox">The search box.</param>
        /// <param name="tree">The tree control.</param>
        /// <returns>The created menu to setup and show.</returns>
        public static ContextMenuBase CreateSearchPopup(out TextBox searchBox, out Tree tree)
        {
            var menu = new ContextMenuBase
            {
                Size = new Float2(320, 220),
            };

            searchBox = new TextBox(false, 1, 1)
            {
                Width         = menu.Width - 3,
                WatermarkText = "Search...",
                Parent        = menu,
            };
            var panel1 = new Panel(ScrollBars.Vertical)
            {
                Bounds = new Rectangle(0, searchBox.Bottom + 1, menu.Width, menu.Height - searchBox.Bottom - 2),
                Parent = menu
            };
            var panel2 = new VerticalPanel
            {
                Parent       = panel1,
                AnchorPreset = AnchorPresets.HorizontalStretchTop,
                IsScrollable = true,
            };

            tree = new Tree(false)
            {
                Parent = panel2,
            };
            return(menu);
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ItemsListContextMenu"/> class.
        /// </summary>
        /// <param name="width">The control width.</param>
        /// <param name="height">The control height.</param>
        public ItemsListContextMenu(float width = 320, float height = 220)
        {
            // Context menu dimensions
            Size = new Vector2(width, height);

            // Search box
            _searchBox = new TextBox(false, 1, 1)
            {
                Parent        = this,
                Width         = Width - 3,
                WatermarkText = "Search...",
            };
            _searchBox.TextChanged += OnSearchFilterChanged;

            // Panel with scrollbar
            _scrollPanel = new Panel(ScrollBars.Vertical)
            {
                Parent       = this,
                AnchorPreset = AnchorPresets.StretchAll,
                Bounds       = new Rectangle(0, _searchBox.Bottom + 1, Width, Height - _searchBox.Bottom - 2),
            };

            // Items list panel
            ItemsPanel = new VerticalPanel
            {
                Parent       = _scrollPanel,
                AnchorPreset = AnchorPresets.HorizontalStretchTop,
                IsScrollable = true,
            };
        }
Example #3
0
        public Memory()
            : base("Memory")
        {
            // Layout
            var panel = new Panel(ScrollBars.Vertical)
            {
                DockStyle = DockStyle.Fill,
                Parent    = this,
            };
            var layout = new VerticalPanel
            {
                DockStyle    = DockStyle.Top,
                IsScrollable = true,
                Parent       = panel,
            };

            // Chart
            _nativeAllocationsChart = new SingleChart
            {
                Title        = "Native Memory Allocation",
                FormatSample = v => Utilities.Utils.FormatBytesCount((int)v),
                Parent       = layout,
            };
            _nativeAllocationsChart.SelectedSampleChanged += OnSelectedSampleChanged;
            _managedAllocationsChart = new SingleChart
            {
                Title        = "Managed Memory Allocation",
                FormatSample = v => Utilities.Utils.FormatBytesCount((int)v),
                Parent       = layout,
            };
            _managedAllocationsChart.SelectedSampleChanged += OnSelectedSampleChanged;
        }
Example #4
0
        public override void BuildContents()
        {
            try
            {
                string pmet_ProcessMethodid = Dispatch.EitherField("pmet_ProcessMethodid");

                Record ProcessMethod  = FindRecord("ProcessMethod", "pmet_ProcessMethodid=" + pmet_ProcessMethodid);
                string pmet_companyid = ProcessMethod.GetFieldAsString("pmet_companyid");


                int        userid = CurrentUser.UserId;
                EntryGroup DecoratePersonNewEntry = new EntryGroup("ProcessMethodNewEntry");

                DecoratePersonNewEntry.Title = "ProcessMethod";
                DecoratePersonNewEntry.Fill(ProcessMethod);

                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(DecoratePersonNewEntry);
                AddContent(vpMainPanel);

                string urldelete = base.UrlDotNet(base.ThisDotNetDll, "RunProcessMethodEdit") + "&pmet_ProcessMethodid=" + pmet_ProcessMethodid;
                base.AddUrlButton("Edit", "Edit.gif", urldelete);


                string url = UrlDotNet(ThisDotNetDll, "RunProcessMethodList") + "&comp_companyid=" + pmet_companyid;
                url = url.Replace("Key37", "ProcessMethodid");
                url = url + "&Key37=" + pmet_companyid;
                this.AddUrlButton("cancel", "PrevCircle.gif", url);
            }
            catch (Exception error)
            {
                this.AddError(error.Message);
            }
        }
Example #5
0
        public override void BuildContents()
        {
            try {
                string cmac_CompeMarActid = Dispatch.EitherField("cmac_CompeMarActid");
                if (string.IsNullOrEmpty(cmac_CompeMarActid))
                {
                    cmac_CompeMarActid = Dispatch.EitherField("key58");
                }

                Record CompeMarAct = FindRecord("CompeMarAct", "cmac_CompeMarActid=" + cmac_CompeMarActid);

                EntryGroup screenBusReport = new EntryGroup("CompeMarActNewEntry");
                screenBusReport.Title = "CompeMarAct";
                screenBusReport.Fill(CompeMarAct);

                // string status = CompeMarAct.GetFieldAsString("cept_status");

                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(screenBusReport);


                AddContent(vpMainPanel);
                AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunDataPageEdit") + "&cmac_CompeMarActid=" + cmac_CompeMarActid);
                AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&cmac_CompeMarActid=" + cmac_CompeMarActid);
                AddUrlButton("Continue", "Continue.gif", UrlDotNet(ThisDotNetDll, "RunListPage"));
            } catch (Exception error) {
                this.AddError(error.Message);
            }
        }
Example #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ItemsListContextMenu"/> class.
        /// </summary>
        /// <param name="width">The control width.</param>
        /// <param name="height">The control height.</param>
        public ItemsListContextMenu(float width = 320, float height = 220)
        {
            // Context menu dimensions
            Size = new Vector2(width, height);

            // Search box
            _searchBox = new TextBox(false, 1, 1)
            {
                Width         = Width - 3,
                WatermarkText = "Search...",
                Parent        = this
            };
            _searchBox.TextChanged += OnSearchFilterChanged;

            // Create first panel (for scrollbar)
            var panel1 = new Panel(ScrollBars.Vertical)
            {
                Bounds = new Rectangle(0, _searchBox.Bottom + 1, Width, Height - _searchBox.Bottom - 2),
                Parent = this
            };

            // Create second panel (for items arrangement)
            ItemsPanel = new VerticalPanel
            {
                DockStyle    = DockStyle.Top,
                IsScrollable = true,
                Parent       = panel1
            };
        }
Example #7
0
        public Memory()
            : base("Memory")
        {
            // Layout
            var panel = new Panel(ScrollBars.Vertical)
            {
                AnchorPreset = AnchorPresets.StretchAll,
                Offsets      = Margin.Zero,
                Parent       = this,
            };
            var layout = new VerticalPanel
            {
                AnchorPreset = AnchorPresets.HorizontalStretchTop,
                Offsets      = Margin.Zero,
                IsScrollable = true,
                Parent       = panel,
            };

            // Chart
            _nativeAllocationsChart = new SingleChart
            {
                Title        = "Native Memory Allocation",
                FormatSample = v => Utilities.Utils.FormatBytesCount((int)v),
                Parent       = layout,
            };
            _nativeAllocationsChart.SelectedSampleChanged += OnSelectedSampleChanged;
            _managedAllocationsChart = new SingleChart
            {
                Title        = "Managed Memory Allocation",
                FormatSample = v => Utilities.Utils.FormatBytesCount((int)v),
                Parent       = layout,
            };
            _managedAllocationsChart.SelectedSampleChanged += OnSelectedSampleChanged;
        }
Example #8
0
        public override void BuildContents()
        {
            try {
                string opsu_OppoSupportId = Dispatch.EitherField("opsu_OppoSupportId");
                if (string.IsNullOrEmpty(opsu_OppoSupportId))
                {
                    opsu_OppoSupportId = Dispatch.EitherField("key58");
                }

                Record OppoSupport = FindRecord("OppoSupport", "opsu_OppoSupportId=" + opsu_OppoSupportId);

                EntryGroup screenOppoSupport = new EntryGroup("OppoSupportNewEntry");
                screenOppoSupport.Title = "OppoSupport";
                screenOppoSupport.Fill(OppoSupport);

                string status = OppoSupport.GetFieldAsString("opsu_status");

                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(screenOppoSupport);

                AddContent(vpMainPanel);
                AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunDataPageEdit") + "&opsu_OppoSupportId=" + opsu_OppoSupportId);
                AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&opsu_OppoSupportId=" + opsu_OppoSupportId);
                AddUrlButton("Continue", "Continue.gif", UrlDotNet(ThisDotNetDll, "RunListPage") + "&J=OppoSupport&T=Opportunity");
            } catch (Exception error) {
                this.AddError(error.Message);
            }
        }
Example #9
0
        public override void BuildContents()
        {
            try {
                string mapo_MarActPoolId = Dispatch.EitherField("mapo_MarActPoolId");
                if (string.IsNullOrEmpty(mapo_MarActPoolId))
                {
                    mapo_MarActPoolId = Dispatch.EitherField("key58");
                }

                Record     MarActPool      = FindRecord("MarActPool", "mapo_MarActPoolId=" + mapo_MarActPoolId);
                EntryGroup screenBusReport = new EntryGroup("MarActPoolNewEntry");
                screenBusReport.Title = "MarActPool";
                screenBusReport.Fill(MarActPool);

                // string status = Competitor.GetFieldAsString("cept_status");

                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(screenBusReport);

                AddContent(vpMainPanel);
                AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunDataPageEdit") + "&mapo_MarActPoolId=" + mapo_MarActPoolId);
                AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&mapo_MarActPoolId=" + mapo_MarActPoolId);
                AddUrlButton("Add MarActPlan", "New.gif", UrlDotNet("MarActPlan", "RunDataPageNew") + "&mapo_MarActPoolId=" + mapo_MarActPoolId);

                AddUrlButton("Continue", "Continue.gif", UrlDotNet("MarketingMenu", "RunMarActPool") + "&J=MarActPool&T=MarketingManagement");
            } catch (Exception error) {
                this.AddError(error.Message);
            }
        }
Example #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DebugLogWindow"/> class.
        /// </summary>
        /// <param name="editor">The editor.</param>
        public DebugLogWindow(Editor editor)
            : base(editor, true, ScrollBars.None)
        {
            Title = "Debug Log";
            OnEditorOptionsChanged(Editor.Options.Options);

            // Toolstrip
            var toolstrip = new ToolStrip(22.0f)
            {
                Parent = this,
            };

            toolstrip.AddButton("Clear", Clear).LinkTooltip("Clears all log entries");
            _clearOnPlayButton  = (ToolStripButton)toolstrip.AddButton("Clear on Play").SetAutoCheck(true).SetChecked(true).LinkTooltip("Clears all log entries on enter playmode");
            _pauseOnErrorButton = (ToolStripButton)toolstrip.AddButton("Pause on Error").SetAutoCheck(true).LinkTooltip("Performs auto pause on error");
            toolstrip.AddSeparator();
            _groupButtons[0] = (ToolStripButton)toolstrip.AddButton(editor.Icons.Error32, () => UpdateLogTypeVisibility(LogGroup.Error, _groupButtons[0].Checked)).SetAutoCheck(true).SetChecked(true).LinkTooltip("Shows/hides error messages");
            _groupButtons[1] = (ToolStripButton)toolstrip.AddButton(editor.Icons.Warning32, () => UpdateLogTypeVisibility(LogGroup.Warning, _groupButtons[1].Checked)).SetAutoCheck(true).SetChecked(true).LinkTooltip("Shows/hides warning messages");
            _groupButtons[2] = (ToolStripButton)toolstrip.AddButton(editor.Icons.Info32, () => UpdateLogTypeVisibility(LogGroup.Info, _groupButtons[2].Checked)).SetAutoCheck(true).SetChecked(true).LinkTooltip("Shows/hides info messages");
            UpdateCount();

            // Split panel
            _split = new SplitPanel(Orientation.Vertical, ScrollBars.Vertical, ScrollBars.Both)
            {
                AnchorPreset  = AnchorPresets.StretchAll,
                Offsets       = new Margin(0, 0, toolstrip.Bottom, 0),
                SplitterValue = 0.8f,
                Parent        = this
            };

            // Info detail info
            _logInfo = new Label
            {
                Parent       = _split.Panel2,
                AutoWidth    = true,
                AutoHeight   = true,
                Margin       = new Margin(4),
                Offsets      = Margin.Zero,
                AnchorPreset = AnchorPresets.StretchAll,
            };

            // Entries panel
            _entriesPanel = new VerticalPanel
            {
                AnchorPreset = AnchorPresets.HorizontalStretchTop,
                Offsets      = Margin.Zero,
                IsScrollable = true,
                Parent       = _split.Panel1,
            };

            // Cache entries icons
            IconInfo    = Editor.Icons.Info32;
            IconWarning = Editor.Icons.Warning32;
            IconError   = Editor.Icons.Error32;

            // Bind events
            Editor.Options.OptionsChanged            += OnEditorOptionsChanged;
            Debug.Logger.LogHandler.SendLog          += LogHandlerOnSendLog;
            Debug.Logger.LogHandler.SendExceptionLog += LogHandlerOnSendExceptionLog;
        }
Example #11
0
        public Overall()
            : base("Overall")
        {
            // Layout
            var panel = new Panel(ScrollBars.Vertical)
            {
                DockStyle = DockStyle.Fill,
                Parent    = this,
            };
            var layout = new VerticalPanel
            {
                DockStyle    = DockStyle.Top,
                IsScrollable = true,
                Parent       = panel,
            };

            // Charts
            _fpsChart = new SingleChart
            {
                Title  = "FPS",
                Parent = layout,
            };
            _fpsChart.SelectedSampleChanged += OnSelectedSampleChanged;
            _updateTimeChart = new SingleChart
            {
                Title        = "Update Time",
                FormatSample = v => (Mathf.RoundToInt(v * 10.0f) / 10.0f) + " ms",
                Parent       = layout,
            };
            _updateTimeChart.SelectedSampleChanged += OnSelectedSampleChanged;
            _drawTimeCPUChart = new SingleChart
            {
                Title        = "Draw Time (CPU)",
                FormatSample = v => (Mathf.RoundToInt(v * 10.0f) / 10.0f) + " ms",
                Parent       = layout,
            };
            _drawTimeCPUChart.SelectedSampleChanged += OnSelectedSampleChanged;
            _drawTimeGPUChart = new SingleChart
            {
                Title        = "Draw Time (GPU)",
                FormatSample = v => (Mathf.RoundToInt(v * 10.0f) / 10.0f) + " ms",
                Parent       = layout,
            };
            _drawTimeGPUChart.SelectedSampleChanged += OnSelectedSampleChanged;
            _cpuMemChart = new SingleChart
            {
                Title        = "CPU Memory",
                FormatSample = v => ((int)v) + " MB",
                Parent       = layout,
            };
            _cpuMemChart.SelectedSampleChanged += OnSelectedSampleChanged;
            _gpuMemChart = new SingleChart
            {
                Title        = "GPU Memory",
                FormatSample = v => ((int)v) + " MB",
                Parent       = layout,
            };
            _gpuMemChart.SelectedSampleChanged += OnSelectedSampleChanged;
        }
Example #12
0
        public override void BuildContents()
        {
            AddContent(HTML.Form());
            try {
                string     hMode                  = Dispatch.EitherField("HiddenMode");
                string     id                     = Dispatch.EitherField("opco_OppoCompetitorId");
                int        errorflag              = 0;
                string     errormessage           = string.Empty;
                Record     OppoCompetitor         = FindRecord("OppoCompetitor", "opco_OppoCompetitorId=" + id);
                string     opco_opportunityid     = OppoCompetitor.GetFieldAsString("opco_opportunityid");
                EntryGroup OppoCompetitorNewEntry = new EntryGroup("OppoCompetitorNewEntry");
                OppoCompetitorNewEntry.Fill(OppoCompetitor);

                AddTabHead("Delete OppoCompetitor");
                if (hMode == "Delete")
                {
                    OppoCompetitor.DeleteRecord = true;
                    OppoCompetitor.SaveChanges();

                    ////double  =OppoCompetitor.GetFieldAsDouble("");
                    ////Record BusReport= FindRecord("BusReport", "cpet_competitorid=" + cpet_competitorid);
                    ////double  = BusReport.GetFieldAsDouble("");
                    //// =  - ;
                    ////BusReport.SetField("", );
                    ////BusReport.SaveChanges();

                    string opportunityid = Dispatch.EitherField("Key7");
                    string url           = string.Empty;

                    if (!string.IsNullOrEmpty(opportunityid))
                    {
                        url = UrlDotNet(ThisDotNetDll, "RunListPage") + "&J=OppoCompetitor&T=Opportunity";
                    }
                    else
                    {
                        url = UrlDotNet(ThisDotNetDll, "RunCompetitorListPage") + "&J=OppoCompetitor&T=Competitor";
                    }

                    Dispatch.Redirect(url);
                }
                if (errorflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    VerticalPanel vpMainPanel = new VerticalPanel();
                    vpMainPanel.AddAttribute("width", "100%");
                    string sUrl = "javascript:document.EntryForm.HiddenMode.value='Delete';";
                    OppoCompetitorNewEntry.GetHtmlInViewMode(OppoCompetitor);
                    vpMainPanel.Add(OppoCompetitorNewEntry);
                    AddContent(vpMainPanel);
                    AddSubmitButton("ConfirmDelete", "Delete.gif", sUrl);
                    string url = UrlDotNet(ThisDotNetDll, "RunListPage") + "&J=OppoCompetitor&T=Opportunity";
                    AddUrlButton("Cancel", "cancel.gif", url);
                }
            } catch (Exception e) {
                AddError(e.Message);
            }
        }
Example #13
0
        public override void BuildContents()
        {
            AddContent(HTML.Form());

            try {
                string     hMode = Dispatch.EitherField("HiddenMode");
                string     opsu_opportunityid  = Dispatch.EitherField("Key7");
                int        errorflag           = 0;
                string     errormessage        = string.Empty;
                EntryGroup OppoSupportNewEntry = new EntryGroup("OppoSupportNewEntry");
                //CostAdjustmentProductNewEntry.Title = "Add CostAdjustmentProduct";
                Entry opsu_opportunityidEntry = OppoSupportNewEntry.GetEntry("opsu_opportunityid");
                if (opsu_opportunityidEntry != null)
                {
                    opsu_opportunityidEntry.DefaultValue = opsu_opportunityid;
                    opsu_opportunityidEntry.ReadOnly     = true;
                }

                AddTabHead("OppoSupport");
                if (hMode == "Save")
                {
                    Record OppoSupport = new Record("OppoSupport");
                    OppoSupportNewEntry.Fill(OppoSupport);
                    if (OppoSupportNewEntry.Validate())
                    {
                        OppoSupport.SaveChanges();
                        string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&opsu_OppoSupportid=" + OppoSupport.GetFieldAsString("opsu_OppoSupportid") + "&J=Summary";
                        Dispatch.Redirect(url);
                        errorflag = -1;
                    }
                    else
                    {
                        errorflag = 1;
                    }
                }
                if (errorflag != -1)
                {
                    if (errorflag == 2)
                    {
                        AddError(errormessage);
                    }

                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    VerticalPanel vpMainPanel = new VerticalPanel();
                    vpMainPanel.AddAttribute("width", "100%");
                    string sUrl = "javascript:document.EntryForm.HiddenMode.value='Save';";
                    OppoSupportNewEntry.GetHtmlInEditMode();
                    vpMainPanel.Add(OppoSupportNewEntry);
                    AddContent(vpMainPanel);
                    AddSubmitButton("Save", "Save.gif", sUrl);
                    AddUrlButton("Cancel", "cancel.gif", UrlDotNet(ThisDotNetDll, "RunListPage") + "&J=OppoSupport&T=Opportunity");
                }
            } catch (Exception e) {
                AddError(e.Message);
            }
        }
Example #14
0
        public override void BuildContents()
        {
            AddContent(HTML.Form());
            try {
                string     hMode              = Dispatch.EitherField("HiddenMode");
                string     id                 = Dispatch.EitherField("optr_OppoTrackId");
                int        errorflag          = 0;
                string     errormessage       = string.Empty;
                Record     OppoTrack          = FindRecord("OppoTrack", "optr_OppoTrackId=" + id);
                string     optr_opportunityid = OppoTrack.GetFieldAsString("optr_opportunityid");
                string     oppoid             = Dispatch.EitherField("key7");
                EntryGroup OppoTrackNewEntry  = new EntryGroup("OppoTrackNewEntry");
                OppoTrackNewEntry.Fill(OppoTrack);

                AddTabHead("Delete OppoTrack");
                if (hMode == "Delete")
                {
                    OppoTrack.DeleteRecord = true;
                    OppoTrack.SaveChanges();

                    QuerySelect qs = this.GetQuery();
                    qs.SQLCommand = @"Update Opportunity set oppo_nexttrackdate = (select MAX(optr_nexttrackdate) from OppoTrack where optr_deleted is null and optr_opportunityid=" + optr_opportunityid + @")
                        ,oppo_trackdate = (select MAX(optr_date) from OppoTrack where optr_deleted is null and optr_opportunityid=" + optr_opportunityid + @" )
                        ,oppo_targetclose = (select optr_targetclose  from OppoTrack where optr_OppoTrackId = " + OppoTrack.RecordId.ToString() + @" )
                        ,oppo_forecast = (select optr_forecast from OppoTrack where optr_OppoTrackId = " + OppoTrack.RecordId.ToString() + @") 
                        ,oppo_certainty = (select optr_certainty  from OppoTrack where optr_OppoTrackId = " + OppoTrack.RecordId.ToString() + @") where oppo_opportunityid=" + optr_opportunityid;
                    qs.ExecuteNonQuery();

                    string url = string.Empty;
                    if (string.IsNullOrEmpty(oppoid))
                    {
                        url = UrlDotNet("SalesMenu", "RunOppoTrack") + "&J=OppoTrack&T=SalesManagement";
                    }
                    else
                    {
                        url = UrlDotNet(ThisDotNetDll, "RunListPage") + "&J=OppoTrack&T=Opportunity";
                    }
                    Dispatch.Redirect(url);
                }
                if (errorflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    VerticalPanel vpMainPanel = new VerticalPanel();
                    vpMainPanel.AddAttribute("width", "100%");
                    string sUrl = "javascript:document.EntryForm.HiddenMode.value='Delete';";
                    OppoTrackNewEntry.GetHtmlInViewMode(OppoTrack);
                    vpMainPanel.Add(OppoTrackNewEntry);
                    AddContent(vpMainPanel);
                    AddSubmitButton("ConfirmDelete", "Delete.gif", sUrl);
                    string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&optr_OppoTrackId=" + id + "&J=Summary";
                    AddUrlButton("Cancel", "cancel.gif", url);
                }
            } catch (Exception e) {
                AddError(e.Message);
            }
        }
Example #15
0
        public override void BuildContents()
        {
            AddContent(HTML.Form());

            try {
                string hMode = Dispatch.EitherField("HiddenMode");
                string mapl_maractpoolid = Dispatch.EitherField("mapl_maractpoolid");
                if (string.IsNullOrEmpty(mapl_maractpoolid)) {
                    mapl_maractpoolid = Dispatch.EitherField("Key58");
                }
                int errorflag = 0;
                string errormessage = string.Empty;
                EntryGroup MarActPlanNewEntry = new EntryGroup("MarActPlanNewEntry");
                //CostAdjustmentProductNewEntry.Title = "Add CostAdjustmentProduct";
                Entry mapl_maractpoolidEntry = MarActPlanNewEntry.GetEntry("mapl_maractpoolid");
                if (mapl_maractpoolidEntry != null) {
                    mapl_maractpoolidEntry.DefaultValue = mapl_maractpoolid;
                    mapl_maractpoolidEntry.ReadOnly = true;
                }

                AddTabHead("MarActPlan");
                if (hMode == "Save") {
                    Record MarActPlan = new Record("MarActPlan");
                    MarActPlanNewEntry.Fill(MarActPlan);
                    if (MarActPlanNewEntry.Validate()) {

                        MarActPlan.SaveChanges();

                        string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&mapl_maractplanid=" + MarActPlan.RecordId + "&J=Summary";
                        Dispatch.Redirect(url);
                        errorflag = -1;
                    } else {
                        errorflag = 1;
                    }
                }
                if (errorflag != -1) {
                    if (errorflag == 2) {
                        AddError(errormessage);
                    }

                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    VerticalPanel vpMainPanel = new VerticalPanel();
                    vpMainPanel.AddAttribute("width", "100%");
                    string sUrl = "javascript:document.EntryForm.HiddenMode.value='Save';";
                    MarActPlanNewEntry.GetHtmlInEditMode();
                    vpMainPanel.Add(MarActPlanNewEntry);
                    AddContent(vpMainPanel);
                    AddSubmitButton("Save", "Save.gif", sUrl);
                    AddUrlButton("Cancel", "cancel.gif", UrlDotNet(ThisDotNetDll, "RunListPage") + "&J=MarActPlan&T=MarketingManagement");
                }

            } catch (Exception e) {
                AddError(e.Message);
            }
        }
Example #16
0
        public override void BuildContents()
        {
            AddContent(HTML.Form());
            try
            {
                string hMode             = Dispatch.EitherField("HiddenMode");
                string id                = Dispatch.EitherField("dper_decoratepersonid");
                int    errorflag         = 0;
                string errormessage      = string.Empty;
                Record DecoratePerson    = FindRecord("DecoratePerson", "dper_decoratepersonid=" + id);
                string dper_competitorid = DecoratePerson.GetFieldAsString("dper_competitorid");

                EntryGroup CompetitionPersonNewEntry = new EntryGroup("CompetitionPersonNewEntry");
                CompetitionPersonNewEntry.Fill(DecoratePerson);

                AddTabHead("Delete Person");
                if (hMode == "Delete")
                {
                    DecoratePerson.DeleteRecord = true;
                    DecoratePerson.SaveChanges();

                    ////double  =Person.GetFieldAsDouble("");
                    ////Record BusReport= FindRecord("BusReport", "cpet_competitorid=" + cpet_competitorid);
                    ////double  = BusReport.GetFieldAsDouble("");
                    //// =  - ;
                    ////BusReport.SetField("", );
                    ////BusReport.SaveChanges();

                    string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&cpet_competitorid=" + dper_competitorid + "&J=Summary";
                    url = url.Replace("Key37", "DecoratePersonid");
                    url = url + "&Key37=" + dper_competitorid;
                    Dispatch.Redirect(url);
                }
                if (errorflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    VerticalPanel vpMainPanel = new VerticalPanel();
                    vpMainPanel.AddAttribute("width", "100%");
                    string sUrl = "javascript:document.EntryForm.HiddenMode.value='Delete';";
                    CompetitionPersonNewEntry.GetHtmlInViewMode(DecoratePerson);
                    vpMainPanel.Add(CompetitionPersonNewEntry);
                    AddContent(vpMainPanel);
                    AddSubmitButton("ConfirmDelete", "Delete.gif", sUrl);
                    string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&cpet_competitorid=" + dper_competitorid + "&J=Summary";
                    url = url.Replace("Key37", "DecoratePersonid");
                    url = url + "&Key37=" + dper_competitorid;
                    AddUrlButton("Cancel", "cancel.gif", url);
                }
            }
            catch (Exception e)
            {
                AddError(e.Message);
            }
        }
Example #17
0
 public override void BuildContents()
 {
     try
     {
         AddContent(HTML.Form());
         string     qutaid        = Dispatch.EitherField("quta_Quotationid");
         EntryGroup qutacompEntry = new EntryGroup("QuotationCompanyEntry");
         qutacompEntry.Title = "商机客户";
         EntryGroup qutaEntry = new EntryGroup("QuotationNewEntry");
         qutaEntry.Title = "报价信息";
         Record qutaRec = FindRecord("Quotation", "quta_Quotationid=" + qutaid);
         qutacompEntry.Fill(qutaRec);
         qutaEntry.Fill(qutaRec);
         AddTabHead("Quotation");
         int    errflag = 0;
         string hMode   = Dispatch.EitherField("HiddenMode");
         if (hMode == "Save")
         {
             if (qutaEntry.Validate() == true && qutacompEntry.Validate())
             {
                 qutaEntry.Fill(qutaRec);
                 qutacompEntry.Fill(qutaRec);
                 string quta_opportunityid = qutaRec.GetFieldAsString("quta_opportunityid");
                 string quta_updateoppo    = qutaRec.GetFieldAsString("quta_updateoppo");
                 if (quta_updateoppo.ToLower() == "y")
                 {
                     QuerySelect qs = this.GetQuery();
                     qs.SQLCommand = "Update Opportunity set oppo_qutaprice= (select sum(quta_localeamount) from Quotation where quta_deleted is null and quta_updateoppo = 'Y' and quta_opportunityid = " + quta_opportunityid + " ) where oppo_Opportunityid =" + quta_opportunityid;
                     qs.ExecuteNonQuery();
                 }
                 qutaRec.SaveChanges();
                 Dispatch.Redirect(UrlDotNet(ThisDotNetDll, "RunDataPage") + "&quta_Quotationid=" + qutaid);
             }
         }
         if (errflag != -1)
         {
             AddContent(HTML.InputHidden("HiddenMode", ""));
             qutacompEntry.GetHtmlInEditMode(qutaRec);
             qutaEntry.GetHtmlInEditMode(qutaRec);
             VerticalPanel vp = new VerticalPanel();
             vp.AddAttribute("width", "100%");
             vp.Add(qutacompEntry);
             vp.Add(qutaEntry);
             AddContent(vp);
             AddSubmitButton("Save", "Save.gif", "javascript:document.EntryForm.HiddenMode.value='Save';");
             AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&quta_Quotationid=" + qutaid);
             AddUrlButton("Cancel", "Cancel.gif", UrlDotNet(ThisDotNetDll, "RunDataPage") + "&quta_Quotationid=" + qutaid);
         }
     }
     catch (Exception error)
     {
         this.AddError(error.Message);
     }
 }
Example #18
0
        public override void BuildContents()
        {
            try {
                string mapl_MarActPlanId = Dispatch.EitherField("mapl_MarActPlanId");
                if (string.IsNullOrEmpty(mapl_MarActPlanId))
                {
                    mapl_MarActPlanId = Dispatch.EitherField("key58");
                }

                Record MarActPlan = FindRecord("MarActPlan", "mapl_MarActPlanId=" + mapl_MarActPlanId);

                EntryGroup screenMarActPlan = new EntryGroup("MarActPlanNewEntry");
                screenMarActPlan.Title = "MarActPlan";
                screenMarActPlan.Fill(MarActPlan);

                string status = MarActPlan.GetFieldAsString("mapl_status");


                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(screenMarActPlan);

                List MarActPlanPersonList = new List("MarActPlanPersonList");
                MarActPlanPersonList.Filter                = "dper_deleted is null and dper_maractplanid=" + mapl_MarActPlanId;
                MarActPlanPersonList.RowsPerScreen         = 500;
                MarActPlanPersonList.ShowNavigationButtons = true;
                MarActPlanPersonList.PadBottom             = false;
                vpMainPanel.Add(MarActPlanPersonList);

                List DisplayContentGrid = new List("DisplayContentGrid");
                DisplayContentGrid.Filter                = "dico_deleted is null and dico_maractplanid=" + mapl_MarActPlanId;
                DisplayContentGrid.RowsPerScreen         = 500;
                DisplayContentGrid.ShowNavigationButtons = true;
                DisplayContentGrid.PadBottom             = false;
                vpMainPanel.Add(DisplayContentGrid);

                List ActualCostGrid = new List("ActualCostGrid");
                ActualCostGrid.Filter                = "acco_deleted is null and acco_maractplanid=" + mapl_MarActPlanId;
                ActualCostGrid.RowsPerScreen         = 500;
                ActualCostGrid.ShowNavigationButtons = true;
                ActualCostGrid.PadBottom             = false;
                vpMainPanel.Add(ActualCostGrid);

                AddContent(vpMainPanel);
                AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunDataPageEdit") + "&mapl_MarActPlanId=" + mapl_MarActPlanId);
                AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&mapl_MarActPlanId=" + mapl_MarActPlanId);
                AddUrlButton("Add Person", "new.gif", UrlDotNet(ThisDotNetDll, "RunPersonAdd") + "&mapl_MarActPlanId=" + mapl_MarActPlanId);
                AddUrlButton("Add DisplayContent", "new.gif", UrlDotNet(ThisDotNetDll, "RunDisplayContentAdd") + "&mapl_MarActPlanId=" + mapl_MarActPlanId);
                AddUrlButton("Add ActualCost", "new.gif", UrlDotNet(ThisDotNetDll, "RunActualCostAdd") + "&mapl_MarActPlanId=" + mapl_MarActPlanId);
                AddUrlButton("Continue", "Continue.gif", UrlDotNet(ThisDotNetDll, "RunListPage") + "&J=MarActPlan&T=MarketingManagement");
            } catch (Exception error) {
                this.AddError(error.Message);
            }
        }
Example #19
0
        public override void BuildContents()
        {
            AddContent(HTML.Form());
            try
            {
                string     hMode             = Dispatch.EitherField("HiddenMode");
                string     id                = Dispatch.EitherField("brra_BrandRateId");
                int        errorflag         = 0;
                string     errormessage      = string.Empty;
                Record     BrandRate         = FindRecord("BrandRate", "brra_BrandRateId=" + id);
                string     maif_MarketInfoId = BrandRate.GetFieldAsString("brra_marketinfoid");
                EntryGroup BrandRateNewEntry = new EntryGroup("BrandRateNewEntry");
                BrandRateNewEntry.Fill(BrandRate);

                AddTabHead("Delete BrandRate");
                if (hMode == "Delete")
                {
                    BrandRate.DeleteRecord = true;
                    BrandRate.SaveChanges();

                    ////double  =BrandRate.GetFieldAsDouble("");
                    ////Record MarketInfo= FindRecord("MarketInfo", "maif_MarketInfoId=" + maif_MarketInfoId);
                    ////double  = MarketInfo.GetFieldAsDouble("");
                    //// =  - ;
                    ////MarketInfo.SetField("", );
                    ////MarketInfo.SaveChanges();

                    string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&maif_MarketInfoId=" + maif_MarketInfoId + "&J=Summary";
                    url = url.Replace("Key37", "BrandRateid");
                    url = url + "&Key37=" + maif_MarketInfoId;
                    Dispatch.Redirect(url);
                }
                if (errorflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    VerticalPanel vpMainPanel = new VerticalPanel();
                    vpMainPanel.AddAttribute("width", "100%");
                    string sUrl = "javascript:document.EntryForm.HiddenMode.value='Delete';";
                    BrandRateNewEntry.GetHtmlInViewMode(BrandRate);
                    vpMainPanel.Add(BrandRateNewEntry);
                    AddContent(vpMainPanel);
                    AddSubmitButton("ConfirmDelete", "Delete.gif", sUrl);
                    string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&maif_MarketInfoId=" + maif_MarketInfoId + "&J=Summary";
                    url = url.Replace("Key37", "BrandRateid");
                    url = url + "&Key37=" + maif_MarketInfoId;
                    AddUrlButton("Cancel", "cancel.gif", url);
                }
            }
            catch (Exception e)
            {
                AddError(e.Message);
            }
        }
Example #20
0
 void Start()
 {
     panel = new VerticalPanel();
     panel.Add(new NumericTextBox(0.0f));
     panel.VisibilityProperty.BindBoth(()=>panelVisible, b=>panelVisible = b);
     panel.Add(new Button("Hippos").SetLayoutOptions(GUILayout.Width(300), GUILayout.Height(100)));
     panel.Add(new Button("Are"));
     var moo = new Toggle("Fun!").SetLayoutOptions(GUILayout.Width(100)).IsCheckedProperty.BindSet(b=>weeee.Visible = b);
     panel.Add(moo);
     weeee = new Button("OMFGWeeeeee!");
     weeee.Clicked += button => { Debug.Log("Moo!"); moo.IsChecked = !moo.IsChecked; };
     panel.Add(weeee);
 }
Example #21
0
        public override void BuildContents()
        {
            try {
                string seac_ServiceAcceptId = Dispatch.EitherField("seac_ServiceAcceptId");
                if (string.IsNullOrEmpty(seac_ServiceAcceptId))
                {
                    seac_ServiceAcceptId = Dispatch.EitherField("key58");
                }

                Record ServiceAccept = FindRecord("ServiceAccept", "seac_ServiceAcceptId=" + seac_ServiceAcceptId);

                EntryGroup screenServiceAccept = new EntryGroup("ServiceAcceptNewEntry");
                screenServiceAccept.Title = "ServiceAccept";
                screenServiceAccept.Fill(ServiceAccept);

                string status    = ServiceAccept.GetFieldAsString("seac_status");
                string seac_type = ServiceAccept.GetFieldAsString("seac_type");

                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(screenServiceAccept);
                if (seac_type == "product")
                {
                    List CusUseStatusGrid = new List("CusUseStatusGrid");
                    CusUseStatusGrid.Filter                = "cust_deleted is null and cust_serviceacceptid=" + seac_ServiceAcceptId;
                    CusUseStatusGrid.RowsPerScreen         = 500;
                    CusUseStatusGrid.ShowNavigationButtons = true;
                    CusUseStatusGrid.PadBottom             = false;
                    vpMainPanel.Add(CusUseStatusGrid);
                }
                List ServiceDealGrid = new List("ServiceDealGrid");
                ServiceDealGrid.Filter                = "sede_deleted is null and sede_serviceacceptid=" + seac_ServiceAcceptId;
                ServiceDealGrid.RowsPerScreen         = 500;
                ServiceDealGrid.ShowNavigationButtons = true;
                ServiceDealGrid.PadBottom             = false;
                vpMainPanel.Add(ServiceDealGrid);

                AddContent(vpMainPanel);
                AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunDataPageEdit") + "&seac_ServiceAcceptId=" + seac_ServiceAcceptId);
                AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&seac_ServiceAcceptId=" + seac_ServiceAcceptId);
                if (seac_type == "product")
                {
                    AddUrlButton("Add CusUseStatus", "new.gif", UrlDotNet(ThisDotNetDll, "RunCusUseStatusAdd") + "&seac_ServiceAcceptId=" + seac_ServiceAcceptId);
                }
                AddUrlButton("Add ServiceDeal", "new.gif", UrlDotNet(ThisDotNetDll, "RunServiceDealAdd") + "&seac_ServiceAcceptId=" + seac_ServiceAcceptId);
                AddUrlButton("Continue", "Continue.gif", UrlDotNet("ServiceMenu", "RunCustomerService"));
                AddWorkflowButtons("ServiceAccept");
            } catch (Exception error) {
                this.AddError(error.Message);
            }
        }
Example #22
0
    void Start()
    {
        panel = new VerticalPanel();
        panel.Add(new NumericTextBox(0.0f));
        panel.VisibilityProperty.BindBoth(() => panelVisible, b => panelVisible = b);
        panel.Add(new Button("Hippos").SetLayoutOptions(GUILayout.Width(300), GUILayout.Height(100)));
        panel.Add(new Button("Are"));
        var moo = new Toggle("Fun!").SetLayoutOptions(GUILayout.Width(100)).IsCheckedProperty.BindSet(b => weeee.Visible = b);

        panel.Add(moo);
        weeee          = new Button("OMFGWeeeeee!");
        weeee.Clicked += button => { Debug.Log("Moo!"); moo.IsChecked = !moo.IsChecked; };
        panel.Add(weeee);
    }
Example #23
0
        public override void BuildContents()
        {
            try
            {
                AddContent(HTML.Form());

                EntryGroup qutacompEntry = new EntryGroup("QuotationCompanyEntry");
                qutacompEntry.Title = "商机客户";
                EntryGroup qutaEntry = new EntryGroup("QuotationNewEntry");
                qutaEntry.Title = "报价信息";

                AddTabHead("Quotation");
                int    errflag = 0;
                string hMode   = Dispatch.EitherField("HiddenMode");
                if (hMode == "Save")
                {
                    Record QutaRec = new Record("Quotation");
                    qutacompEntry.Fill(QutaRec);
                    qutaEntry.Fill(QutaRec);
                    if (qutaEntry.Validate() == true && qutacompEntry.Validate())
                    {
                        string oppoid = Dispatch.EitherField("oppo_OpportunityId");
                        if (string.IsNullOrEmpty(oppoid))
                        {
                            oppoid = Dispatch.EitherField("key7");
                        }
                        QutaRec.SetField("quta_OpportunityId", oppoid);
                        QutaRec.SaveChanges();
                        Dispatch.Redirect(UrlDotNet(ThisDotNetDll, "RunDataPage") + "&quta_Quotationid=" + QutaRec.RecordId.ToString());
                    }
                }
                if (errflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    qutacompEntry.GetHtmlInEditMode();
                    qutaEntry.GetHtmlInEditMode();
                    VerticalPanel vp = new VerticalPanel();
                    vp.AddAttribute("width", "100%");
                    vp.Add(qutacompEntry);
                    vp.Add(qutaEntry);
                    AddContent(vp);
                    AddSubmitButton("Save", "Save.gif", "javascript:document.EntryForm.HiddenMode.value='Save';");
                    AddUrlButton("Cancel", "Cancel.gif", UrlDotNet(ThisDotNetDll, "RunListPage") + "&J=Quotation&T=Opportunity");
                }
            }
            catch (Exception error)
            {
                this.AddError(error.Message);
            }
        }
Example #24
0
        public override void BuildContents()
        {
            try
            {
                AddContent(HTML.Form());
                //string compid = Dispatch.EitherField("comp_companyid");
                EntryGroup CompEntry = new EntryGroup("CompanyBoxLong");
                CompEntry.Title = "基础信息";
                EntryGroup DealEntry = new EntryGroup("CompanyDealEntry");
                DealEntry.Title = "交易信息";
                EntryGroup StatusEntry = new EntryGroup("CompanyStatusEntry");
                StatusEntry.Title = "状态信息";

                GetTabs("CompanySummary", "Summary");
                int    errflag = 0;
                string hMode   = Dispatch.EitherField("HiddenMode");
                if (hMode == "Save")
                {
                    Record CompRec = new Record("Company");
                    CompEntry.Fill(CompRec);
                    DealEntry.Fill(CompRec);
                    StatusEntry.Fill(CompRec);
                    if (CompEntry.Validate() == true && DealEntry.Validate() && DealEntry.Validate() == true && StatusEntry.Validate())
                    {
                        CompRec.SaveChanges();
                        Dispatch.Redirect(UrlDotNet(ThisDotNetDll, "RunDataPage") + "&comp_companyid=" + CompRec.RecordId.ToString());
                    }
                }
                if (errflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    CompEntry.GetHtmlInEditMode();
                    DealEntry.GetHtmlInEditMode();
                    //StatusEntry.GetHtmlInEditMode();
                    VerticalPanel vp = new VerticalPanel();
                    vp.AddAttribute("width", "100%");
                    vp.Add(CompEntry);
                    vp.Add(DealEntry);
                    //vp.Add(StatusEntry);
                    AddContent(vp);
                    AddSubmitButton("Save", "Save.gif", "javascript:document.EntryForm.HiddenMode.value='Save';");
                    AddUrlButton("Cancel", "Cancel.gif", UrlDotNet(ThisDotNetDll, "RunListPage") + "&T=CompanyList");
                }
            }
            catch (Exception error)
            {
                this.AddError(error.Message);
            }
        }
Example #25
0
        public override void BuildContents()
        {
            try
            {
                AddContent(HTML.Form());
                string compid = Dispatch.EitherField("comp_companyid");
                if (string.IsNullOrEmpty(compid))
                {
                    compid = Dispatch.EitherField("key1");
                }
                string     addrid    = Dispatch.EitherField("addr_AddressID");
                string     hMode     = Dispatch.EitherField("HiddenMode");
                EntryGroup AddrEntry = new EntryGroup("CompanyAddressEntry");
                AddrEntry.Title = "地址信息";
                Record AddrRec = FindRecord("Address", "addr_AddressID=" + addrid);
                int    errflag = 0;
                AddTabHead("Address");
                //GetTabs("CompanyAddress", "Address");
                if (hMode == "Save")
                {
                    AddrEntry.Fill(AddrRec);
                    if (AddrEntry.Validate() == true)
                    {
                        AddrRec.SetField("usst_companyid", compid);
                        AddrRec.SaveChanges();
                        Dispatch.Redirect(UrlDotNet(ThisDotNetDll, "RunAddressList") + "&comp_companyid=" + compid + "&J=Summary&T=CompanySummary");
                    }
                }
                if (errflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    AddrEntry.GetHtmlInEditMode(AddrRec);
                    VerticalPanel vp = new VerticalPanel();
                    vp.AddAttribute("width", "100%");
                    vp.Add(AddrEntry);
                    AddContent(vp);

                    string url = "javascript:document.EntryForm.HiddenMode.value='Save';";
                    AddSubmitButton("Save", "Save.gif", url);
                    AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunAddressDelete") + "&comp_companyid=" + compid + "&addr_AddressID=" + addrid);
                    AddUrlButton("Cancel", "cancel.gif", UrlDotNet(ThisDotNetDll, "RunAddressList") + "&comp_companyid=" + compid + "&J=Summary&T=CompanySummary");
                }
            }
            catch (Exception ex)
            {
                AddError(ex.Message + "AddrEditPage");
            }
        }
Example #26
0
        public override void BuildContents()
        {
            try
            {
                string cont_ContractId = Dispatch.EitherField("cont_ContractId");
                if (string.IsNullOrEmpty(cont_ContractId))
                {
                    cont_ContractId = Dispatch.EitherField("key58");
                }

                Record Contract = FindRecord("Contract", "cont_ContractId=" + cont_ContractId);

                EntryGroup screenContract = new EntryGroup("ContractNewEntry");
                screenContract.Title = "Contract";
                screenContract.Fill(Contract);
                string cont_name = Contract.GetFieldAsString("cont_name");

                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(screenContract);

                List ContractDetailGrid = new List("ContractDetailGrid");
                ContractDetailGrid.Filter                = "code_deleted is null and code_contractid=" + cont_ContractId;
                ContractDetailGrid.RowsPerScreen         = 500;
                ContractDetailGrid.ShowNavigationButtons = true;
                ContractDetailGrid.PadBottom             = false;
                vpMainPanel.Add(ContractDetailGrid);



                AddContent(vpMainPanel);

                AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunDataPageEdit") + "&cont_ContractId=" + cont_ContractId);
                AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&cont_ContractId=" + cont_ContractId);

                AddUrlButton("Add ContractDetail", "new.gif", UrlDotNet(ThisDotNetDll, "RunContractDetailAdd") + "&cont_ContractId=" + cont_ContractId);
                // AddUrlButton("Print", "Print.gif", Url("freport/QuotationReport.aspx") + "&quotationid=" + cont_ContractId + "&cont_name=" + cont_name + "&type=1");


                AddUrlButton("Continue", "Continue.gif", UrlDotNet(ThisDotNetDll, "RunListPage") + "&J=Contract&T=SalesManagement");        //
                //AddWorkflowButtons("Contract");
            }
            catch (Exception error)
            {
                this.AddError(error.Message);
            }
        }
Example #27
0
        public override void BuildContents()
        {
            try {
                string mate_MaintenanceId = Dispatch.EitherField("mate_MaintenanceId");
                if (string.IsNullOrEmpty(mate_MaintenanceId))
                {
                    mate_MaintenanceId = Dispatch.EitherField("key58");
                }

                Record Maintenance = FindRecord("Maintenance", "mate_MaintenanceId=" + mate_MaintenanceId);

                EntryGroup screenMaintenance = new EntryGroup("MaintenanceNewEntry");
                screenMaintenance.Title = "Maintenance";
                screenMaintenance.Fill(Maintenance);

                string status = Maintenance.GetFieldAsString("mate_status");


                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(screenMaintenance);

                List MainteDetailGrid = new List("MainteDetailGrid");
                MainteDetailGrid.Filter                = "mtde_deleted is null and mtde_maintenanceid=" + mate_MaintenanceId;
                MainteDetailGrid.RowsPerScreen         = 500;
                MainteDetailGrid.ShowNavigationButtons = true;
                MainteDetailGrid.PadBottom             = false;
                vpMainPanel.Add(MainteDetailGrid);

                List BadTypeGrid = new List("BadTypeGrid");
                BadTypeGrid.Filter                = "badt_deleted is null and badt_Maintenanceid=" + mate_MaintenanceId;
                BadTypeGrid.RowsPerScreen         = 500;
                BadTypeGrid.ShowNavigationButtons = true;
                BadTypeGrid.PadBottom             = false;
                vpMainPanel.Add(BadTypeGrid);

                AddContent(vpMainPanel);
                AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunDataPageEdit") + "&mate_MaintenanceId=" + mate_MaintenanceId);
                AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&mate_MaintenanceId=" + mate_MaintenanceId);
                AddUrlButton("Add MainteDetail", "new.gif", UrlDotNet(ThisDotNetDll, "RunMainteDetailAdd") + "&mate_MaintenanceId=" + mate_MaintenanceId);
                AddUrlButton("Add BadType", "new.gif", UrlDotNet(ThisDotNetDll, "RunBadTypeAdd") + "&mate_MaintenanceId=" + mate_MaintenanceId);
                AddUrlButton("Continue", "Continue.gif", UrlDotNet("ServiceMenu", "RunMaintenance") + "&J=Maintenance");
            } catch (Exception error) {
                this.AddError(error.Message);
            }
        }
Example #28
0
            /// <summary>
            /// Initializes a new instance of the <see cref="CategoryEntry"/> class.
            /// </summary>
            /// <param name="text">The text.</param>
            public CategoryEntry(string text)
                : base(text)
            {
                var scroll = new Panel(ScrollBars.Vertical)
                {
                    DockStyle = DockStyle.Fill,
                    Parent    = this,
                };
                var panel = new VerticalPanel
                {
                    DockStyle    = DockStyle.Top,
                    IsScrollable = true,
                    Parent       = scroll,
                };

                Panel = panel;
            }
Example #29
0
        public override void BuildContents()
        {
            try
            {
                AddContent(HTML.Form());
                string compid = Dispatch.EitherField("comp_companyid");
                if (string.IsNullOrEmpty(compid))
                {
                    compid = Dispatch.EitherField("key1");
                }
                string     hMode     = Dispatch.EitherField("HiddenMode");
                EntryGroup IntiEntry = new EntryGroup("InvoiceTitleNewEntry");
                IntiEntry.Title = "发票抬头";
                int errflag = 0;
                AddTabHead("InvoiceTitle");
                if (hMode == "Save")
                {
                    Record IntiRec = new Record("InvoiceTitle");
                    IntiEntry.Fill(IntiRec);
                    if (IntiEntry.Validate() == true)
                    {
                        IntiRec.SetField("inti_companyid", compid);
                        IntiRec.SaveChanges();
                        Dispatch.Redirect(UrlDotNet(ThisDotNetDll, "RunInvoiceTitleList") + "&comp_companyid=" + compid + "&J=InvoiceTitle&T=Company");
                    }
                }
                if (errflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    IntiEntry.GetHtmlInEditMode();
                    VerticalPanel vp = new VerticalPanel();
                    vp.AddAttribute("width", "100%");
                    vp.Add(IntiEntry);
                    AddContent(vp);

                    string url = "javascript:document.EntryForm.HiddenMode.value='Save';";
                    AddSubmitButton("Save", "Save.gif", url);
                    AddUrlButton("Cancel", "cancel.gif", UrlDotNet(ThisDotNetDll, "RunInvoiceTitleList") + "&comp_companyid=" + compid + "&J=InvoiceTitle&T=Company");
                }
            }
            catch (Exception ex)
            {
                AddError(ex.Message + "IntiAddPage");
            }
        }
Example #30
0
        public override void BuildContents()
        {
            try
            {
                string maif_MarketInfoId = Dispatch.EitherField("maif_MarketInfoId");
                if (string.IsNullOrEmpty(maif_MarketInfoId))
                {
                    maif_MarketInfoId = Dispatch.EitherField("key58");
                }

                Record MarketInfo = FindRecord("MarketInfo", "maif_MarketInfoId=" + maif_MarketInfoId);

                EntryGroup screenMarketInfo = new EntryGroup("MarketInfoNewEntry");
                screenMarketInfo.Title = "MarketInfo";
                screenMarketInfo.Fill(MarketInfo);

                string status = MarketInfo.GetFieldAsString("maif_status");

                VerticalPanel vpMainPanel = new VerticalPanel();
                vpMainPanel.AddAttribute("width", "100%");
                vpMainPanel.Add(screenMarketInfo);

                List BrandRateGrid = new List("BrandRateGrid");
                BrandRateGrid.Filter                = "brra_deleted is null and brra_marketinfoid=" + maif_MarketInfoId;
                BrandRateGrid.RowsPerScreen         = 500;
                BrandRateGrid.ShowNavigationButtons = true;
                BrandRateGrid.PadBottom             = false;
                vpMainPanel.Add(BrandRateGrid);

                AddContent(vpMainPanel);
                // if (status.ToLower() == "draft")
                //{
                AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunDataPageEdit") + "&maif_MarketInfoId=" + maif_MarketInfoId);
                AddUrlButton("Delete", "Delete.gif", UrlDotNet(ThisDotNetDll, "RunDataPageDelete") + "&maif_MarketInfoId=" + maif_MarketInfoId);
                AddUrlButton("Add BrandRate", "new.gif", UrlDotNet(ThisDotNetDll, "RunBrandRateAdd") + "&maif_MarketInfoId=" + maif_MarketInfoId);
                // }

                AddUrlButton("Continue", "Continue.gif", UrlDotNet(ThisDotNetDll, "RunListPage"));
                //AddWorkflowButtons("MarketInfo");
            }
            catch (Exception error)
            {
                this.AddError(error.Message);
            }
        }
Example #31
0
        public override void BuildContents()
        {
            AddContent(HTML.Form());
            try
            {
                string     hMode                  = Dispatch.EitherField("HiddenMode");
                string     id                     = Dispatch.EitherField("spde_SalePlanDetailid");
                int        errorflag              = 0;
                string     errormessage           = string.Empty;
                Record     SalePlanDetail         = FindRecord("SalePlanDetail", "spde_SalePlanDetailid=" + id);
                string     spde_monthplanid       = SalePlanDetail.GetFieldAsString("spde_monthplanid");
                EntryGroup DecoratePersonNewEntry = new EntryGroup("SalePlanDetailNewEntry");
                DecoratePersonNewEntry.Fill(SalePlanDetail);

                AddTabHead("Delete SalePlanDetail");
                if (hMode == "Delete")
                {
                    SalePlanDetail.DeleteRecord = true;
                    SalePlanDetail.SaveChanges();
                    string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&mopl_MonthPlanId=" + spde_monthplanid + "&J=Summary";
                    url = url.Replace("Key37", "SalePlanDetailid");
                    url = url + "&Key37=" + spde_monthplanid;
                    Dispatch.Redirect(url);
                }
                if (errorflag != -1)
                {
                    AddContent(HTML.InputHidden("HiddenMode", ""));
                    VerticalPanel vpMainPanel = new VerticalPanel();
                    vpMainPanel.AddAttribute("width", "100%");
                    string sUrl = "javascript:document.EntryForm.HiddenMode.value='Delete';";
                    DecoratePersonNewEntry.GetHtmlInViewMode(SalePlanDetail);
                    vpMainPanel.Add(DecoratePersonNewEntry);
                    AddContent(vpMainPanel);
                    AddSubmitButton("ConfirmDelete", "Delete.gif", sUrl);
                    string url = UrlDotNet(ThisDotNetDll, "RunDataPage") + "&mopl_MonthPlanId=" + spde_monthplanid + "&J=Summary";
                    url = url.Replace("Key37", "SalePlanDetailid");
                    url = url + "&Key37=" + spde_monthplanid;
                    AddUrlButton("Cancel", "cancel.gif", url);
                }
            }
            catch (Exception e)
            {
                AddError(e.Message);
            }
        }
Example #32
0
        public WaveSubPanel(Simulator simulator, Vector2 size, double visualPriority, Color color)
            : base(simulator.Scene, Vector3.Zero, size, visualPriority, color)
        {
            OnlyShowWidgets = true;

            SideA = new VerticalPanel(simulator.Scene, new Vector3(), new Vector2(size.X / 2, size.Y), visualPriority, color)
            {
                OnlyShowWidgets = true,
                DistanceBetweenTwoChoices = 15
            };

            SideB = new VerticalPanel(simulator.Scene, new Vector3(), new Vector2(size.X / 2, size.Y), visualPriority, color)
            {
                OnlyShowWidgets = true,
                DistanceBetweenTwoChoices = 15
            };

            StartingTime = new NumericHorizontalSlider("Starting time", 0, 500, 0, 10, 50);
            Enemies = new EnemiesWidget(simulator.EnemiesFactory.All, (int) size.X / 2, 3);
            Level = new NumericHorizontalSlider("Level", 1, 100, 1, 1, 50);
            CashValue = new NumericHorizontalSlider("Cash", 0, 100, 0, 5, 100);
            QuantityWidget = new NumericHorizontalSlider("Quantity", 0, 500, 0, 5, 50);

            Distances = new ChoicesHorizontalSlider("Distance", WaveGenerator.DistancesStrings, 0);
            DelayWidget = new NumericHorizontalSlider("Delay", 0, 20, 0, 1, 100);
            ApplyDelayWidget = new NumericHorizontalSlider("Apply Delay", -1, 20, 0, 1, 100);
            SwitchEveryWidget = new NumericHorizontalSlider("Switch every", -1, 50, 5, 5, 100);

            SideA.AddWidget("StartingTime", StartingTime);
            SideA.AddWidget("Enemies", Enemies);
            SideA.AddWidget("Level", Level);
            SideA.AddWidget("CashValue", CashValue);
            
            SideB.AddWidget("Quantity", QuantityWidget);
            SideB.AddWidget("Distances", Distances);
            SideB.AddWidget("Delay", DelayWidget);
            SideB.AddWidget("ApplyDelay", ApplyDelayWidget);
            SideB.AddWidget("SwitchEvery", SwitchEveryWidget);

            AddWidget("SideA", SideA);
            AddWidget("SideB", SideB);
        }