public int pets_counter()
        {

            SqlConnection conn = Connection_Manger.getConnection();
            string query = "select count(*) from ad_miscellaneous_pets";
            SqlCommand cmd = new SqlCommand(query, conn);
            conn.Open();
            int count = Convert.ToInt32(cmd.ExecuteScalar());
            conn.Close();
            return count;
        }
Пример #2
0
        public int tender_notice_counter()
        {
            SqlConnection conn  = Connection_Manger.getConnection();
            string        query = "select count(*) from ad_events_special_tender_notice";
            SqlCommand    cmd   = new SqlCommand(query, conn);

            conn.Open();
            int count = Convert.ToInt32(cmd.ExecuteScalar());

            conn.Close();
            return(count);
        }
Пример #3
0
        public int software_counter()
        {
            SqlConnection conn  = Connection_Manger.getConnection();
            string        query = "select count(*) from ad_electronics_software";
            SqlCommand    cmd   = new SqlCommand(query, conn);

            conn.Open();
            int count = Convert.ToInt32(cmd.ExecuteScalar());

            conn.Close();
            return(count);
        }
Пример #4
0
        public int water_chiller_counter()
        {
            SqlConnection conn  = Connection_Manger.getConnection();
            string        query = "select count(*) from ad_home_appliances_water_chiller";
            SqlCommand    cmd   = new SqlCommand(query, conn);

            conn.Open();
            int count = Convert.ToInt32(cmd.ExecuteScalar());

            conn.Close();
            return(count);
        }
Пример #5
0
        public int shop_counter()
        {
            SqlConnection conn  = Connection_Manger.getConnection();
            string        query = "select count(*) from ad_real_estate_shops";
            SqlCommand    cmd   = new SqlCommand(query, conn);

            conn.Open();
            int count = Convert.ToInt32(cmd.ExecuteScalar());

            conn.Close();
            return(count);
        }
Пример #6
0
        public int technical_institutes_counter()
        {
            SqlConnection conn  = Connection_Manger.getConnection();
            string        query = "select count(*) from ad_education_technical_institute";
            SqlCommand    cmd   = new SqlCommand(query, conn);

            conn.Open();
            int count = Convert.ToInt32(cmd.ExecuteScalar());

            conn.Close();
            return(count);
        }
Пример #7
0
        public int languages_academies_counter()
        {
            SqlConnection conn  = Connection_Manger.getConnection();
            string        query = "select count(*) from ad_education_launage_academies";
            SqlCommand    cmd   = new SqlCommand(query, conn);

            conn.Open();
            int count = Convert.ToInt32(cmd.ExecuteScalar());

            conn.Close();
            return(count);
        }
Пример #8
0
        /* for new postad*/
        public void getlocation(string city)
        {
            string        query      = "select ad_location from ad_city_location where ad_city='" + city + "'";
            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    command    = new SqlCommand(query, connection);

            try
            {
                connection.Open();
                SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            }
            catch (Exception ex) {
                //MessageBox.Show(ex.Message);
            }
        }
Пример #9
0
        public void insert_ad_education_montessori(string title, string city, string location, string content, string user_type, int price, string images, DateTime datetime, Guid userid, int views)
        {
            string        query      = "insert into ad_education_montessori values('" + title + "','" + city + "','" + location + "','" + content + "','" + user_type + "'," + price + ",'" + images + "','" + datetime + "','" + userid + "'," + views + ")";
            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    command    = new SqlCommand(query, connection);

            try
            {
                connection.Open();
                command.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
        }
Пример #10
0
        public void insert_ad_real_estate_offices(string title, string city, string location, string content, string user_type, int price, string address, string area, string area_unit, string aggrement_type, string facing, string property_type, string year_built, string floor, int no_of_bedrooms, int no_of_rooms, int no_of_bathrooms, string drawing_room, string dining_room, string furnished, string kitchen, string pool, string servent_quater, string lawn, string parking, string terrace, string corner_location, string balcony, string elevator, string images, DateTime datetime, Guid userid, int views)
        {
            string        query      = "insert into ad_real_estate_offices values('" + title + "','" + city + "','" + location + "','" + content + "','" + user_type + "'," + price + ",'" + address + "','" + area + "','" + area_unit + "','" + aggrement_type + "','" + facing + "','" + property_type + "','" + year_built + "','" + floor + "'," + no_of_bedrooms + "," + no_of_rooms + "," + no_of_bathrooms + ",'" + drawing_room + "','" + dining_room + "','" + furnished + "','" + kitchen + "','" + pool + "','" + servent_quater + "','" + lawn + "','" + parking + "','" + terrace + "','" + corner_location + "','" + balcony + "','" + elevator + "','" + images + "','" + datetime + "','" + userid + "'," + views + ")";
            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    command    = new SqlCommand(query, connection);

            try
            {
                connection.Open();
                command.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
        }
Пример #11
0
        public void insert_ad_real_estate_plots_lands(string title, string city, string location, string user_type, int price, string address, string area, string area_unit, string aggrement_type, string property_type, string images, string content, DateTime datetime, Guid userid, int views)
        {
            string        query      = "insert into ad_real_estate_plots_lands values('" + title + "','" + city + "','" + location + "','" + user_type + "'," + price + ",'" + address + "','" + area + "','" + area_unit + "','" + aggrement_type + "','" + property_type + "','" + images + "','" + content + "','" + datetime + "','" + userid + "'," + views + ")";
            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    command    = new SqlCommand(query, connection);

            try
            {
                connection.Open();
                command.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
        }
Пример #12
0
        /*     AdbOOK METHODS      */
        public static void tempbook_data(int id, string category, string title, string description, DateTime datetime, string price, string city)
        {
            string        query      = null;
            SqlConnection connection = Connection_Manger.getConnection();

            try
            {
                connection.Open();

                query = "insert into temp values(" + id + ",'" + category + "','" + title + "','" + description + "','" + datetime + "','" + price + "','" + city + "')";

                //  string query = "insert into temp values(" + id + ",'" + category + "','" + title + "','" + description + "','" + datetime + "','" + price + "','" + city + "')";
                SqlCommand command = new SqlCommand(query, connection);
                command.ExecuteNonQuery();
            }
            catch (Exception ex) {
                // MessageBox.Show("error found in insertion"+ ex.Message);
            }
        }
Пример #13
0
        public static int selectadcarID()
        {
            int book_id = -1;

            string query = "SELECT max(autos_car_id) FROM ad_autos_car ";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                book_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                // MessageBox.Show( ex.Message);
            }
            return(book_id);
        }
Пример #14
0
        public static int selectedOtherVehicleID()
        {
            int other_vehicle_id = -1;

            string query = "SELECT max(autos_other_vehicle_id) FROM ad_autos_other_vehicle";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                other_vehicle_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(other_vehicle_id);
        }
Пример #15
0
        public static int selectCookingClassesID()
        {
            int cooking_id = -1;

            string query = "SELECT max(education_cooking_classes_id) FROM ad_education_cooking_classes";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                cooking_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(cooking_id);
        }
Пример #16
0
        public static int selectLaunageAcademiesID()
        {
            int launage_id = -1;

            string query = "SELECT max(education_launage_academies_id) FROM ad_education_launage_academies";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                launage_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(launage_id);
        }
Пример #17
0
        public static int selectprivateTutorsID()
        {
            int private_id = -1;

            string query = "SELECT max(education_private_tutors_id) FROM ad_education_private_tutors";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                private_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(private_id);
        }
Пример #18
0
        public static int selectshopsID()
        {
            int shop_id = -1;

            string query = "SELECT max(real_estate_shops_id) FROM ad_real_estate_shops";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                shop_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(shop_id);
        }
Пример #19
0
        public static int selectAuctionsID()
        {
            int auctios_id = -1;

            string query = "SELECT max(events_auctions_id) FROM ad_events_auctions";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                auctios_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(auctios_id);
        }
Пример #20
0
        public static int selectWaterChillerID()
        {
            int water_id = -1;

            string query = "SELECT max(home_appliances_water_chiller_id) FROM ad_home_appliances_water_chiller";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                water_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(water_id);
        }
Пример #21
0
        public static int selectTechnicalInstitutesID()
        {
            int technical_id = -1;

            string query = "SELECT max(education_technical_institute_id) FROM ad_education_technical_institute";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                technical_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(technical_id);
        }
Пример #22
0
        public static int selectGroomID()
        {
            int groom_id = -1;

            string query = "SELECT max(Matrimonial_grooms_id) FROM ad_Matrimonial_grooms";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                groom_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(groom_id);
        }
Пример #23
0
        public static int selectSoftwareID()
        {
            int software_id = -1;

            string query = "SELECT max(electronics_software_id) FROM ad_electronics_software";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                software_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(software_id);
        }
Пример #24
0
        public static int selectMobileAccessoriesID()
        {
            int mobile_id = -1;

            string query = "SELECT max(electronics_mobile_accessories_id) FROM ad_electronics_mobile_accessories";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                mobile_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(mobile_id);
        }
Пример #25
0
        public static int selectpetID()
        {
            int pet_id = -1;

            string query = "SELECT max(miscellaneous_pets_id) FROM ad_miscellaneous_pets";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                pet_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(pet_id);
        }
Пример #26
0
        public static int selectTenderID()
        {
            int tender_id = -1;

            string query = "SELECT max(events_special_tender_notice_id) FROM ad_events_special_tender_notice";


            SqlConnection connection = Connection_Manger.getConnection();
            SqlCommand    cmd        = new SqlCommand(query, connection);



            try
            {
                connection.Open();
                tender_id = (int)cmd.ExecuteScalar();
            }
            catch (Exception ex)
            {
                //MessageBox.Show(ex.Message);
            }
            return(tender_id);
        }