예제 #1
0
        public bool islemSil(Islem islem)
        {
            using (MySqlConnection connection = new MySqlConnection(baglanti_adresi))
            {
                MySqlParameter[] pms = new MySqlParameter[1];
                pms[0]       = new MySqlParameter("p_islemID", MySqlDbType.Int32);
                pms[0].Value = islem.islemID;


                MySqlCommand command = new MySqlCommand();

                command.Connection  = connection;
                command.CommandType = CommandType.StoredProcedure;
                command.CommandText = "p_islemSil";

                command.Parameters.AddRange(pms);

                connection.Open();
                if (command.ExecuteNonQuery() == 1)
                {
                    status = true;
                }
                else
                {
                    status = false;
                }
                connection.Close();
            }
            return(status);
        }
예제 #2
0
        //.................................



        //EMANET İŞLEMLERİ.....................
        public bool islemOlustur(Islem islem)
        {
            using (MySqlConnection connection = new MySqlConnection(baglanti_adresi))
            {
                MySqlParameter[] pms = new MySqlParameter[6];
                pms[0]       = new MySqlParameter("p_uyeID", MySqlDbType.Int32);
                pms[0].Value = islem.uyeID;

                pms[1]       = new MySqlParameter("p_kitapID", MySqlDbType.Int32);
                pms[1].Value = islem.kitapID;

                pms[2]       = new MySqlParameter("p_adminID", MySqlDbType.Int32);
                pms[2].Value = islem.adminID;

                pms[3]       = new MySqlParameter("p_islemTarihi", MySqlDbType.Date);
                pms[3].Value = islem.islemTarihi;

                pms[4]       = new MySqlParameter("p_iadeTarihi", MySqlDbType.Date);
                pms[4].Value = islem.iadeTarihi;
                pms[5]       = new MySqlParameter("p_emanetDurumu", MySqlDbType.VarChar);
                pms[5].Value = islem.emanetDurumu;



                MySqlCommand command = new MySqlCommand();

                command.Connection  = connection;
                command.CommandType = CommandType.StoredProcedure;
                command.CommandText = "p_islemEkle";

                command.Parameters.AddRange(pms);

                connection.Open();
                if (command.ExecuteNonQuery() == 1)
                {
                    status = true;
                }
                else
                {
                    status = false;
                }
                connection.Close();
            }
            return(status);
        }