// ---------------------------------------------------------------------------------------------------------- // HANDLE VISIBLE TEXTBOXES AND BUTTONS --------------------------------------------------------------------- private void HideQuotaInTB() { //Hide Quota invoice textboxes Invoice_Quota_textBox.Hide(); Date_Quota_Invoice_textBox.Hide(); Date_input_Quota_Invoice_textBox.Hide(); TaxNumber_Quota_Invoice_textBox.Hide(); TaxNumber_input_Quota_Invoice_textBox.Hide(); Amount_Quota_Invoice_textBox.Hide(); Amount_input_Quota_Invoice_textBox.Hide(); Ref_Quota_Invoice_textBox.Hide(); Ref_input_Quota_Invoice_textBox.Hide(); Desc_Quota_Invoice_textBox.Hide(); Desc_input_Quota_Invoice_textBox.Hide(); }
private void ShowQuotaInvTB() { //Show Quota invoice textboxes Invoice_Quota_textBox.Show(); Date_Quota_Invoice_textBox.Show(); Date_input_Quota_Invoice_textBox.Show(); TaxNumber_Quota_Invoice_textBox.Show(); TaxNumber_input_Quota_Invoice_textBox.Show(); Amount_Quota_Invoice_textBox.Show(); Amount_input_Quota_Invoice_textBox.Show(); Ref_Quota_Invoice_textBox.Show(); Ref_input_Quota_Invoice_textBox.Show(); Desc_Quota_Invoice_textBox.Show(); Desc_input_Quota_Invoice_textBox.Show(); }
private void ShowQuotaInvoice() { cn = GetSGBDConnection(); cn.Open(); if (currentQuotaInvoice != -1) { foreach (Quota_Invoice q in quotaList) { if (q.Index == currentQuotaInvoice) { id_f_quotas = q.ID; //Show Quota invoice textboxes ShowQuotaInvTB(); //Show Quota Buttons Delete_Quota_button.Show(); cmd = new SqlCommand("condomanager.ispaidquotas", cn) { CommandType = CommandType.StoredProcedure }; cmd.Parameters.AddWithValue("id_fatura", q.ID); cmd.ExecuteNonQuery(); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dt); Date_input_Quota_Invoice_textBox.Text = q.Date; TaxNumber_input_Quota_Invoice_textBox.Text = q.Tax_Number; Amount_input_Quota_Invoice_textBox.Text = q.Amount; Ref_input_Quota_Invoice_textBox.Text = q.ref_fracao; Desc_input_Quota_Invoice_textBox.Text = q.Description; Date_Quota_Invoice_textBox.Show(); TaxNumber_Quota_Invoice_textBox.Show(); Amount_Quota_Invoice_textBox.Show(); Ref_Quota_Invoice_textBox.Show(); Desc_Quota_Invoice_textBox.Show(); Invoice_Quota_textBox.Show(); if (dt.Rows.Count != 0) { //payment Payment_Quota_textBox.Show(); Date_Quota_Payment_textBox.Show(); Date_input_Quota_Payment_textBox.Show(); Desc_Quota_Payment_textBox.Show(); Desc_input_Quota_Payment_textBox.Show(); // add payment values Date_input_Quota_Payment_textBox.Text = dt.Rows[0]["data"].ToString(); Desc_input_Quota_Payment_textBox.Text = dt.Rows[0]["descricao"].ToString(); Mark_Paid_Quota_button.Hide(); Add_Quota_button.Hide(); } else { //payment Payment_Quota_textBox.Hide(); Date_Quota_Payment_textBox.Hide(); Date_input_Quota_Payment_textBox.Hide(); Desc_Quota_Payment_textBox.Hide(); Desc_input_Quota_Payment_textBox.Hide(); Mark_Paid_Quota_button.Show(); Add_Quota_button.Hide(); } } } } }