Esempio n. 1
0
        /// <summary>
        /// Read in a config file
        /// </summary>
        /// <param name="directory">file directory</param>
        /// <param name="fileName">file name</param>
        public void Read(string directory, string fileName)
        {
            string fileLocation = Path.Combine(directory, fileName);

            string[]           fileContent   = File.ReadAllLines(fileLocation);
            List <OptionValue> _optionValues = new List <OptionValue>();

            string[]    optionValuePair;
            OptionValue optionValue;

            _options  = new Dictionary <string, List <OptionValue> >();
            _sections = new List <string>();

            foreach (string line in fileContent)
            {
                if (line.Contains("="))
                {
                    string lineSection = line.Split('=')[0].Trim();
                    _sections.Add(lineSection);

                    string lineContent = line.Split('=')[1];
                    lineContent = lineContent.Trim();
                    foreach (string options in lineContent.Split(' '))
                    {
                        optionValuePair = options.Split('|');
                        optionValue     = new OptionValue(optionValuePair[0].Trim(), optionValuePair[1].Trim());
                        _optionValues.Add(optionValue);
                    }
                    _options.Add(lineSection, _optionValues);
                    _optionValues = new List <OptionValue>();
                }
            }
        }
        private void SetupAudioPreview(OptionValue o)
        {
            if (!string.IsNullOrWhiteSpace(o.PreviewAudio))
            {
                PreviewButtonVisibility = Visibility.Visible;
            }
            else
            {
                PreviewButtonVisibility = Visibility.Hidden;
            }

            StopAudio();

            _audioFileName = null;
            _audioPath     = null;
            _audioFile     = null;

            if (!string.IsNullOrWhiteSpace(o.PreviewAudio))
            {
                _audioFileName = Path.GetFileName(o.PreviewAudio);

                if (_iroPath.EndsWith(".iro"))
                {
                    string mod = _iroPath;
                    _audioPath = ExtractAudioFileFromIro(mod, o.PreviewAudio);
                }
                else
                {
                    _audioFile = _audioReader(o.PreviewAudio);
                }
            }
        }
Esempio n. 3
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        try
        {
            _Site.SiteOptions["Opt_ISP_HostName"]      = new OptionValue(tb1.Text);
            _Site.SiteOptions["Opt_ISP_HostPort"]      = new OptionValue(tb2.Text);
            _Site.SiteOptions["Opt_ISP_UserID"]        = new OptionValue(tb3.Text);
            _Site.SiteOptions["Opt_ISP_UserPassword"]  = new OptionValue(tb4.Text);
            _Site.SiteOptions["Opt_ISP_RegCode"]       = new OptionValue(tb5.Text);
            _Site.SiteOptions["Opt_ISP_ServiceNumber"] = new OptionValue(tb6.Text);

            SystemOptions so = new SystemOptions();
            so["Betting_SMS_UserID"]       = new OptionValue(tb3.Text);
            so["Betting_SMS_UserPassword"] = new OptionValue(tb4.Text);
            so["Betting_SMS_RegCode"]      = new OptionValue(tb5.Text);
        }
        catch (Exception exception)
        {
            Shove._Web.JavaScript.Alert(this.Page, exception.Message);

            return;
        }

        Shove._Web.JavaScript.Alert(this.Page, "设置成功。");
    }
Esempio n. 4
0
        public override void Initialize()
        {
            Schedule localAccrualSchedule = new Schedule();

            localAccrualSchedule.ScheduleType          = "AccrualSchedule";
            localAccrualSchedule.BusinessDayCalculator = Account.BusinessDayCalculator;
            SetAccrualScheduleCalculatedProperties(localAccrualSchedule);
            Account.Schedules.Add(localAccrualSchedule);

            Schedule localInterestSchedule = new Schedule();

            localInterestSchedule.ScheduleType          = "InterestSchedule";
            localInterestSchedule.BusinessDayCalculator = Account.BusinessDayCalculator;
            SetInterestScheduleDefaultProperties(localInterestSchedule);
            Account.Schedules.Add(localInterestSchedule);

            Schedule localRedemptionSchedule = new Schedule();

            localRedemptionSchedule.ScheduleType          = "RedemptionSchedule";
            localRedemptionSchedule.BusinessDayCalculator = Account.BusinessDayCalculator;
            SetRedemptionScheduleDefaultProperties(localRedemptionSchedule);
            Account.Schedules.Add(localRedemptionSchedule);

            OptionValue localAccrualOption = new OptionValue();

            localAccrualOption.OptionType   = "AccrualOption";
            localAccrualOption.OptionValues = TransactRules.Calculations.AccrualCalculation.AccrualOptions();
            Account.Options.Add(localAccrualOption);

            RateValue localInterestRate = new RateValue();

            localInterestRate.RateType = "InterestRate";
            Account.Rates.Add(localInterestRate);
        }
Esempio n. 5
0
    public void UpdateUIControl()
    {
        OptionValue value = Game.m_options.Get(GetCurrentKey());

        if (m_control)
        {
            if (m_control is Slider)
            {
                ((Slider)m_control).value = value.GetFloat();
            }
            else if (m_control is AdaptativeSliderText)
            {
                ((AdaptativeSliderText)m_control).m_value = value.GetInt();
            }
            else if (m_control is TextualSliderText)
            {
                ((TextualSliderText)m_control).m_value = value.GetInt();
            }
            else if (m_control is Toggle)
            {
                ((Toggle)m_control).isOn = value.GetBool();
            }
            else if (m_control is CursorSelector)
            {
                ((CursorSelector)m_control).Load();
            }
        }
    }
Esempio n. 6
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        //恒朋江西电子票参数
        so["ElectronTicket_HPJX_Getway"]       = new OptionValue(tb1.Text);
        so["ElectronTicket_HPJX_UserName"]     = new OptionValue(tb2.Text);
        so["ElectronTicket_HPJX_UserPassword"] = new OptionValue(tb3.Text);
        so["ElectronTicket_HPJX_Status_ON"]    = new OptionValue(cb1.Checked);

        //恒朋上海电子票参数
        so["ElectronTicket_HPSH_Getway"]       = new OptionValue(tb_HPSH_Getway.Text);
        so["ElectronTicket_HPSH_UserName"]     = new OptionValue(tb_AgentID.Text);
        so["ElectronTicket_HPSH_UserPassword"] = new OptionValue(tb_AgentPwd.Text);
        so["ElectronTicket_HPSH_Status_ON"]    = new OptionValue(cb_HPSH.Checked);

        //恒朋山东电子票参数
        so["ElectronTicket_HPSD_Getway"]       = new OptionValue(tb_HPSD_Getway.Text);
        so["ElectronTicket_HPSD_UserName"]     = new OptionValue(tb_HPSD_AgentID.Text);
        so["ElectronTicket_HPSD_UserPassword"] = new OptionValue(tb_HPSD_AgentPwd.Text);
        so["ElectronTicket_HPSD_Status_ON"]    = new OptionValue(cb_HPSD.Checked);

        for (int i = 0; i < g.Rows.Count; i++)
        {
            DropDownList ddlElectronTicket = (DropDownList)g.Rows[i].Cells[1].FindControl("ddlElectronTicket");

            MSSQL.ExecuteNonQuery("update T_Lotteries set PrintOutType = " + ddlElectronTicket.SelectedValue + " where [ID] = " + g.Rows[i].Cells[2].Text);
        }

        tb3.Attributes.Add("value", tb3.Text);

        Shove._Web.JavaScript.Alert(this.Page, "站点资料已经保存成功。");
    }
        public async Task <IActionResult> GetCategorySubByCategory([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var categorySub = await _context.CategorySubs.Where(m => m.CategoryID == id).ToListAsync();

            if (categorySub == null)
            {
                return(NotFound());
            }
            List <OptionValue> vms = new List <OptionValue>();

            foreach (var item in categorySub)
            {
                var vm = new OptionValue {
                    Key = item.ID, Value = item.Name
                };
                vms.Add(vm);
            }

            return(Ok(vms));
        }
Esempio n. 8
0
        public ActionResult AddValue(int id, FormCollection formValues, HttpPostedFileBase file)
        {
            OptionValue ov = new OptionValue();

            if (TryUpdateModel(ov))
            {
                //TODO
                if (file != null && file.ContentLength > 0)
                {
                    string image    = "~/Uploads/option" + ov.Name + DateTime.Now.ToString("yyyyMMddHHmmssfff") + Path.GetExtension(file.FileName);
                    string filePath = Server.MapPath(image);
                    file.SaveAs(filePath);
                    ov.Image = image;
                }
                else
                {
                    ov.Image = "~/Uploads/Default.jpg";
                }

                unitOfWork.optionRepository.Get(id).Values.Add(ov);
                unitOfWork.Save();

                return(RedirectToAction("Edit", new { id = ov.OptionId }));
            }
            return(View(ov));
        }
Esempio n. 9
0
 internal static void WriteOptionValueError(
     string value,
     OptionValue optionValue,
     OptionValueProvider?provider = null)
 {
     WriteOptionValueError(value, optionValue, OptionValueProviders.GetHelpText(provider, multiline: true));
 }
Esempio n. 10
0
        public ActionResult AddValue(int id)
        {
            OptionValue ov = new OptionValue();

            ov.OptionId = id;
            return(View(ov));
        }
Esempio n. 11
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        so["ElectronTicket_Getway"]             = new OptionValue(tb1.Text);
        so["ElectronTicket_Agent_UserNumber"]   = new OptionValue(tb2.Text);
        so["ElectronTicket_Agent_Key"]          = new OptionValue(tb3.Text);
        so["ElectronTicket_Agent_UserName"]     = new OptionValue(tb4.Text);
        so["ElectronTicket_Agent_UserPassword"] = new OptionValue(tb5.Text);
        so["ElectronTicket_Agent_PostPassword"] = new OptionValue(tb6.Text);

        so["ElectronTicketbase_TC_Getway"]           = new OptionValue(tbTC1.Text);
        so["ElectronTicketbase_TC_Agent_UserNumber"] = new OptionValue(tbTC2.Text);
        so["ElectronTicketbase_TC_Agent_Key"]        = new OptionValue(tbTC3.Text);

        so["ElectronTicketbase_FC_Getway"]           = new OptionValue(tbFC1.Text);
        so["ElectronTicketbase_FC_Agent_UserNumber"] = new OptionValue(tbFC2.Text);
        so["ElectronTicketbase_FC_Agent_Key"]        = new OptionValue(tbFC3.Text);

        so["ElectronTicketbase_JC_Getway"]           = new OptionValue(tbJC1.Text);
        so["ElectronTicketbase_JC_Agent_UserNumber"] = new OptionValue(tbJC2.Text);
        so["ElectronTicketbase_JC_Agent_Key"]        = new OptionValue(tbJC3.Text);

        for (int i = 0; i < g.Rows.Count; i++)
        {
            DropDownList ddlElectronTicket = (DropDownList)g.Rows[i].Cells[1].FindControl("ddlElectronTicket");

            MSSQL.ExecuteNonQuery("update T_Lotteries set PrintOutType = " + ddlElectronTicket.SelectedValue + " where [ID] = " + g.Rows[i].Cells[2].Text);
        }

        tb3.Attributes.Add("value", tb3.Text);

        Shove._Web.JavaScript.Alert(this.Page, "站点资料已经保存成功。");
    }
Esempio n. 12
0
 private string StoreValueFromPropertyToOptionSource(OptionValue <OptionsViewModel> option)
 {
     // Likewise, in your actual code you wouldn't even return
     // anything here, and the code would actually store the value
     // to some appropriate location.
     return(option.GetValue().ToString());
 }
Esempio n. 13
0
        /// <summary>
        /// Set option value.
        /// </summary>
        /// <param name="value">Value to be set.</param>
        internal void SetOption(OptionValue value)
        {
            var optionName  = value.Name;
            var sectionName = optionName.Section;

            _sections[sectionName].SetOption(optionName, value.ConvertedValue);
        }
    protected void btnOK_Click(object sender, EventArgs e)
    {
        SystemOptions options = new SystemOptions();

        try
        {
            options["OnlinePay_Alipay_UserName"]   = new OptionValue(this.tbAlipayName.Text);
            options["OnlinePay_Alipay_UserNumber"] = new OptionValue(this.tbAlipayNumber.Text);
            options["OnlinePay_Alipay_MD5Key"]     = new OptionValue(this.tbAlipayKey.Text);
            options["OnlinePay_Alipay_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbAlipayPayFormalitiesFeesScale.Text, 0.0));
            options["OnlinePayOut_Alipay_MD5Key"] = new OptionValue(this.tbAlipayOutKey.Text);
            options["OnlinePayOut_Alipay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbAlipayDistillFormalitiesFeesScale.Text, 0.0));
            options["OnlinePay_Alipay_Status_ON"] = new OptionValue(this.cbAlipayON.Checked);
            options["OnlinePay_Alipay_ForUserDistill_UserName"]         = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_UserName.Text);
            options["OnlinePay_Alipay_ForUserDistill_UserNumber"]       = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_UserNumber.Text);
            options["OnlinePay_Alipay_ForUserDistill_MD5Key"]           = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_MD5Key.Text);
            options["OnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut"] = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut.Text);
            options["OnlinePay_Alipay_ForUserDistill_Status_ON"]        = new OptionValue(this.cbOnlinePay_Alipay_ForUserDistill_Status_ON.Checked);
            options["OnlinePay_99Bill_UserName"]   = new OptionValue(this.tb99BillName.Text);
            options["OnlinePay_99Bill_UserNumber"] = new OptionValue(this.tb99BillNumber.Text);
            options["OnlinePay_99Bill_MD5Key"]     = new OptionValue(this.tb99BillKey.Text);
            options["OnlinePay_99Bill_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tb99BillPayFormalitiesFeesScale.Text, 0.0));
            options["OnlinePayOut_99Bill_MD5Key"]   = new OptionValue(this.tb99BillOutKey.Text);
            options["OnlinePay_99Bill_QueryMD5Key"] = new OptionValue(this.tb99BillQueryKey.Text);
            options["OnlinePayOut_99Bill_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tb99BillDistillFormalitiesFeesScale.Text, 0.0));
            options["OnlinePay_99Bill_Status_ON"]  = new OptionValue(this.cb99BillON.Checked);
            options["OnlinePay_Tenpay_UserName"]   = new OptionValue(this.tbTenpayName.Text);
            options["OnlinePay_Tenpay_UserNumber"] = new OptionValue(this.tbTenpayNumber.Text);
            options["OnlinePay_Tenpay_MD5Key"]     = new OptionValue(this.tbTenpayKey.Text);
            options["OnlinePay_Tenpay_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbTenpayPayFormalitiesFeesScale.Text, 0.0));
            options["OnlinePayOut_Tenpay_MD5Key"] = new OptionValue(this.tbTenpayOutKey.Text);
            options["OnlinePayOut_Tenpay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbTenpayDistillFormalitiesFeesScale.Text, 0.0));
            options["OnlinePay_Tenpay_Status_ON"]     = new OptionValue(this.cbTenpayON.Checked);
            options["OnlinePay_CBPayMent_UserName"]   = new OptionValue(this.tbCBPayMentName.Text);
            options["OnlinePay_CBPayMent_UserNumber"] = new OptionValue(this.tbCBPayMentNumber.Text);
            options["OnlinePay_CBPayMent_MD5Key"]     = new OptionValue(this.tbCBPayMentKey.Text);
            options["OnlinePay_CBPayMent_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbCBPayMentPayFormalitiesFeesScale.Text, 0.0));
            options["OnlinePayOut_CBPayMent_MD5Key"] = new OptionValue(this.tbCBPayMentOutKey.Text);
            options["OnlinePayOut_CBPayMent_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbCBPayMentDistillFormalitiesFeesScale.Text, 0.0));
            options["OnlinePay_CBPayMent_Status_ON"]                   = new OptionValue(this.cbCBPayMentON.Checked);
            options["OnlinePay_YeePay_UserName"]                       = new OptionValue(this.tbYeePayName.Text);
            options["OnlinePay_YeePay_UserNumber"]                     = new OptionValue(this.tbYeePayNumber.Text);
            options["OnlinePay_YeePay_MD5Key"]                         = new OptionValue(this.tbYeePayKey.Text);
            options["OnlinePay_YeePayy_PayFormalitiesFeesScale"]       = new OptionValue(_Convert.StrToDouble(this.tbYeePayFormalitiesFeesScale.Text, 0.0));
            options["OnlinePayOut_YeePay_MD5Key"]                      = new OptionValue(this.tbYeePayOutKey.Text);
            options["OnlinePayOut_YeePay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbYeePayDistillFormalitiesFeesScale.Text, 0.0));
            options["OnlinePay_YeePay_Status_ON"]                      = new OptionValue(this.cbYeePayON.Checked);
            options["OnlinePay_007Ka_FormalitiesFees"]                 = new OptionValue(this.tb007Ka_FormalitiesFees.Text);
            options["OnlinePay_007Ka_MerAccount"]                      = new OptionValue(this.tb007Ka_MerAccount.Text);
            options["OnlinePay_007Ka_MerchantId"]                      = new OptionValue(this.tb007Ka_MerchantId.Text);
            options["OnlinePay_007Ka_Status_ON"]                       = new OptionValue(this.cb007KaON.Checked);
        }
        catch (Exception exception)
        {
            PF.GoError(1, exception.Message, "Admin_OnlinePayGateway");
            return;
        }
        JavaScript.Alert(this.Page, "设置保存成功。");
    }
Esempio n. 15
0
 public platform(Architecture a, Mode m, OptionValue x, byte[] c, string s)
 {
     arch    = a;
     mode    = m;
     syntax  = x;
     code    = c;
     comment = s;
 }
Esempio n. 16
0
 static string GetValue(OptionValue value)
 {
     return(value switch
     {
         SimpleOptionValue enumOptionValue => enumOptionValue.Value,
         KeyValuePairOptionValue keyOptionValue => $"{keyOptionValue.Key}={keyOptionValue.Value}",
         _ => throw new InvalidOperationException(),
     });
Esempio n. 17
0
 public OptionsViewModel()
 {
     Options = new OptionValue <OptionsViewModel>[]
     {
         OptionValue <OptionsViewModel> .Create(this, 0, OptionSource.SysParameter, "SingleSelection"),
         OptionValue <OptionsViewModel> .Create(this, 0.002, OptionSource.ConfigFileProperty, "Tolerance"),
     };
 }
Esempio n. 18
0
 /// <summary>
 /// Sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization
 /// </summary>
 public static Task <Ok> SetOptionAsync(
     this Client client, string name = default, OptionValue value = default)
 {
     return(client.ExecuteAsync(new SetOption
     {
         Name = name, Value = value
     }));
 }
Esempio n. 19
0
 public Option(string prototype, string description, Action <string> action)
 {
     this.prototype   = prototype;
     this.prototypes  = prototype.Split('|');
     this.description = description;
     this.action      = action;
     this.type        = GetOptionValue();
 }
Esempio n. 20
0
        public override void ExecuteCRMWorkFlowActivity(CodeActivityContext executionContext, LocalWorkflowContext crmWorkflowContext)
        {
            crmWorkflowContext.Trace("Started: Defra.CustMaster.Identity.WfActivities.EnrolmentStatusType");

            TypeValue.Set(executionContext, new OptionSetValue(OptionValue.Get(executionContext)));

            crmWorkflowContext.Trace("Finished: Defra.CustMaster.Identity.WfActivities.EnrolmentStatusType");
        }
 protected void btnOK_Click(object sender, EventArgs e)
 {
     SystemOptions options = new SystemOptions();
     try
     {
         options["OnlinePay_Alipay_UserName"] = new OptionValue(this.tbAlipayName.Text);
         options["OnlinePay_Alipay_UserNumber"] = new OptionValue(this.tbAlipayNumber.Text);
         options["OnlinePay_Alipay_MD5Key"] = new OptionValue(this.tbAlipayKey.Text);
         options["OnlinePay_Alipay_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbAlipayPayFormalitiesFeesScale.Text, 0.0));
         options["OnlinePayOut_Alipay_MD5Key"] = new OptionValue(this.tbAlipayOutKey.Text);
         options["OnlinePayOut_Alipay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbAlipayDistillFormalitiesFeesScale.Text, 0.0));
         options["OnlinePay_Alipay_Status_ON"] = new OptionValue(this.cbAlipayON.Checked);
         options["OnlinePay_Alipay_ForUserDistill_UserName"] = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_UserName.Text);
         options["OnlinePay_Alipay_ForUserDistill_UserNumber"] = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_UserNumber.Text);
         options["OnlinePay_Alipay_ForUserDistill_MD5Key"] = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_MD5Key.Text);
         options["OnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut"] = new OptionValue(this.tbOnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut.Text);
         options["OnlinePay_Alipay_ForUserDistill_Status_ON"] = new OptionValue(this.cbOnlinePay_Alipay_ForUserDistill_Status_ON.Checked);
         options["OnlinePay_99Bill_UserName"] = new OptionValue(this.tb99BillName.Text);
         options["OnlinePay_99Bill_UserNumber"] = new OptionValue(this.tb99BillNumber.Text);
         options["OnlinePay_99Bill_MD5Key"] = new OptionValue(this.tb99BillKey.Text);
         options["OnlinePay_99Bill_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tb99BillPayFormalitiesFeesScale.Text, 0.0));
         options["OnlinePayOut_99Bill_MD5Key"] = new OptionValue(this.tb99BillOutKey.Text);
         options["OnlinePay_99Bill_QueryMD5Key"] = new OptionValue(this.tb99BillQueryKey.Text);
         options["OnlinePayOut_99Bill_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tb99BillDistillFormalitiesFeesScale.Text, 0.0));
         options["OnlinePay_99Bill_Status_ON"] = new OptionValue(this.cb99BillON.Checked);
         options["OnlinePay_Tenpay_UserName"] = new OptionValue(this.tbTenpayName.Text);
         options["OnlinePay_Tenpay_UserNumber"] = new OptionValue(this.tbTenpayNumber.Text);
         options["OnlinePay_Tenpay_MD5Key"] = new OptionValue(this.tbTenpayKey.Text);
         options["OnlinePay_Tenpay_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbTenpayPayFormalitiesFeesScale.Text, 0.0));
         options["OnlinePayOut_Tenpay_MD5Key"] = new OptionValue(this.tbTenpayOutKey.Text);
         options["OnlinePayOut_Tenpay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbTenpayDistillFormalitiesFeesScale.Text, 0.0));
         options["OnlinePay_Tenpay_Status_ON"] = new OptionValue(this.cbTenpayON.Checked);
         options["OnlinePay_CBPayMent_UserName"] = new OptionValue(this.tbCBPayMentName.Text);
         options["OnlinePay_CBPayMent_UserNumber"] = new OptionValue(this.tbCBPayMentNumber.Text);
         options["OnlinePay_CBPayMent_MD5Key"] = new OptionValue(this.tbCBPayMentKey.Text);
         options["OnlinePay_CBPayMent_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbCBPayMentPayFormalitiesFeesScale.Text, 0.0));
         options["OnlinePayOut_CBPayMent_MD5Key"] = new OptionValue(this.tbCBPayMentOutKey.Text);
         options["OnlinePayOut_CBPayMent_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbCBPayMentDistillFormalitiesFeesScale.Text, 0.0));
         options["OnlinePay_CBPayMent_Status_ON"] = new OptionValue(this.cbCBPayMentON.Checked);
         options["OnlinePay_YeePay_UserName"] = new OptionValue(this.tbYeePayName.Text);
         options["OnlinePay_YeePay_UserNumber"] = new OptionValue(this.tbYeePayNumber.Text);
         options["OnlinePay_YeePay_MD5Key"] = new OptionValue(this.tbYeePayKey.Text);
         options["OnlinePay_YeePayy_PayFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbYeePayFormalitiesFeesScale.Text, 0.0));
         options["OnlinePayOut_YeePay_MD5Key"] = new OptionValue(this.tbYeePayOutKey.Text);
         options["OnlinePayOut_YeePay_DistillFormalitiesFeesScale"] = new OptionValue(_Convert.StrToDouble(this.tbYeePayDistillFormalitiesFeesScale.Text, 0.0));
         options["OnlinePay_YeePay_Status_ON"] = new OptionValue(this.cbYeePayON.Checked);
         options["OnlinePay_007Ka_FormalitiesFees"] = new OptionValue(this.tb007Ka_FormalitiesFees.Text);
         options["OnlinePay_007Ka_MerAccount"] = new OptionValue(this.tb007Ka_MerAccount.Text);
         options["OnlinePay_007Ka_MerchantId"] = new OptionValue(this.tb007Ka_MerchantId.Text);
         options["OnlinePay_007Ka_Status_ON"] = new OptionValue(this.cb007KaON.Checked);
     }
     catch (Exception exception)
     {
         PF.GoError(1, exception.Message, "Admin_OnlinePayGateway");
         return;
     }
     JavaScript.Alert(this.Page, "设置保存成功。");
 }
Esempio n. 22
0
    public OptionValue LoadOptionInt(string p_key, int p_default)
    {
        OptionValue val = new OptionValue(p_key, "int");

        val.Load(p_default);
        m_options.Add(val);

        return(val);
    }
Esempio n. 23
0
    public OptionValue LoadOption(string p_key, string p_dataType)
    {
        OptionValue val = new OptionValue(p_key, p_dataType);

        val.Load();
        m_options.Add(val);

        return(val);
    }
Esempio n. 24
0
    public OptionValue LoadOptionFloat(string p_key, float p_default)
    {
        OptionValue val = new OptionValue(p_key, "float");

        val.Load(p_default);
        m_options.Add(val);

        return(val);
    }
Esempio n. 25
0
    public OptionValue LoadOptionBool(string p_key, bool p_default)
    {
        OptionValue val = new OptionValue(p_key, "bool");

        val.Load(p_default);
        m_options.Add(val);

        return(val);
    }
Esempio n. 26
0
    public OptionValue LoadOptionString(string p_key, string p_default)
    {
        OptionValue val = new OptionValue(p_key, "string");

        val.Load(p_default);
        m_options.Add(val);

        return(val);
    }
Esempio n. 27
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            string filteringKey;
            string filteringValue;
            Func <OptionMetadata, bool> predicateFunction;

            if (ParameterSetName == findByValue)
            {
                filteringKey      = "value";
                filteringValue    = OptionValue.ToString();
                predicateFunction = x => x.Value == OptionValue;
            }
            else
            {
                filteringKey      = "label";
                filteringValue    = OptionLabel;
                predicateFunction = x => x.Label.UserLocalizedLabel?.Label == OptionLabel;
            }

            WriteVerbose($"Trying to remove picklist option on {EntityName}.{AttributeName} with {filteringKey} = {filteringValue}");

            var picklistMetadata = GetPicklistMetadata(EntityName, AttributeName);

            if (picklistMetadata == null)
            {
                return;
            }

            var optionMetadata = picklistMetadata.OptionSet.Options.FirstOrDefault(predicateFunction);

            if (optionMetadata == null)
            {
                WriteVerbose($"Couldn't find option with {filteringKey} = {filteringValue}");
                return;
            }
            WriteVerbose($"Found option: {optionMetadata.Label.UserLocalizedLabel?.Label} / {optionMetadata.Value}");

            string publishXml;

            if (picklistMetadata.OptionSet.IsGlobal == true)
            {
                WriteVerbose($"Removing value from global optionset: {picklistMetadata.OptionSet.Name}");
                OrganizationService.DeleteOptionValue(picklistMetadata.OptionSet.Name, optionMetadata.Value.Value);
                publishXml = $"<optionsets><optionset>{picklistMetadata.OptionSet.Name}</optionset></optionsets>";
            }
            else
            {
                WriteVerbose($"Removing value from local optionset: {EntityName}.{AttributeName}");
                OrganizationService.DeleteOptionValue(EntityName, AttributeName, optionMetadata.Value.Value);
                publishXml = $"<entities><entity>{EntityName}</entity></entities>";
            }
            WriteVerbose($"Publishing changes..");
            OrganizationService.PublishXml(publishXml);
            WriteVerbose($"Option removed.");
        }
Esempio n. 28
0
    public void AddListener(string option, Action <int> listener)
    {
        var optionConverted = CRC32.GetHashForAnsi(option);

        OptionValue Value = null;

        if (optionValues.TryGetValue(optionConverted, out Value))
        {
            optionValues[optionConverted].onChange += listener;
        }
    }
Esempio n. 29
0
    public void RemoveListener(string option, Action <string> listener)
    {
        var optionConverted = CRC32.GetHashForAnsi(option);

        OptionValue Value = null;

        if (optionValues_string.TryGetValue(optionConverted, out Value))
        {
            optionValues_string[optionConverted].onChange_string -= listener;
        }
    }
Esempio n. 30
0
        public void SetSyntax(OptionValue opt)
        {
            if ((opt == OptionValue.SyntaxATT) || (opt == OptionValue.SyntaxIntel))
            {
                this._status = NativeMethods.cs_option(this._handle, OptionType.Syntax, opt);
            }

            if (this._status != ErrorCode.Ok)
            {
                throw new CapstoneException(this._status);
            }
        }
Esempio n. 31
0
        CheckState GetState(OptionValue value)
        {
            switch (value)
            {
            case OptionValue.Auto:
                return(CheckState.Indeterminate);

            case OptionValue.Yes:
                return(CheckState.Checked);
            }

            return(CheckState.Unchecked);
        }
Esempio n. 32
0
 protected void btnOK_Click(object sender, EventArgs e)
 {
     try
     {
         SystemOptions options = new SystemOptions();
         options["SerialNumberForShoveSoft_MHB"] = new OptionValue(this.tbKeyOK.Text);
     }
     catch (Exception exception)
     {
         PF.GoError(1, exception.Message, "Admin_SoftKey.aspx");
         return;
     }
     JavaScript.Alert(this.Page, "注册成功。");
 }
Esempio n. 33
0
        /*  ALIAS
            GNU Options
                -d=DIR, --dir=DIR
                    Install the script into directory DIR, rather than
                    searching for a suitable directory in $PATH.
                -m, --manpage
                    Display the manpage for the alias script given as the
                    single argument. The alias can be an absolute pathname, or
                    the name of a script in $PATH. If the argument isn't an
                    alias script, or if multiple arguments are given, then all
                    arguments are passed to the system 'man' command. This
                    allows you to alias your man command like this:
                    alias man='0alias --manpage'
                -r, --resolve
                    Print the interface URI for the given alias script to stdout

            GNU Standard Options
                -h, --help
                    Show the built-in help text.
                -V, --version
                    Display version information.
        */
        static void Main(string[] args)
        {
            // Set parser
            OptionParser parser = new OptionParser();
            parser.ProgramInfo.Name = "Alias";
            parser.ProgramInfo.Version = "1.3.2.1";

            // Add reqired option, which has reqired parameter
            OptionValue<string> dir = new OptionValue<string>();
            parser.AddOption(
                new Option(new string[] { "-d", "--dir" },
                    "Install the script into directory DIR, rather than searching for a suitable directory in $PATH.",
                    new StoreAction<string>(dir)
                ) { Required = true, ParametersRequired = true}
            );

            // Add option, which has not any parameter
            OptionValue<bool> manpage = new OptionValue<bool>(false);
            parser.AddOption(
                new Option(new string[] { "-m", "--manpage" },
                    "Display the manpage for the alias script given as the single argument.",
                    new StoreConstAction<bool>(manpage, true)
                ) { ParametersCount = 0 }
            );

            // Add option, which has not any parameter
            OptionValue<bool> resolve = new OptionValue<bool>(false);
            parser.AddOption(
                new Option(new string[] { "-r", "--resolve" },
                    "Print the interface URI for the given alias script to stdout.",
                    new StoreConstAction<bool>(resolve, true)
                ) { ParametersCount = 0 }
            );

            try
            {
                // Run options parser (for example with args: --dir ./rootdir/nextdir/ -r)
                IList<string> remainingArgs = parser.ParseArguments(args);
                Console.WriteLine("dir: {0}", dir.Value);
                Console.WriteLine("manpage: {0}", manpage.Value);
                Console.WriteLine("resolve: {0}", resolve.Value);
            }
            catch (ParseException exception)
            {
                // User control the exception
                System.Console.WriteLine("exception: " + exception.Message);
            }
        }
Esempio n. 34
0
 public OptionValue this[string s]
 {
     get
     {
         OptionValue r;
         if (Option.TryGetValue(s, out r))
             return r;
         else r = new OptionValue { Set = false };
         Option[s] = r;
         return r;
     }
     set
     {
         Option[s] = value;
     }
 }
Esempio n. 35
0
            public static OptionValue InterpretString(string s)
            {
                OptionValue r = new OptionValue();

                r.String = s;
                string s2 = s;
                System.Globalization.NumberStyles ns = System.Globalization.NumberStyles.Any;
                if(s.StartsWith("0x"))
                {
                    s2 = s.Substring(2);
                    ns = System.Globalization.NumberStyles.HexNumber;
                }
                uint.TryParse(s2, ns, CultureInfo.InvariantCulture, out r.UInt);
                int.TryParse(s2, ns, CultureInfo.InvariantCulture, out r.Int);
                bool.TryParse(s2, out r.Bool);
                ulong.TryParse(s2, ns, CultureInfo.InvariantCulture, out r.ULong);
                long.TryParse(s2, ns, CultureInfo.InvariantCulture, out r.Long);
                r.Set = true;

                return r;
            }
 protected void btnOK_Click(object sender, EventArgs e)
 {
     SystemOptions options = new SystemOptions();
     options["ElectronTicket_HPCQ_Getway"] = new OptionValue(this.tb1.Text);
     options["ElectronTicket_HPCQ_UserName"] = new OptionValue(this.tb2.Text);
     options["ElectronTicket_HPCQ_UserPassword"] = new OptionValue(this.tb3.Text);
     options["ElectronTicket_HPCQ_Status_ON"] = new OptionValue(this.cb1.Checked);
     options["ElectronTicket_HPCQ_NotFull"] = new OptionValue(this.ddlNotFull1.SelectedValue);
     options["ElectronTicket_Shove_UserName"] = new OptionValue(this.tb4.Text);
     options["ElectronTicket_Shove_UserPassword"] = new OptionValue(this.tb5.Text);
     options["ElectronTicket_Shove_Status_ON"] = new OptionValue(this.cb2.Checked);
     options["ElectronTicket_Shove_NotFull"] = new OptionValue(this.ddlNotFull2.SelectedValue);
     for (int i = 0; i < this.g.Rows.Count; i++)
     {
         DropDownList list = (DropDownList)this.g.Rows[i].Cells[1].FindControl("ddlElectronTicket");
         MSSQL.ExecuteNonQuery("update T_Lotteries set PrintOutType = " + list.SelectedValue + " where [ID] = " + this.g.Rows[i].Cells[2].Text, new MSSQL.Parameter[0]);
     }
     this.tb3.Attributes.Add("value", this.tb3.Text);
     this.tb5.Attributes.Add("value", this.tb5.Text);
     JavaScript.Alert(this.Page, "站点资料已经保存成功。");
 }
Esempio n. 37
0
 public override void ExplicitVisit(OptionValue node) { this.action(node); }
Esempio n. 38
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();

        try
        {
            // 中国银联
            so["OnlinePay_ChinaUnion_UserName"] = new OptionValue(tbChinaUnionName.Text);
            so["OnlinePay_ChinaUnion_UserNumber"] = new OptionValue(tbChinaUnionNumber.Text);
            so["OnlinePay_ChinaUnion_MD5"] = new OptionValue(tbChinaUnionKey.Text);
            so["OnlinePay_ChinaUnion_CommissionScale"] = new OptionValue(Shove._Convert.StrToDouble(tbChinaUnionPayCommisionRate.Text, 0));
            so["OnlinePay_ChinaUnion_Status_ON"] = new OptionValue(cbChinaUnionStatus.Checked);

            // 支付宝
            so["OnlinePay_Alipay_UserName"] = new OptionValue(tbAlipayName.Text);
            so["OnlinePay_Alipay_UserNumber"] = new OptionValue(tbAlipayNumber.Text);
            so["OnlinePay_Alipay_MD5Key"] = new OptionValue(tbAlipayKey.Text);
            so["OnlinePay_Alipay_PayFormalitiesFeesScale"] = new OptionValue(Shove._Convert.StrToDouble(tbAlipayPayFormalitiesFeesScale.Text, 0));
            so["OnlinePayOut_Alipay_MD5Key"] = new OptionValue(tbAlipayOutKey.Text);
            so["OnlinePayOut_Alipay_DistillFormalitiesFeesScale"] = new OptionValue(Shove._Convert.StrToDouble(tbAlipayDistillFormalitiesFeesScale.Text, 0));
            so["OnlinePay_Alipay_Status_ON"] = new OptionValue(cbAlipayON.Checked);


            // 支付宝(会员提款)
            so["OnlinePay_Alipay_ForUserDistill_UserName"] = new OptionValue(tbOnlinePay_Alipay_ForUserDistill_UserName.Text);
            so["OnlinePay_Alipay_ForUserDistill_UserNumber"] = new OptionValue(tbOnlinePay_Alipay_ForUserDistill_UserNumber.Text);
            so["OnlinePay_Alipay_ForUserDistill_MD5Key"] = new OptionValue(tbOnlinePay_Alipay_ForUserDistill_MD5Key.Text);
            so["OnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut"] = new OptionValue(tbOnlinePay_Alipay_ForUserDistill_MD5Key_ForPayOut.Text);
            so["OnlinePay_Alipay_ForUserDistill_Status_ON"] = new OptionValue(cbOnlinePay_Alipay_ForUserDistill_Status_ON.Checked);


            // 快钱
            so["OnlinePay_99Bill_UserName"] = new OptionValue(tb99BillName.Text);
            so["OnlinePay_99Bill_UserNumber"] = new OptionValue(tb99BillNumber.Text);
            so["OnlinePay_99Bill_MD5Key"] = new OptionValue(tb99BillKey.Text);
            so["OnlinePay_99Bill_PayFormalitiesFeesScale"] = new OptionValue(Shove._Convert.StrToDouble(tb99BillPayFormalitiesFeesScale.Text, 0));
            so["OnlinePayOut_99Bill_MD5Key"] = new OptionValue(tb99BillOutKey.Text);
            so["OnlinePay_99Bill_QueryMD5Key"] = new OptionValue(tb99BillQueryKey.Text);
            so["OnlinePayOut_99Bill_DistillFormalitiesFeesScale"] = new OptionValue(Shove._Convert.StrToDouble(tb99BillDistillFormalitiesFeesScale.Text, 0));
            so["OnlinePay_99Bill_Status_ON"] = new OptionValue(cb99BillON.Checked);

            // 财付通
            so["OnlinePay_Tenpay_UserName"] = new OptionValue(tbTenpayName.Text);
            so["OnlinePay_Tenpay_UserNumber"] = new OptionValue(tbTenpayNumber.Text);
            so["OnlinePay_Tenpay_MD5Key"] = new OptionValue(tbTenpayKey.Text);
            so["OnlinePay_Tenpay_PayFormalitiesFeesScale"] = new OptionValue(Shove._Convert.StrToDouble(tbTenpayPayFormalitiesFeesScale.Text, 0));
            so["OnlinePayOut_Tenpay_MD5Key"] = new OptionValue(tbTenpayOutKey.Text);
            so["OnlinePayOut_Tenpay_DistillFormalitiesFeesScale"] = new OptionValue(Shove._Convert.StrToDouble(tbTenpayDistillFormalitiesFeesScale.Text, 0));
            so["OnlinePay_Tenpay_Status_ON"] = new OptionValue(cbTenpayON.Checked);

            // 网银在线
            so["OnlinePay_CBPayMent_UserName"] = new OptionValue(tbCBPayMentName.Text);
            so["OnlinePay_CBPayMent_UserNumber"] = new OptionValue(tbCBPayMentNumber.Text);
            so["OnlinePay_CBPayMent_MD5Key"] = new OptionValue(tbCBPayMentKey.Text);
            so["OnlinePay_CBPayMent_PayFormalitiesFeesScale"] = new OptionValue(Shove._Convert.StrToDouble(tbCBPayMentPayFormalitiesFeesScale.Text, 0));
            so["OnlinePayOut_CBPayMent_MD5Key"] = new OptionValue(tbCBPayMentOutKey.Text);
            so["OnlinePayOut_CBPayMent_DistillFormalitiesFeesScale"] = new OptionValue(Shove._Convert.StrToDouble(tbCBPayMentDistillFormalitiesFeesScale.Text, 0));
            so["OnlinePay_CBPayMent_Status_ON"] = new OptionValue(cbCBPayMentON.Checked);

            // 易宝
            so["OnlinePay_YeePay_UserName"] = new OptionValue(tbYeePayName.Text);
            so["OnlinePay_YeePay_UserNumber"] = new OptionValue(tbYeePayNumber.Text);
            so["OnlinePay_YeePay_MD5Key"] = new OptionValue(tbYeePayKey.Text);
            so["OnlinePay_YeePayy_PayFormalitiesFeesScale"] = new OptionValue(Shove._Convert.StrToDouble(tbYeePayFormalitiesFeesScale.Text, 0));
            so["OnlinePayOut_YeePay_MD5Key"] = new OptionValue(tbYeePayOutKey.Text);
            so["OnlinePayOut_YeePay_DistillFormalitiesFeesScale"] = new OptionValue(Shove._Convert.StrToDouble(tbYeePayDistillFormalitiesFeesScale.Text, 0));
            so["OnlinePay_YeePay_Status_ON"] = new OptionValue(cbYeePayON.Checked);

            //神州行(007卡)
            so["OnlinePay_007Ka_FormalitiesFees"] = new OptionValue(tb007Ka_FormalitiesFees.Text);
            so["OnlinePay_007Ka_MerAccount"] = new OptionValue(tb007Ka_MerAccount.Text);
            so["OnlinePay_007Ka_MerchantId"] = new OptionValue(tb007Ka_MerchantId.Text);
            so["OnlinePay_007Ka_Status_ON"] = new OptionValue(cb007KaON.Checked);
        }
        catch (Exception exception)
        {
            PF.GoError(ErrorNumber.Unknow, exception.Message, "Admin_OnlinePayGateway");

            return;
        }

        Shove._Web.JavaScript.Alert(this.Page, "设置保存成功。");
    }
Esempio n. 39
0
        /*  TIME
            GNU Options
                -f FORMAT, --format=FORMAT
                    Specify output format, possibly overriding the format
                    specified in the environment variable TIME.
                -p, --portability
                    Use the portable output format.
                -o FILE, --output=FILE
                    Do not send the results to stderr, but overwrite the
                    specified file.
                -a, --append
                    (Used together with -o.) Do not overwrite but append.
                -v, --verbose
                    Give very verbose output about all the program knows about.

            GNU Standard Options
                -h --help
                    Print a usage message on standard output and exit
                    successfully.
                -V, --version
                    Print version information on standard output, then exit
                    successfully.
                --
                    Terminate option list.
        */
        static void Main(string[] args)
        {
            // Set parser
            OptionParser parser = new OptionParser();
            parser.ProgramInfo.Name = "Time";
            parser.ProgramInfo.Version = "3.14";

            // Add option, which has reqired parameter and meta variable "TIME"
            OptionValue<string> format = new OptionValue<string>("DD.MM.YYYY");
            parser.AddOption(
                new Option(new string[] { "-f", "--format" },
                    "Specify output format, possibly overriding the format specified in the environment variable TIME.",
                    new StoreAction<string>(format)
                ) { ParametersRequired = true }
            );

            // Add option, which has not any parameter
            OptionValue<bool> portability = new OptionValue<bool>(false);
            parser.AddOption(
                new Option(new string[] { "-p", "--portability" },
                    "Use the portable output format.",
                    new StoreConstAction<bool>(portability, true)
                ) { ParametersCount = 0 }
            );

            // Add option, which has reqired parameter
            OptionValue<string> output = new OptionValue<string>();
            parser.AddOption(
                new Option(new string[] { "-o", "--output" },
                    "Do not send the results to stderr, but overwrite the specified file.",
                    new StoreAction<string>(output)
                ) { ParametersRequired = true}
            );

            // Add option, which has not any parameter
            OptionValue<bool> append = new OptionValue<bool>(false);
            parser.AddOption(
                new Option(new string[] { "-a", "--append" },
                    "(Used together with -o.) Do not overwrite but append.",
                    new StoreConstAction<bool>(append, true)
                ) { ParametersCount = 0 }
            );

            // Add option, which has not any parameter
            OptionValue<bool> verbose = new OptionValue<bool>(false);
            parser.AddOption(
                new Option(new string[] { "-v", "--verbose" },
                    "Give very verbose output about all the program knows about.",
                    new StoreConstAction<bool>(verbose, true)
                ) { ParametersCount = 0 }
            );

            try
            {
                // Run options parser (for example with args: -f YYYY.MM.DDD -p -o ./outputfile -a -v)
                IList<string> remainingArgs = parser.ParseArguments(args);
                Console.WriteLine("format: {0}", format.Value);
                Console.WriteLine("portability: {0}", portability.Value);
                Console.WriteLine("output: {0}", output.Value);
                Console.WriteLine("append: {0}", append.Value);
                Console.WriteLine("verbose: {0}", verbose.Value);
            }
            catch (ParseException exception)
            {
                // User control the exception
                System.Console.WriteLine("exception: " + exception.ToString());
            }
        }
Esempio n. 40
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        SystemOptions so = new SystemOptions();
        //恒朋江西电子票参数
        so["ElectronTicket_HPJX_Getway"] = new OptionValue(tb1.Text);
        so["ElectronTicket_HPJX_UserName"] = new OptionValue(tb2.Text);
        so["ElectronTicket_HPJX_UserPassword"] = new OptionValue(tb3.Text);
        so["ElectronTicket_HPJX_Status_ON"] = new OptionValue(cb1.Checked);

        //恒朋上海电子票参数
        so["ElectronTicket_HPSH_Getway"] = new OptionValue(tb_HPSH_Getway.Text);
        so["ElectronTicket_HPSH_UserName"] = new OptionValue(tb_AgentID.Text);
        so["ElectronTicket_HPSH_UserPassword"] = new OptionValue(tb_AgentPwd.Text);
        so["ElectronTicket_HPSH_Status_ON"] = new OptionValue(cb_HPSH.Checked);

        //恒朋山东电子票参数
        so["ElectronTicket_HPSD_Getway"] = new OptionValue(tb_HPSD_Getway.Text);
        so["ElectronTicket_HPSD_UserName"] = new OptionValue(tb_HPSD_AgentID.Text);
        so["ElectronTicket_HPSD_UserPassword"] = new OptionValue(tb_HPSD_AgentPwd.Text);
        so["ElectronTicket_HPSD_Status_ON"] = new OptionValue(cb_HPSD.Checked);

        for (int i = 0; i < g.Rows.Count; i++)
        {
            DropDownList ddlElectronTicket = (DropDownList)g.Rows[i].Cells[1].FindControl("ddlElectronTicket");

            MSSQL.ExecuteNonQuery("update T_Lotteries set PrintOutType = " + ddlElectronTicket.SelectedValue + " where [ID] = " + g.Rows[i].Cells[2].Text);
        }

        tb3.Attributes.Add("value", tb3.Text);

        Shove._Web.JavaScript.Alert(this.Page, "站点资料已经保存成功。");
    }
Esempio n. 41
0
 public OptionValue GetOptionValue(int optionNameID, int optionValueID)
 {
     var data = downloadWebPage(getFullUrl("/admin/option_names/" + optionNameID + "/option_values/" + optionValueID + ".xml"), HttpMethod.GET);
     var x = XDocument.Parse(data).Root;
     var img = new OptionValue();
     img.LoadXElement(x);
     return img;
 }
Esempio n. 42
0
 public IEnumerable<OptionValue> GetOptionValues(int optionNameID)
 {
     var data = downloadWebPage(getFullUrl("/admin/option_names/" + optionNameID + "/option_values.xml"), HttpMethod.GET);
     var x = XDocument.Parse(data);
     foreach (var item in x.Root.Elements())
     {
         var on = new OptionValue();
         on.LoadXElement(item);
         yield return on;
     }
 }
Esempio n. 43
0
 public void AddOptionValue(OptionValue optionValue, int optionNameID)
 {
     var data = downloadWebPage(getFullUrl("/admin/option_names/" + optionNameID + "/option_values.xml"), HttpMethod.POST, optionValue.ToXElement().ToString());
     var x = XDocument.Parse(data).Root;
     optionValue.LoadXElement(x);
 }