public void bill_printing_for_80() { string bill_no = dataGridView1.CurrentRow.Cells["calbill_no"].Value.ToString(); blp_80.bill_no = bill_no; blp_80.cashier = dataGridView1.CurrentRow.Cells["calcashier_name"].Value.ToString(); blp_80.cash_amount = dataGridView1.CurrentRow.Cells["calcashamt"].Value.ToString(); decimal discount = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["cal_discount"].Value.ToString()); blp_80.discount = discount.ToString(); blp_80.grand_total = dataGridView1.CurrentRow.Cells["cal_grand_total"].Value.ToString(); decimal subtotal = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["cal_sub_total"].Value.ToString()); blp_80.sub_total = subtotal.ToString(); blp_80.table_no = dataGridView1.CurrentRow.Cells["cal_table_no"].Value.ToString(); blp_80.print_again = true; blp_80.duplicate_bill_print = true; blp_80.discount_sub_total = (subtotal - discount).ToString(); blp_80.tax_amount = dataGridView1.CurrentRow.Cells["cal_tax"].Value.ToString(); decimal service_charge = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["cal_service_charge"].Value.ToString()); blp_80.service_charge = service_charge.ToString(); blp_80.taxable_amount = (subtotal + service_charge - discount).ToString(); blp_80.customer_PAN_no = dataGridView1.CurrentRow.Cells["cal_customer_pan"].Value.ToString(); blp_80.customer_name = dataGridView1.CurrentRow.Cells["cal_customer_name"].Value.ToString(); DateTime date_billing = Convert.ToDateTime(dataGridView1.CurrentRow.Cells["caldate"].Value.ToString()); blp_80.billing_date = date_billing; DataTable dt = blod.searchbybill_and_date(bill_no, date_billing); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { blp_80.datagridview_item_name.Add(dt.Rows[i]["item_name"].ToString()); blp_80.datagridview_item_price.Add(dt.Rows[i]["cost"].ToString()); blp_80.datagridview_total.Add(dt.Rows[i]["total"].ToString()); blp_80.datagridview_quantity.Add(dt.Rows[i]["quantity"].ToString()); blp_80.datagridview_complementary.Add(""); } } blp_80.printtobill(); save_after_print = blp_80.save_after_print; }