示例#1
0
        public void DelItem(AdminMenuUpdateDTO AdminMenuUpdateDto)
        {
            sqlConnection.Open();
            string query = " delete from Menu where P_id = '" + AdminMenuUpdateDto.p_id + "'";

            sqlCommand = new SqlCommand(query, sqlConnection);
            sqlCommand.ExecuteNonQuery();
            sqlConnection.Close();
        }
示例#2
0
        public void UpdateItem(AdminMenuUpdateDTO AdminMenuUpdateDto)
        {
            sqlConnection.Open();
            string query = " update Menu set Name ='" + AdminMenuUpdateDto.name + "', Description = '" + AdminMenuUpdateDto.description + "', Status = '" + AdminMenuUpdateDto.status + "', Price_TK = '" + AdminMenuUpdateDto.price_tk + "', R_id = '" + AdminMenuUpdateDto.r_id + "' where P_id = '" + AdminMenuUpdateDto.p_id + "'";

            sqlCommand = new SqlCommand(query, sqlConnection);
            sqlCommand.ExecuteNonQuery();
            sqlConnection.Close();
        }
示例#3
0
        public void AddItem(AdminMenuUpdateDTO AdminUpdateDto)
        {
            string query = " insert into Menu(P_id,Name,Description,Status,Price_TK,R_id) values ('" + AdminUpdateDto.p_id + "','"
                           + AdminUpdateDto.name + "','"
                           + AdminUpdateDto.description + "','"
                           + AdminUpdateDto.status + "','"
                           + AdminUpdateDto.price_tk + "','"
                           + AdminUpdateDto.r_id + "')";

            sqlCommand = new SqlCommand(query, sqlConnection);
            sqlConnection.Open();
            sqlCommand.ExecuteNonQuery();
            sqlConnection.Close();
        }