Ejemplo n.º 1
0
        private void Fill_Details_Paient()
        {
            DataTable dt = new DataTable();

            dt = report.Details_Paient(Convert.ToInt32(Com_RPaient.SelectedValue));
            Lbl_Address.Text  = dt.Rows[0][2].ToString();
            Lbl_Phone.Text    = dt.Rows[0][3].ToString();
            Lbl_LandLine.Text = dt.Rows[0][4].ToString();
            Lbl_Sex.Text      = dt.Rows[0][5].ToString();

            if (dt.Rows[0][6].ToString() == "01/01/1900 12:00:00 ص")
            {
                MTxt_Birthday.ResetText();
                Lbl_Age.Text = "...";
            }
            else
            {
                MTxt_Birthday.Text = dt.Rows[0][6].ToString();
                Lbl_Age.Text       = Convert.ToInt32((DateTime.Now.Subtract(Convert.ToDateTime(dt.Rows[0][6])).TotalDays / 365)).ToString();
            }
        }
Ejemplo n.º 2
0
        private void Btn_Reset_Click(object sender, EventArgs e)
        {
            Com_RPaient.DropDownStyle = ComboBoxStyle.DropDown;
            Com_RPaient.Focus();

            Btn_PReport.Enabled = false;
            Com_RPaient.ResetText();
            Lbl_Doctor.ResetText();
            Lbl_Address.ResetText();
            Lbl_Age.ResetText();
            MTxt_Birthday.ResetText();
            MTxt_Birthday.Visible = false;
            Lbl_LandLine.ResetText();
            Lbl_Phone.ResetText();
            Lbl_Sex.ResetText();
            Lbl_Count.ResetText();
            Lbl_Balance.ResetText();
            Lbl_Approximate.ResetText();
            DGV_Chronic.DataSource = null;
            DGV_Reports.DataSource = null;
        }