コード例 #1
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            if (textBox14.Text == "")
            {
                textBox14.Text = "0";
            }
            if (textBox11.Text == "")
            {
                textBox11.Text = "0"; textBox10.Text = "0";
            }
            if (textBox17.Text == "")
            {
                textBox17.Text = "0"; textBox18.Text = "0";
            }
            if (textBox19.Text == "")
            {
                textBox19.Text = "0"; textBox20.Text = "0";
            }
            totalSum = Convert.ToDecimal(textBox11.Text) + Convert.ToDecimal(textBox17.Text)
                       + Convert.ToDecimal(textBox19.Text) + Convert.ToDecimal(textBox14.Text);
            textBox16.Text = totalSum.ToString();
            textBox1.Text  = totalSum.ToString();
            string LiteralNo = NumericToLiteral.Convert(Convert.ToDecimal(textBox1.Text));

            LiteralNo     = LiteralNo.Replace("(", "").Replace(")", "");
            textBox7.Text = LiteralNo;
        }
コード例 #2
0
 private void textBox6_Leave_1(object sender, EventArgs e)
 {
     foreach (char c in textBox6.Text)
     {
         if (Char.IsDigit(c) || Char.IsPunctuation(c))
         {
         }
         else
         {
             MessageBox.Show("رقم غير صحيح");
             textBox6.Text = "";
             textBox6.Select();
             break;
         }
     }
     if (textBox6.Text != "")
     {
         string LiteralNo = NumericToLiteral.Convert(Convert.ToDecimal(textBox6.Text));
         LiteralNo     = LiteralNo.Replace("(", "").Replace(")", "");
         textBox8.Text = LiteralNo;
     }
 }