private void btnSearchCustomer_Click(object sender, EventArgs e) { SearchCustomerPVC searchCust = new SearchCustomerPVC(main); DialogResult result = searchCust.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { setCustomerFromID(main.globalCustomerID); createDebtReport(main.globalCustomerID); } }
private void btnSearchCustomer_Click(object sender, EventArgs e) { SearchCustomerPVC searchCust = new SearchCustomerPVC(main); DialogResult result = searchCust.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { ClearData(); parentCompanyID = main.globalParentCompanyID; companyID = main.globalCompanyID; customerID = main.globalCustomerID; DataTable dt = ExecuteQuery("SELECT companyName, phone FROM MsCompany WHERE companyID = " + companyID + ""); tbCustomerCompany.Text = dt.Rows[0]["companyName"].ToString(); dt = ExecuteQuery("SELECT customerName, phone FROM MsCustomer WHERE customerID = " + customerID + ""); tbCustomerName.Text = dt.Rows[0]["customerName"].ToString(); tbCustomerPhone.Text = dt.Rows[0]["phone"].ToString(); refreshHeader(ckbJatuhTempo.Checked, ckbLunas.Checked); } }