예제 #1
0
        private void grid_add_price_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 0)
            {
                SalesFinishProducts obj = new SalesFinishProducts();
                obj.finishProductCode = grid_add_price.Rows[e.RowIndex].Cells[e.ColumnIndex + 1].Value.ToString();
                obj.finishProductName = grid_add_price.Rows[e.RowIndex].Cells[e.ColumnIndex + 2].Value.ToString();
                obj.price             = 0.00;
                obj.isSellable        = 0;

                frmAssignPrice frm = new frmAssignPrice(obj, 1);
                frm.ShowDialog();
                grid_change_price.DataSource = sfp.GetSalesFinishProduct();
                grid_add_price.DataSource    = sfp.GetSalesFinishProduct_NOTSET();
            }
        }
예제 #2
0
        private void grid_change_price_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 0)
            {
                SalesFinishProducts obj = new SalesFinishProducts();
                obj.finishProductCode = grid_change_price.Rows[e.RowIndex].Cells[e.ColumnIndex + 1].Value.ToString();
                obj.finishProductName = grid_change_price.Rows[e.RowIndex].Cells[e.ColumnIndex + 2].Value.ToString();
                string state = grid_change_price.Rows[e.RowIndex].Cells[e.ColumnIndex + 3].Value.ToString();
                obj.price      = double.Parse(grid_change_price.Rows[e.RowIndex].Cells[e.ColumnIndex + 4].Value.ToString());
                obj.isSellable = 0;

                if (state != "Non Selling Item")
                {
                    obj.isSellable = 1;
                }

                frmAssignPrice frm = new frmAssignPrice(obj, 0);
                frm.ShowDialog();
                grid_change_price.DataSource = sfp.GetSalesFinishProduct();
                grid_add_price.DataSource    = sfp.GetSalesFinishProduct_NOTSET();
            }
        }