Beispiel #1
0
        public static void refresh_display_addproduct_and_totalamount(cls_product prod, decimal total)
        {
            string productname = prod.getProductName();

            if (productname.Length > displayLength)
            {
                productname = productname.Substring(0, displayLength);
            }
            string productprice = "P" + prod.getPrice().ToString("N2");
            string totalamt     = "P" + total.ToString("N2");
            int    temp         = displayLength / 2;

            if (productprice.Length > temp)
            {
                productprice = productprice.Substring(0, temp);
            }
            if (totalamt.Length > displayLength - temp)
            {
                totalamt = totalamt.Substring(0, displayLength - temp);
            }

            string line2 = String.Format("{0, -" + temp + "}{1, " + (displayLength - temp) + "}", productprice, totalamt);

            display(productname, line2);
        }
Beispiel #2
0
        private void frmWholesale_Load(object sender, EventArgs e)
        {
            lblProduct_d.Text   = cproduct.getProductName();
            lblUnitPrice_d.Text = "0";
            txtQty.Text         = "1";
            txtPrice.Text       = "0";

            txtQty.Focus();
            txtQty.SelectAll();

            fncFullScreen fncfullscreen = new fncFullScreen(this);

            fncfullscreen.ResizeFormsControls();
        }