private void selecting_client() { using (FRM_NewReciepts select_client = new FRM_NewReciepts()) { var result = select_client.ShowDialog(); if (result == DialogResult.OK) { // Setting choosed client id client_id = select_client.selected_client_id; // Get Client data if (!returned_receipt) { full_receipt_data = new ReceiptsHelpers().Generate_receipt(client_id); } else { full_receipt_data = new ReceiptsHelpers().Generate_Returned_receipt(client_id); } // Show Client Data textBox1.Text = full_receipt_data["receipt_id"].ToString(); receipt_id = full_receipt_data["receipt_id"].ToString(); textBox2.Text = full_receipt_data["receipt_date"].ToString(); textBox3.Text = full_receipt_data["client_name"].ToString(); textBox4.Text = full_receipt_data["phone"].ToString(); textBox5.Text = full_receipt_data["address"].ToString(); textBox6.Text = full_receipt_data["past_balance"].ToString(); textBox9.Text = textBox6.Text; calculate_balance(); } } }
private void button1_Click(object sender, EventArgs e) { Form addclient = new FRM_NewReciepts(); this.Hide(); addclient.Show(); }