Ejemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            System.Globalization.NumberStyles ns = (System.Globalization.NumberStyles.Currency);
            List <Product> productsInOrder       = new List <Product>();

            foreach (DataGridViewRow Row in FeeEntryDGV.Rows)
            {
                if (Row.Cells[10].Value != null)
                {
                    string  commision    = Row.Cells[4].Value.ToString();
                    decimal commisionNum = decimal.Parse(commision, ns);

                    string  etsyFee    = Row.Cells[5].Value.ToString();
                    decimal etsyFeeNum = decimal.Parse(etsyFee, ns);

                    string  paymentFee    = Row.Cells[6].Value.ToString();
                    decimal paymentFeeNum = decimal.Parse(paymentFee, ns);

                    string  totalFees    = Row.Cells[7].Value.ToString();
                    decimal totalFeesNum = decimal.Parse(totalFees, ns);

                    string  profitBeforeShipping    = Row.Cells[8].Value.ToString();
                    decimal profitBeforeShippingNum = decimal.Parse(profitBeforeShipping, ns);

                    string  totalProfit    = Row.Cells[10].Value.ToString();
                    decimal totalProfitNum = decimal.Parse(totalProfit, ns);

                    EtsyFees.AddFee(Convert.ToDecimal(Row.Cells[0].Value), Convert.ToDecimal(Row.Cells[1].Value), Convert.ToDecimal(Row.Cells[2].Value),
                                    Convert.ToInt32(Row.Cells[3].Value), commisionNum, etsyFeeNum, paymentFeeNum, totalFeesNum,
                                    profitBeforeShippingNum, Convert.ToDecimal(Row.Cells[9].Value), totalProfitNum);
                }
            }

            FeeEntryDGV.Rows.Clear();
            SavedFeeDGV.DataSource = DataLib.GetEtsyFees();
        }
Ejemplo n.º 2
0
        public EtsyFeeCalculatorForm()
        {
            InitializeComponent();

            SavedFeeDGV.DataSource = DataLib.GetEtsyFees();
        }