public cf_type DefaultCfType()
        {
            cf_type cfType = new cf_type();

            cfType.cf_cftype    = 0;
            cfType.cf_amount    = 0;
            cfType.cf_desc      = TextBoxDefaultDesc.Text.Trim();
            cfType.cf_type_name = TextBoxDefaultName.Text.Trim();
            cfType.cf_price     = 0;

            return(cfType);
        }
Beispiel #2
0
        public cf_type GetCfType()
        {
            cf_type cfType = new cf_type();

            cfType.cf_amount   = TextBoxNum.Value;
            cfType.left_amount = TextBoxNum.Value ?? 0;
            cfType.cf_desc     = this.TextBoxDes.Text;
            if (this.TextBoxPrice.Value.HasValue)
            {
                cfType.cf_price = (decimal)TextBoxPrice.Value.Value;
            }

            cfType.cf_type_name = this.TextBoxName.Text.Trim();
            cfType.cf_cftype    = 1;
            return(cfType);
        }