private void simpleButton1_Click(object sender, EventArgs e)
 {
     PL.Sandat.FrmReceiptVoucher frm = new PL.Sandat.FrmReceiptVoucher();
     frm.Text            = "تعديل سند الصرف";
     frm.BtnNew.Visible  = false;
     frm.BtnSave.Visible = false;
     //frm.BtnAdd.SendToBack();
     frm.BtnEdit.Location = new Point(151, 244);
     frm.BtnEdit.BringToFront();
     try
     {
         frm.VoucherCode.Text     = this.DGV_PruChaseOrder.CurrentRow.Cells[0].Value.ToString();
         frm.VoucherRNum.Text     = this.DGV_PruChaseOrder.CurrentRow.Cells[1].Value.ToString();
         frm.VoucherDate.Text     = this.DGV_PruChaseOrder.CurrentRow.Cells[2].Value.ToString();
         frm.VoucherAmount.Text   = this.DGV_PruChaseOrder.CurrentRow.Cells[3].Value.ToString();
         frm.VoucherAmountAr.Text = this.DGV_PruChaseOrder.CurrentRow.Cells[4].Value.ToString();
         frm.VoucherFrom.Text     = this.DGV_PruChaseOrder.CurrentRow.Cells[5].Value.ToString();
         frm.statement.Text       = this.DGV_PruChaseOrder.CurrentRow.Cells[6].Value.ToString();
         frm.UserVoucher.Text     = this.DGV_PruChaseOrder.CurrentRow.Cells[7].Value.ToString();
         frm.ShowDialog();
         StData();
     }
     catch
     {
         return;
     }
 }
        private void BtnNew_Click_1(object sender, EventArgs e)
        {
            PL.Sandat.FrmReceiptVoucher frm = new PL.Sandat.FrmReceiptVoucher();
            try
            {
                frm.VoucherCode.Text = ClsRV.GetMaxVoucher().Rows[0][0].ToString();
                frm.BtnSave.Enabled  = true;
                frm.BtnNew.Enabled   = false;
            }
            catch
            {
                return;
            }

            frm.ShowDialog();
            StData();
        }