//确定
        private void buttonX1_Click(object sender, EventArgs e)
        {
            InSellForm isf = (InSellForm)this.Owner;

            isf.Sell_Price      = textBoxX1.Text;
            isf.Sell_Discount   = textBoxX3.Text;
            isf.Sell_zongmoney  = textBoxX4.Text;
            isf.Sell_PriceAfter = textBoxX5.Text;
            Close();
            Dispose();
        }
        private void SellHistoricaldiscount_Load(object sender, EventArgs e)
        {
            InSellForm isf = (InSellForm)this.Owner;

            lblkehu.Text   = isf.Sell_Clientname;
            lblname.Text   = isf.Sell_MaName;
            lblunity.Text  = isf.Sell_Unit;
            lblcount.Text  = isf.Sell_CurNumber;
            textBoxX1.Text = isf.Sell_Price;
            textBoxX3.Text = isf.Sell_Discount;
            textBoxX4.Text = isf.Sell_zongmoney;
            textBoxX5.Text = isf.Sell_PriceAfter;

            textBoxX2.ReadOnly = true; //折扣金额
            textBoxX4.ReadOnly = true; //总金额
            textBoxX5.ReadOnly = true; //折后单价
            //设置为整行被选中
            this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            //绑定数据
            dataGridView1.DataSource = new SellDetailManager().SelDiscountByAccount("本次", "说服力是地方");
        }
        private void SellPriceEntry_Load(object sender, EventArgs e)
        {
            InSellForm isf = (InSellForm)this.Owner;

            lblkehu.Text   = isf.Sell_Clientname;
            lblname.Text   = isf.Sell_MaName;
            lblunity.Text  = isf.Sell_Unit;
            lblcount.Text  = isf.Sell_CurNumber;
            textBoxX1.Text = isf.Sell_Price;
            textBoxX3.Text = isf.Sell_Discount;
            textBoxX4.Text = isf.Sell_zongmoney;
            textBoxX5.Text = isf.Sell_PriceAfter;
            this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            DataTable dt       = new SellDetailManager().SelPriceByMaName(_maName);
            Material  material = new MaterialManager().SelPriceByMaName(_maName);
            DataRow   row;

            row    = dt.NewRow();
            row[0] = "建议售价";
            row[1] = material.Ma_Price;
            row[2] = DBNull.Value;
            dt.Rows.Add(row);

            row    = dt.NewRow();
            row[0] = "建议售价";
            row[1] = material.Ma_PriceA;
            row[2] = DBNull.Value;
            dt.Rows.Add(row);

            row    = dt.NewRow();
            row[0] = "建议售价";
            row[1] = material.Ma_PriceB;
            row[2] = DBNull.Value;
            dt.Rows.Add(row);

            row    = dt.NewRow();
            row[0] = "建议售价";
            row[1] = material.Ma_PriceC;
            row[2] = DBNull.Value;
            dt.Rows.Add(row);

            row    = dt.NewRow();
            row[0] = "建议售价";
            row[1] = material.Ma_PriceD;
            row[2] = DBNull.Value;
            dt.Rows.Add(row);

            row    = dt.NewRow();
            row[0] = "建议售价";
            row[1] = material.Ma_PriceE;
            row[2] = DBNull.Value;
            dt.Rows.Add(row);

            //绑定数据
            dataGridView1.DataSource = dt;
            dataGridView2.DataSource = new SellDetailManager().SelAccountPriceByAccount(_clientName, _maName);
            textBoxX2.ReadOnly       = true; //折扣金额
            textBoxX4.ReadOnly       = true; //总金额
            textBoxX5.ReadOnly       = true; //折后单价
            //设置为整行被选中
            this.dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            this.dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
        }