Ejemplo n.º 1
0
        private void ShowProductSupplement()
        {
            string            sql       = "ProductId = '" + _ProductId.ToString() + "'";
            ProductSupplement oProdSupp = ProductSupplement.LoadWhere(sql);

            if (oProdSupp != null)
            {
                txtMemo.Text = oProdSupp.ProductName_Memo;
                txtPole.Text = oProdSupp.ProductName_Pole;

                cboVendorCurrency.Text = oProdSupp.VendorCurrencyCode;
                txtVendorPrice.Text    = oProdSupp.VendorPrice.ToString("n2");
            }
        }
Ejemplo n.º 2
0
        private void SaveProductSupplement(Guid productId)
        {
            string            sql       = "ProductId = '" + productId.ToString() + "'";
            ProductSupplement oProdSupp = ProductSupplement.LoadWhere(sql);

            if (oProdSupp != null)
            {
                if (chkUpdateVendorPrice.Checked)
                {
                    oProdSupp.VendorCurrencyCode = cboVendorCurrency.Text;
                }
                if (chkUpdateVendorPrice.Checked)
                {
                    oProdSupp.VendorPrice = Convert.ToDecimal((txtVendorPrice.Text == string.Empty) ? "0" : txtVendorPrice.Text);
                }
                if (chkUpdateProductMemo.Checked)
                {
                    oProdSupp.ProductName_Memo = txtProductMemo.Text;
                }
                if (chkUpdateProductPole.Checked)
                {
                    oProdSupp.ProductName_Pole = txtProductPole.Text;
                }

                //tabDiscountInfo
                if (chkDiscountForFixPriceItem.Checked)
                {
                    oProdSupp.VipDiscount_FixedItem = Convert.ToDecimal(txtDiscountForFixPriceItem.Text);
                }
                if (chkDiscountForDiscountItem.Checked)
                {
                    oProdSupp.VipDiscount_DiscountItem = Convert.ToDecimal(txtDiscountForDiscountItem.Text);
                }
                if (chkDiscountForNoDiscountItem.Checked)
                {
                    oProdSupp.VipDiscount_NoDiscountItem = Convert.ToDecimal(txtDiscountForNoDiscountItem.Text);
                }
                if (chkStaffDiscount.Checked)
                {
                    oProdSupp.StaffDiscount = Convert.ToDecimal(txtStaffDiscount.Text);
                }

                oProdSupp.Save();
            }
        }
Ejemplo n.º 3
0
        // Product Price
        private void LoadProductSupplement()
        {
            string            sql       = "ProductId = '" + _ProductId.ToString() + "'";
            ProductSupplement oProdSupp = ProductSupplement.LoadWhere(sql);

            if (oProdSupp != null)
            {
                general.cboVendorCurrency.Text = oProdSupp.VendorCurrencyCode;
                general.txtVendorPrice.Text    = oProdSupp.VendorPrice.ToString("n2");
                general.txtMemo.Text           = oProdSupp.ProductName_Memo;
                general.txtPole.Text           = oProdSupp.ProductName_Pole;

                //discount.txtDiscount1_FixPriceItem.Text = oProdSupp.VipDiscount_FixedItem.ToString("n2");
                //discount.txtDiscount2_DiscountItem.Text = oProdSupp.VipDiscount_DiscountItem.ToString("n2");
                //discount.txtDiscount3_NoDiscountItem.Text = oProdSupp.VipDiscount_NoDiscountItem.ToString("n2");
                //discount.txtStaff.Text = oProdSupp.StaffDiscount.ToString("n2");
            }
        }
Ejemplo n.º 4
0
        // Product Price
        private void LoadProductSupplement()
        {
            string            sql       = "ProductId = '" + productId.ToString() + "'";
            ProductSupplement oProdSupp = ProductSupplement.LoadWhere(sql);

            if (oProdSupp != null)
            {
                cboVendorCurrency.Text = oProdSupp.VendorCurrencyCode;
                txtVendorPrice.Text    = oProdSupp.VendorPrice.ToString("n2");
                txtProductMemo.Text    = oProdSupp.ProductName_Memo;
                txtProductPole.Text    = oProdSupp.ProductName_Pole;

                //tabDiscountInfo
                txtDiscountForFixPriceItem.Text   = oProdSupp.VipDiscount_FixedItem.ToString("00.00");
                txtDiscountForDiscountItem.Text   = oProdSupp.VipDiscount_DiscountItem.ToString("00.00");
                txtDiscountForNoDiscountItem.Text = oProdSupp.VipDiscount_NoDiscountItem.ToString("00.00");
                txtStaffDiscount.Text             = oProdSupp.StaffDiscount.ToString("00.00");
            }
        }
Ejemplo n.º 5
0
        private void SaveProductSupplement(Guid productId)
        {
            string            sql       = "ProductId = '" + productId.ToString() + "'";
            ProductSupplement oProdSupp = ProductSupplement.LoadWhere(sql);

            if (oProdSupp == null)
            {
                oProdSupp = new ProductSupplement();

                oProdSupp.ProductId = productId;
            }
            oProdSupp.VendorCurrencyCode = general.cboVendorCurrency.Text;
            oProdSupp.VendorPrice        = Convert.ToDecimal((general.txtVendorPrice.Text == string.Empty) ? "0" : general.txtVendorPrice.Text);
            oProdSupp.ProductName_Memo   = general.txtMemo.Text;
            oProdSupp.ProductName_Pole   = general.txtPole.Text;

            //oProdSupp.VipDiscount_FixedItem = Convert.ToDecimal((txtDiscount1_FixPriceItem.Text == string.Empty) ? "0" : txtDiscount1_FixPriceItem.Text);
            //oProdSupp.VipDiscount_DiscountItem = Convert.ToDecimal((txtDiscount2_DiscountItem.Text == string.Empty) ? "0" : txtDiscount2_DiscountItem.Text);
            //oProdSupp.VipDiscount_NoDiscountItem = Convert.ToDecimal((txtDiscount3_NoDiscountItem.Text == string.Empty) ? "0" : txtDiscount3_NoDiscountItem.Text);
            //oProdSupp.StaffDiscount = Convert.ToDecimal((txtStaffDiscount.Text == string.Empty) ? "0" : txtStaffDiscount.Text);

            oProdSupp.Save();
        }