Пример #1
0
 private void skinTextBox_minDiscount_Validating(object sender, CancelEventArgs e)
 {
     if (!String.IsNullOrEmpty(skinTextBox_minDiscount.SkinTxt.Text))
     {
         if (!ValidateUtil.CheckMoney(skinTextBox_minDiscount.SkinTxt.Text))
         {
             e.Cancel = true;
             skinTextBox_minDiscount.Text = String.Empty;
         }
     }
 }
Пример #2
0
 private void skinComboBoxShopID_Validating(object sender, CancelEventArgs e)
 {
     if (!String.IsNullOrEmpty(this.skinComboBoxPrice.Text))
     {
         if (!ValidateUtil.CheckMoney(this.skinComboBoxPrice.Text))
         {
             e.Cancel = true;
             skinComboBoxPrice.Text = "50";
         }
         else
         {
             // skinComboBoxShopID.Text = Convert.ToDecimal(this.skinComboBoxShopID.Text);
         }
     }
 }
Пример #3
0
        private void BaseButton1_Click(object sender, EventArgs e)
        {
            String id   = this.skinTextBoxID.SkinTxt.Text.Trim();
            String name = this.skinTextBoxName.SkinTxt.Text.Trim();

            if (String.IsNullOrEmpty(id) || !ValidateUtil.CheckMoney(id))
            {
                this.skinTextBoxID.Focus();
                return;
            }
            else if (String.IsNullOrEmpty(name))
            {
                this.skinTextBoxName.Focus();
                return;
            }
            this.result = new CostumeColor()
            {
                ID             = id,
                Name           = name,
                FirstCharSpell = DisplayUtil.GetPYString(name)
                                 //  SupplyDiscount = Decimal.ToByte(numericUpDownSupplyDiscount.Value)
            };
            this.DialogResult = DialogResult.OK;
        }