Пример #1
0
        void LoadGender()
        {
            DAL.clsDAL db      = new DAL.clsDAL();
            SqlCommand command = new SqlCommand();

            try
            {
                db.OpenConnection();
                command.Connection  = DAL.clsDAL.db;
                command.CommandText = "Select Gender from Gender;";
                SqlDataReader reader = command.ExecuteReader();
                while (reader.Read())
                {
                    comboBoxgGender.Items.Add(reader["Gender"].ToString());
                }
            }
            catch
            {
                MessageBox.Show("Error ");
            }
        }
Пример #2
0
        void LoadRegions()
        {
            DAL.clsDAL db      = new DAL.clsDAL();
            SqlCommand command = new SqlCommand();

            try
            {
                db.OpenConnection();
                command.Connection  = DAL.clsDAL.db;
                command.CommandText = "Select * from Region";
                SqlDataReader reader = command.ExecuteReader();
                while (reader.Read())
                {
                    comboBoxRegion.Items.Add(reader["Region_Name"].ToString());
                }
            }
            catch
            {
                MessageBox.Show("Error ");
            }
        }
Пример #3
0
        void LoadSubModilty()
        {
            DAL.clsDAL db      = new DAL.clsDAL();
            SqlCommand command = new SqlCommand();

            try
            {
                db.OpenConnection();
                command.Connection  = DAL.clsDAL.db;
                command.CommandText = "select Sub_Modality.Sub_Modality_Name from Sub_Modality where Sub_Modality.Modality_ID = 5";
                SqlDataReader reader = command.ExecuteReader();
                while (reader.Read())
                {
                    comboBoxSubmodality.Items.Add(reader["Sub_Modality_Name"].ToString());
                }
            }
            catch
            {
                MessageBox.Show("Error ");
            }
        }
Пример #4
0
        void LoadModalities()
        {
            DAL.clsDAL db      = new DAL.clsDAL();
            SqlCommand command = new SqlCommand();

            try
            {
                db.OpenConnection();
                command.Connection  = DAL.clsDAL.db;
                command.CommandText = "select Modality.Modality_Name from Modality order by Modality.Modality_ID asc;";
                SqlDataReader reader = command.ExecuteReader();
                while (reader.Read())
                {
                    comboBoxModality.Items.Add(reader["Modality_Name"].ToString());
                }
            }
            catch
            {
                MessageBox.Show("Error ");
            }
        }