コード例 #1
0
        private List <SystemObject.LookupValue> SortableListToLookupValueList(string[] vLookups)
        {
            List <SystemObject.LookupValue> lLV = new List <SystemObject.LookupValue>();

            for (int i = 0; i < vLookups.Length; i++)
            {
                string[] vCols = vLookups[i].Split(new string[] { "[COL]" }, StringSplitOptions.None);
                if (vCols.Length > 2)
                {
                    string sColName            = vCols[0];
                    string sColValue           = vCols[1];
                    string sUSGDID             = vCols[2];
                    string sUSGDValue          = vCols[3];
                    string sUSGDCaption        = vCols[4];
                    string sUSGDName           = vCols[5];
                    string sChecked            = vCols[6];
                    SystemObject.LookupValue v = new SystemObject.LookupValue();
                    v.Value   = sUSGDValue;
                    v.Caption = sUSGDCaption;
                    v.ID      = sUSGDID;
                    v.Name    = sUSGDName;

                    lLV.Add(v);
                }
            }
            return(lLV);
        }
コード例 #2
0
        public WebReply SettingsEdit()
        {
            double dBalance = 1;

            Sys.SetObjectValue("Settings Edit", "Balance", dBalance.ToString());
            Section SettingsEdit = new Section("Settings Edit", 2, Sys, this);
            Edit    geDefaultWithdrawalAddress = new Edit("Settings Edit", "DefaultWithdrawalAddress", Sys);

            geDefaultWithdrawalAddress.CaptionText  = "Default Receive Address:";
            geDefaultWithdrawalAddress.TextBoxStyle = "width:420px";
            SettingsEdit.AddControl(geDefaultWithdrawalAddress);
            SettingsEdit.AddBlank();
            Edit geBalance = new Edit("Settings Edit", "Balance", Sys);

            geBalance.CaptionText      = "Balance:";
            geBalance.Type             = Edit.GEType.Text;
            geBalance.TextBoxAttribute = "readonly";
            geBalance.TextBoxStyle     = clsStaticHelper.msReadOnly;
            SettingsEdit.AddControl(geBalance);
            SettingsEdit.AddBlank();
            // CPID

            Edit geCPID = new Edit("Settings Edit", "CPID", Sys);

            geCPID.CaptionText  = "CPID:";
            geCPID.TextBoxStyle = "width:420px";
            SettingsEdit.AddControl(geCPID);

            // Theme

            Edit ddTheme = new Edit("Settings Edit", "Theme", Sys);

            ddTheme.Type         = Edit.GEType.Lookup;
            ddTheme.CaptionText  = "Theme:";
            ddTheme.LookupValues = new List <SystemObject.LookupValue>();
            SystemObject.LookupValue i1 = new SystemObject.LookupValue();
            i1.ID      = "Biblepay";
            i1.Value   = "Biblepay";
            i1.Caption = "Biblepay";
            ddTheme.LookupValues.Add(i1);

            SystemObject.LookupValue i2 = new SystemObject.LookupValue();
            i2.ID      = "Dark";
            i2.Value   = "Dark";
            i2.Caption = "Dark";
            ddTheme.LookupValues.Add(i2);
            SettingsEdit.AddBlank();
            SettingsEdit.AddControl(ddTheme);
            SettingsEdit.AddBlank();
            Edit geBtnSave = new Edit("Settings Edit", Edit.GEType.Button, "btnSettingsSave", "Save", Sys);

            SettingsEdit.AddControl(geBtnSave);
            SettingsEdit.AddBlank();
            return(SettingsEdit.Render(this, true));
        }
コード例 #3
0
        public WebReply Phase3()
        {
            Section s = new Section("Phase3", 3, Sys, this);

            if (Sys.GetObjectValue("Phase3", "ConditionCount") == "")
            {
                Sys.SetObjectValue("Phase3", "ConditionCount", "1");
            }

            int iConditionCount = Convert.ToInt32(Sys.GetObjectValue("Phase3", "ConditionCount"));

            for (int x = 0; x < iConditionCount; x++)
            {
                GodEdit ddFields = new GodEdit("Phase3", "Fields" + x.ToString(), Sys);
                ddFields.Type         = GodEdit.GEType.Lookup;
                ddFields.CaptionText  = "Field:";
                ddFields.LookupValues = ddFields.ConvertStringToLookupList("Address;City;State;Zip;Phone");
                s.AddControl(ddFields);
                string sValueOfFieldsControl = Sys.GetObjectValue("Phase3", "Fields" + x.ToString());

                GodEdit ddConditions = new GodEdit("Phase3", "Conditions" + x.ToString(), Sys);
                ddConditions.Type        = GodEdit.GEType.Lookup;
                ddConditions.CaptionText = "Conditions:";


                ddConditions.LookupValues = new List <SystemObject.LookupValue>();


                SystemObject.LookupValue i1 = new SystemObject.LookupValue();
                i1.ID      = "Underlying ID";
                i1.Value   = "DisplayValue";
                i1.Caption = "Caption";
                string sValueOfLookup = Sys.GetObjectValue("Phase3", "Conditions" + x.ToString());
                ddConditions.LookupValues.Add(i1);

                SystemObject.LookupValue i2 = new SystemObject.LookupValue();
                i2.ID      = "Underlying ID2";
                i2.Value   = "DisplayValueTwo";
                i2.Caption = "CaptionTwo";
                ddConditions.LookupValues.Add(i2);
                s.AddControl(ddConditions);
                GodEdit txtValue = new GodEdit("Phase3", "SelectedValue" + x.ToString(), Sys);
                txtValue.Type        = GodEdit.GEType.Text;
                txtValue.CaptionText = "Selected Value:";
                string sValueOfSelected = Sys.GetObjectValue("Phase3", "SelectedValue" + x.ToString());
                s.AddControl(txtValue);
            }
            s.AddButton("btnAddCondition", "Add Condition");
            WebReply wr1 = s.Render(this, true);

            return(wr1);
        }
コード例 #4
0
        public List <SystemObject.LookupValue> ConvertStringToLookupList(string SemicolonDelimited)
        {
            string[] vRows = SemicolonDelimited.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            List <SystemObject.LookupValue> listLV = new List <SystemObject.LookupValue>();

            for (int i = 0; i < vRows.Length; i++)
            {
                // Add the string entry to the List
                SystemObject.LookupValue lv = new SystemObject.LookupValue();
                lv.ID      = Guid.NewGuid().ToString();
                lv.Caption = vRows[i];
                lv.Value   = vRows[i];
                listLV.Add(lv);
            }
            return(listLV);
        }