コード例 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (CustomerCondition == null)
     {
         CustomerCondition = new Model.CustomerCondition();
     }
     try
     {
         CustomerCondition.CardCount          = (int)nudCardCount.Value;
         CustomerCondition.CardNumberLength   = (int)nudCardNumberLength.Value;
         CustomerCondition.CardNumberString   = txtCardNumberString.Text;
         CustomerCondition.CardPasswordLength = (int)nudCardPasswordLength.Value;
         CustomerCondition.CardPasswordString = txtCardPasswordString.Text;
         CustomerCondition.ConditionId        = (int)cbbConditon.SelectedValue;
         CustomerCondition.Prefix             = txtPrefix.Text;
         CustomerCondition.Separator          = txtSeparator.Text;
         CustomerCondition.Suffix             = txtSuffix.Text;
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     }
 }
コード例 #2
0
ファイル: frmConditon.cs プロジェクト: loya/Creator
        private void button1_Click(object sender, EventArgs e)
        {
            if (CustomerCondition == null)
            {
                CustomerCondition = new Model.CustomerCondition();
            }
            try
            {
                CustomerCondition.CardCount = (int)nudCardCount.Value;
                CustomerCondition.CardNumberLength = (int)nudCardNumberLength.Value;
                CustomerCondition.CardNumberString = txtCardNumberString.Text;
                CustomerCondition.CardPasswordLength = (int)nudCardPasswordLength.Value;
                CustomerCondition.CardPasswordString = txtCardPasswordString.Text;
                CustomerCondition.ConditionId = (int)cbbConditon.SelectedValue;
                CustomerCondition.Prefix = txtPrefix.Text;
                CustomerCondition.Separator = txtSeparator.Text;
                CustomerCondition.Suffix = txtSuffix.Text;
                this.Close();

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            }
        }
コード例 #3
0
 public frmConditon(Model.CustomerCondition customerCondition)
 {
     InitializeComponent();
     CustomerCondition = customerCondition;
 }