Example #1
0
        public static bool ShowInputAmount2(string caption, string lbltext, out string input, out int type)
        {
            frmInputText inputtext = new frmInputText();

            inputtext.Text          = caption;
            inputtext.lblTitle.Text = lbltext;
            inputtext.ShowDialog();
            input = inputtext.inputNo;
            int stype = 0;

            if (inputtext.rbtDiscount.Checked)
            {
                stype = 1;
            }
            type = stype;
            bool re = inputtext.DialogResult == DialogResult.OK;

            try
            {
                inputtext.Close();
            }
            catch { }
            try
            {
                inputtext = null;
            }
            catch { }
            return(re);
        }
Example #2
0
        public static bool ShowInputAmount3(EnumInputType type, out string input)
        {
            input = null;
            frmInputText frm = new frmInputText {
                Text = "输入"
            };

            frm.lblTitle.Text = "优免金额";
            switch (type)
            {
            case EnumInputType.Discount:
                frm.rbtAmount.Visible   = false;
                frm.rbtDiscount.Checked = true;
                break;

            case EnumInputType.Reduce:
                frm.rbtDiscount.Visible = false;
                frm.rbtAmount.Checked   = true;
                break;

            default:
                throw new ArgumentOutOfRangeException("type", type, null);
            }

            var result = frm.ShowDialog();

            input = frm.inputNo;
            return(result == DialogResult.OK);
        }
Example #3
0
        public static string ShowInputText()
        {
            frmInputText inputtext = new frmInputText();

            inputtext.ShowDialog();

            return(inputtext.inputNo);
        }
Example #4
0
        public static bool ShowInputAmount(string caption, string lbltext, out string input)
        {
            frmInputText inputtext = new frmInputText();

            inputtext.Text          = caption;
            inputtext.lblTitle.Text = lbltext;
            inputtext.ShowDialog();
            input = inputtext.inputNo;
            inputtext.rbtDiscount.Visible = false;
            bool re = inputtext.DialogResult == DialogResult.OK;

            try
            {
                inputtext.Close();
            }
            catch { }
            try
            {
                inputtext = null;
            }
            catch { }
            return(re);
        }