private void btn_search_Click(object sender, EventArgs e) { frm_patient frm = new frm_patient(this); frm.btn_add.Visible = false; frm.btn_delete.Visible = false; frm.btn_edit.Visible = false; frm.btn_exit.Visible = false; frm.btn_accept.Visible = true; frm.ShowDialog(); }
private void btn_pat_Click(object sender, EventArgs e) { Connection con = new Connection(); DataTable dt; dt = new DataTable(); dt = con.selectt("select priv_display from tb_priv where priv_screen_id=1 and priv_user_id='" + Main_Form.curnt_user + "';"); if (dt.Rows[0][0].ToString() == "False" || dt.Rows[0][0].ToString() == string.Empty) { } else { frm_patient frm = new frm_patient(); frm.ShowDialog(); } }
private void btn_search_Click(object sender, EventArgs e) { Connection con = new Connection(); frm_patient frm = new frm_patient(); frm.btn_add.Visible = false; frm.btn_delete.Visible = false; frm.btn_edit.Visible = false; frm.btn_exit.Visible = false; frm.btn_accept.Visible = true; frm.ShowDialog(); dt = new DataTable(); string code = frm_patient.pat_cod; txt_pat_name.Text = frm_patient.pat_name; dt = con.selectt("select [Name],[address],[card_realease_place],[card_id],[job],[phone]from[dbo].[patient] where [id]='" + code + "';"); reportViewer1.LocalReport.DataSources.Clear(); var rtds = new ReportDataSource("DataSet1", dt); reportViewer1.LocalReport.DataSources.Add(rtds); reportViewer1.RefreshReport(); }