Search Results

Search found 625 results on 25 pages for 'crud mucosa'.

Page 3/25 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • get Generic CRUD operation in EF

    - by kathy
    Hello, Is there any way or design pattern can I use to get Generic CRUD operations? Because I’m working on n-tire application using EF in the data layer and I don’t want to use CRUD Functions in Every Entities. Your help would be appreciated

    Read the article

  • EJB 3 Session Bean Design for Simple CRUD

    - by sdoca
    I am writing an application that's sole purpose in life is to do CRUD operations for maintaining records in database. There are relationships between some of the tables/entities. Most examples I've seen for creating session beans deals with complex business logic/operations that interact with many entities which I don't have. Since my application is so very basic, what would be the best design for the session bean(s)? I was thinking of having one session bean per entity which had CRUD the methods defined. Then I thought of combining all of those session beans into a single session bean. And then I found this blog entry which is intriguing, but I must admit I don't understand all of it (what is a ServiceFacade?). I'm leaning towards session bean/entity class, but would like to hear more experienced opinions. Thanks.

    Read the article

  • Using JSF, PrimeFaces and JPA: Create Basic WebApp without using Generated CRUD Classes, Forms, etc

    - by user2774489
    I am trying to build a basic CRUD application with NetBeans 7.4, JSF, PrimeFaces and JPA using MySQL. I have successfully done this by using the NetBeans wizards. I want to do this from scratch, no wizards. There seems to be a lack of support for the combo of JSF, PrimeFaces and JPA. When I say "lack", I mean a full example (I might be asking too much), without using the CRUD auto-gen templates/classes AND shows actual queries coded and passed to the datatables(primefaces). YouTube is full of non-English speaking examples using Hibernate (not JPA) and other examples that show flashy GUI's with no code. So far I understand you need an @Entity class (provides the physical build of the tables), a Controller (serializable) and the .xhtml web page to show the datatable.. what else? Also, I'm not seeing any posts or examples where queries are using with JPA/JSF and how they are tied together (in one place). I need to connect the dots here so that I can leverage JSF/JPA to create simple queries to populate my PF DataTables. I've read the blogs and I've googled the intranets until I'm blue in the face. Sending me a list of URL's to read to learn about each product is something I've already done. I get what they do independently, but am looking for the "How do they all connect" answer with maybe some basic code examples!! :)

    Read the article

  • Help a CRUD programmer think about an "approval workflow"

    - by gerdemb
    I've been working on a web application that is basically a CRUD application (Create, Read, Update, Delete). Recently, I've started working on what I'm calling an "approval workflow". Basically, a request is generated for a material and then sent for approval to a manager. Depending on what is requested, different people need to approve the request or perhaps send it back to the requester for modification. The approvers need to keep track of what to approve what has been approved and the requesters need to see the status of their requests. As a "CRUD" developer, I'm having a hard-time wrapping my head around how to design this. What database tables should I have? How do I keep track of the state of the request? How should I notify users of actions that have happened to their requests? Is their a design pattern that could help me with this? Should I be drawing state-machines in my code? I think this is a generic programing question, but if it makes any difference I'm using Django with MySQL.

    Read the article

  • Hibernate CRUD à la Ruby on Rails' Scaffolding

    - by schonarth
    Guys, Do you know of any tool that would do like Ruby on Rails' Scaffolding (create simple CRUD pages for any particular class to allow quickly populating a database with dummy data), only which used Java classes with Hibernate for database access, and JSP/JSF for the pages? It is a drag when you are programming one part of an application, but need data that can only be added with another part that is not ready yet, or very cumbersomely by directly inserting it into the DB.

    Read the article

  • What are some good design patterns for CRUD?

    - by Extrakun
    I am working with a number of data entities which can be created, read, updated and deleted, and I find myself writing more or less the same code for them. For example, I need to sometimes output data as JSON, and sometimes in a table format. I am finding myself writing 2 different types of view to export the data to. Also, the creation of those entities within DB usually differs just by the SQL statements and the input parameters. I am thinking of creating a strategy pattern to represent different 'contexts'. For example, the read() method of an AJAX context will be to return the data as JSON. However, I wonder if others have deal with this problem beforehand and will like to know what design patterns are usually use for CRUD operations.

    Read the article

  • A controller problem using a base CRUD model

    - by rkj
    In CodeIgniter I'm using a base CRUD My_model, but I have this small problem in my browse-controller.. My $data['posts'] gets all posts from the table called "posts". Though the author in that table is just a user_id, which is why I need to use my "getusername" function (gets the username from a ID - the ID) to grab the username from the users table. Though I don't know how to proceed from here, since it is not just one post. Therefore I need the username to either be a part of the $data['posts'] array or some other smart solution. Anyone who can help me out? function index() { $this->load->model('browse_model'); $data['posts'] = $this->browse_model->get_all(); $data['user'] = $this->browse_model->getusername(XX); $this->load->view('header'); $this->load->view('browse/index', $data); $this->load->view('footer'); }

    Read the article

  • VS2008 EF and non crud SP usage.

    - by SteveO
    Using an edmx version of EF. My returned data is a join between tables that has a COMPOUND filter on the primary table. In essence this query is going to return a SEGMENT of Law codes and descriptions that a user can tie to a Sex Offender report. I have a complex SP because Linq2SQL cannot pass in a between statement, or at least that is how I understand the error. The Code itself is broken up by '-' marks. 39-13-504 "Aggravated Sexual Battery" User wants to have a query with 4 parmas 39, 13, 500, 599. Get all codes from Title 39 and Chapter 13 with parts between 500 and 599. I have the SP in place to do the work, is there are way to consume the SP within the EF? I find many blogs about SPs with CRUD operations as their use of an SP. That doesn't fit this need at all. I do not have a single table but a join to the "prior selections" table that maps the key for the code. Any pointers on how to get a READ with an SP? TIA

    Read the article

  • Android - Basic CRUD (REST/RPC client) to remote server

    - by bsreekanth
    There are lot of discussion about REST client implementation in android, based on the talk at GoogleIO 2010, by Virgil Dobjanschi. My requirement may not necessarily involved, as I have some freedom to choose the configuration. I only target tablets configuration changes can be prevented if no other easy way (fix at Landscape mode etc) I am trying to achieve. Basic CRUD operation to my server (JSON RPC/ REST). Basically mimic an ajax request from android app (no webview, need native app) Based on the above mentioned talk, and some reading I see these options. Implement any of the 3 mentioned in the Google IO talk Especially, the last pattern may be more suitable as I don't care much of caching. But not sure how "real time" is sync implementation. Use HTTP request in AsyncTask. Simplest, but need to avoid re-sending request during change in device configuration (orientation change etc). Even if I fix at one orientation, recreation of activity still happens. So need to handle it elegantly. Use service to handle http request. So far, it say use service for long ruiing request. Not sure whether it is a good approach for simple GET/POST/PUt requests. Please share your experience on what could be the best way.

    Read the article

  • [jQuery] What would be the best way to perform a basic CRUD using AJAX

    - by rasouza
    I'm having trouble to make a simple CRUD in my site. I have a table of registries <table> <tbody> <?php foreach ($row as $reg) { ?> <tr <?php if ($reg['value'] < 0) { echo "class='error'"; } ?>> <td><?php echo $reg['creditor'] ?></td> <td><?php echo $reg['debtor'] ?></td> <td><?php echo $reg['reason'] ?></td> <td>R$ <?php echo number_format(abs($reg['value']), 2, ',', ' ')?></td> <td><a **href="<?php echo $this->baseUrl(); ?>/history/delete/id/<?php echo $reg['id']; ?>"** class="delete"><img src="http://192.168.0.102/libraries/css/blueprint/plugins/buttons/icons/cross.png" alt=""/></a></td> </tr> <?php } ?> </tbody> </table> which I would like to perform a simple delete in these rows using AJAX (preferenciably with jQuery). The question is: do I have to create a function in JS and add onmouseclick event in the HTML? is there a more consistent way for doing this, like adding $('.delete').click() directly in the js file? If so, how do I pass the row ID for the ajax function? What I really want is to know how to pass the row ID to $.ajax() jQuery function through a clean! way

    Read the article

  • Open Source ASP.NET Contact Management Application?

    - by davemackey
    I'm considering building a Church Management System (ChMS), essentially a CRM, but specifically tailored for churches. I've looked at several existing CRM and open source ChMS solutions but have not been satisfied with any of them. Before I start writing something from the ground up - I was wondering if anyone was aware of an open source asp.net application that might be a good fit for this project? Particularly, the application needs to perform CRUD and optimally allow for dynamic user-based creation/editing of fields associated with contacts etc.

    Read the article

  • grails set bean value from radio button

    - by Jeff Storey
    I'm somewhat new to grails (not groovy though) and I'm working on a sample CRUD application. The issue I'm trying to solve is how to set a property on a bean based on a radio button before I update it in the database. Is the Form Helper http://www.grails.org/plugin/form-helper plugin the way to go? Will the bean have its value set regardless of if the button is actually clicked by the user or if it is left at its default value? thanks, Jeff

    Read the article

  • Does Google app engine supports JDBC?

    - by Rakesh Juyal
    I have heard the Google App Engine[java] do not support JDBC and Hibernate. Is it true? If yes then how do we access the database in Google App Engine. Also, is there any [basic] sample application which can help me understand how to perform CRUD operations in GAE.

    Read the article

  • How do I delete files in a class?

    - by user3682906
    I want to have a CRUD management on my gallery but I have no idea how. I have searched the internet but I did not find what I was looking for. This is my class: class Gallery { public function renderImages($map) { $images = ""; foreach (glob($map ."*.{jpeg,jpg,png,gif}", GLOB_BRACE) as $image){ $images .= "<a href='".$image."' data-lightbox='afbeelding'><img src='".$image."' class='thumbnail'></img></a>"; } return $images; } } and this is my gallery: <div class="gallery"> <center> <a href="index.php">Back:</a> <style> body { margin:0; padding:0; background:#efefef; font-family: "Helvetica Neue", helvetica, arial, sans-serif; color: black; text-align:center; /* used to center div in IE */ } </style> <?php $gallery = new Gallery(); echo $gallery -> renderImages("../images/"); $connection = new DatabaseConnection(); $render = new RenderData(); $page = 1; if(isset($_GET['page'])) { $check = new CheckData(); if($check->PageCheck($_GET['page'])) { $page = $_GET['page']; } } ?> <table> <div id="Intro"> <tr> <td>Hieronder kan je uploaden.</td> </tr> </div> <tr> <td>Max. 500000000Bytes</td> </tr> <tr> <form action="pages/upload_file.php" method="post" enctype="multipart/form-data"> <td><label for="file">Filename:</label></td> </tr> <tr> <td><input type="file" name="file" id="file"></td> </tr> <tr> <td><input type="submit" name="submit" value="Submit"></td> </tr> <tr> <td><input type="submit" name="delete" value="Delete"></td> </tr> </form> </table> How do I make a CRUD management on this? I want to select the photo and then delete it from my computer. I hope you guys can help me out...

    Read the article

  • my Search method is coming up with all nulls

    - by Epic.Distortion
    Let me give a quick explanation. I took a 5 week course through a company on Java in July. They covered basic stuff, like console app, crud operations, mysql, and n-tier architecture. Since the course ended I didn't use it much because I went back to work, and other medical reasons surfaced....blah blah. I was told by the company to make a simple program to reflect what I learned. Turns out I retained very little. I decided to make a video game starage program. It would be used to stare your video games so you wouldn't have to search your bookcase(or how ever you store your games.) It is a basic console app using the crud operations with MYSQL. I can't get my search function to actually work. I have 2 layers a Presentation layer and a Logic layer. The search method allows them to search for a game by the title. when i bring run the program and use Search it only displays the title and the rest is null. here is my Presentation layer: private static Games SearchForGame() { Logic aref = new Logic(); Games g = new Games(); Scanner scanline = new Scanner(System.in); System.out.println("Please enter the name of the game you wish to find:"); g.setTitle(scanline.nextLine()); aref.SearchGame(); System.out.println(); System.out.println("Game Id: " + g.getGameId()); System.out.println("Title: " + g.getTitle()); System.out.println("Rating: " + g.getRating()); System.out.println("Platform: "+ g.getPlatform()); System.out.println("Developer: "+ g.getDeveloper()); return g; } and here is my logic layer public Games SearchGame() { Games g = new Games(); try { Class.forName(driver).newInstance(); Connection conn = DriverManager.getConnection(url+dbName,userName,password); java.sql.PreparedStatement statement = conn.prepareStatement("SELECT GameId,Title,Rating,Platform,Developer FROM games WHERE Title=?"); statement.setString(1, g.getTitle()); ResultSet rs = statement.executeQuery(); while(rs.next()){ g.setGameId(rs.getInt("GameId")); g.setTitle(rs.getString("Title")); g.setRating(rs.getString("Rating")); g.setPlatform(rs.getString("Platform")); g.setDeveloper(rs.getString("Developer")); statement.executeUpdate(); } } catch (Exception e) { e.printStackTrace(); } return g; } here is also my last results Please enter the name of the game you wish to find: Skyrim Game Id: 0 Title: Skyrim Rating: null Platform: null Developer: null any help would be greatly appreciated and thanks in advance EDIT: here is my code for my games class public class Games { public int GameId; public String Title; public String Rating; public String Platform; public String Developer; public int getGameId() { return GameId; } public int setGameId(int gameId) { return GameId = gameId; } public String getTitle() { return Title; } public String setTitle(String title) { return Title = title; } public String getRating() { return Rating; } public void setRating(String rating) { Rating = rating; } public String getPlatform() { return Platform; } public void setPlatform(String platform) { Platform = platform; } public String getDeveloper() { return Developer; } public void setDeveloper(String developer) { Developer = developer; } }

    Read the article

  • Doing CRUD on XML using id attributes in C# ASP.NET

    - by Brandon G
    I'm a LAMP guy and ended up working this small news module for an asp.net site, which I am having some difficulty with. I basically am adding and deleting elements via AJAX based on the id. Before, I had it working based on the the index of a set of elements, but would have issues deleting, since the index would change in the xml file and not on the page (since I am using ajax). Here is the rundown news.xml <?xml version="1.0" encoding="utf-8"?> <news> <article id="1"> <title>Red Shield Environmental implements the PARCSuite system</title> <story>Add stuff here</story> </article> <article id="2"> <title>Catalyst Paper selects PARCSuite for its Mill-Wide Process...</title> <story>Add stuff here</story> </article> <article id="3"> <title>Weyerhaeuser uses Capstone Technology to provide Control...</title> <story>Add stuff here</story> </article> </news> Page sending del request: <script type="text/javascript"> $(document).ready(function () { $('.del').click(function () { var obj = $(this); var id = obj.attr('rel'); $.post('add-news-item.aspx', { id: id }, function () { obj.parent().next().remove(); obj.parent().remove(); } ); }); }); </script> <a class="del" rel="1">...</a> <a class="del" rel="1">...</a> <a class="del" rel="1">...</a> My functions protected void addEntry(string title, string story) { XmlDocument news = new XmlDocument(); news.Load(Server.MapPath("../news.xml")); XmlAttributeCollection ids = news.Attributes; //Create a new node XmlElement newelement = news.CreateElement("article"); XmlElement xmlTitle = news.CreateElement("title"); XmlElement xmlStory = news.CreateElement("story"); XmlAttribute id = ids[0]; int myId = int.Parse(id.Value + 1); id.Value = ""+myId; newelement.SetAttributeNode(id); xmlTitle.InnerText = this.TitleBox.Text.Trim(); xmlStory.InnerText = this.StoryBox.Text.Trim(); newelement.AppendChild(xmlTitle); newelement.AppendChild(xmlStory); news.DocumentElement.AppendChild(newelement); news.Save(Server.MapPath("../news.xml")); } protected void deleteEntry(int selectIndex) { XmlDocument news = new XmlDocument(); news.Load(Server.MapPath("../news.xml")); XmlNode xmlnode = news.DocumentElement.ChildNodes.Item(selectIndex); xmlnode.ParentNode.RemoveChild(xmlnode); news.Save(Server.MapPath("../news.xml")); } I haven't updated deleteEntry() and you can see, I was using the array index but need to delete the article element based on the article id being passed. And when adding an entry, I need to set the id to the last elements id + 1. Yes, I know SQL would be 100 times easier, but I don't have access so... help?

    Read the article

  • Factory pattern vs ease-of-use?

    - by Curtis White
    Background, I am extending the ASP.NET Membership with custom classes and extra tables. The ASP.NET MembershipUser has a protected constructor and a public method to read the data from the database. I have extended the database structure with custom tables and associated classes. Instead of using a static method to create a new member, as in the original API: I allow the code to instantiate a simple object and fill the data because there are several entities. Original Pattern #1 Protected constructor > static CreateUser(string mydata, string, mydata, ...) > User.Data = mydata; > User.Update() My Preferred Pattern #2 Public constructor > newUser = new MembershipUser(); > newUser.data = ... > newUser.ComplextObject.Data = ... > newUser.Insert() > newUser.Load(string key) I find pattern #2 to be easier and more natural to use. But method #1 is more atomic and ensured to contain proper data. I'd like to hear any opinions on pros/cons. The problem in my mind is that I prefer a simple CRUD/object but I am, also, trying to utilize the underlying API. These methods do not match completely. For example, the API has methods, like UnlockUser() and a readonly property for the IsLockedOut

    Read the article

  • Unit Testing & Fake Repository implementation with cascading CRUD operations

    - by Erik Ashepa
    Hi, i'm having trouble writing integration tests which use a fake repository, For example : Suppose I have a classroom entity, which aggregates students... var classroom = new Classroom(); classroom.Students.Add(new Student("Adam")); _fakeRepository.Save(classroom); _fakeRepostiory.GetAll<Student>().Where((student) => student.Name == "Adam")); // This query will return null... When using my real implementation for repository (NHibernate based), the above code works (because the save operation would cascade to the student added at the previous line), Do you know of any fake repository implementation which support this behaviour? Ideas on how to implement one myself? Or do you have any other suggestions which could help me avoid this issue? Thanks in advance, Erik.

    Read the article

  • Specification: Use cases for CRUD

    - by Mario Ortegón
    I am writing a Product requirements specification. In this document I must describe the ways that the user can interact with the system in a very high level. Several of these operations are "Create-Read-Update-Delete" on some objects. The question is, when writing use cases for these operations, what is the right way to do so? Can I write only one Use Case called "Manage Object x" and then have these operations as included Use Cases? Or do I have to create one use case per operation, per object? The problem I see with the last approach is that I would be writing quite a few pages that I feel do not really contribute to the understanding of the problem. What is the best practice?

    Read the article

  • Do I really need bindParam?

    - by sandelius
    Hi there! I'm trying to do a little PDO CRUD to learn some PDO. I have a question about bindParam. Here's my update method right now: public static function update($conditions = array(), $data = array(), $table = '') { self::instance(); // Late static bindings (PHP 5.3) $table = ($table === '') ? self::table() : $table; // Check which data array we want to use $values = (empty($data)) ? self::$_fields : $data; $sql = "UPDATE $table SET "; foreach ($values as $f => $v) { $sql .= "$f = ?, "; } // let's build the conditions self::build_conditions($conditions); // fix our WHERE, AND, OR, LIKE conditions $extra = self::$condition_string; // querystring $sql = rtrim($sql, ', ') . $extra; // let's merge the arrays into on $v_val = array_values($values); $c_val = array_values($conditions); $array = array_merge($v_val, self::$condition_array); $stmt = self::$db->prepare($sql); return $stmt->execute($array); } in my "self::$condition_array" I get all the right values from the ?. SO the query looks like this: UPDATE table SET this = ?, another = ? WHERE title = ? AND time = ? as you can see I dont use bindParams instead I pass the right values in the right order ($array) directly into the execute($array) method. This works like a charm BUT is it safe not use use bindParam here? If not then how can I do it? Thanks from Sweden Tobias

    Read the article

  • How to handle update events on a ASP.NET GridView?

    - by Bogdan M
    Hello, This may sound silly, but I need to find out how to handle an Update event from a GridView. First of all, I have a DataSet, where there is a typed DataTable with a typed TableAdapter, based on a "select all query", with auto-generated Insert, Update, and Delete methods. Then, in my aspx page, I have an ObjectDataSource related to my typed TableAdapter on Select, Insert, Update and Delete methods. Finnally, I have a GridView bound to this ObjectDataSource, with default Edit, Update and Cancel links. How should I implement the edit functionality? Should I have something like this? protected void GridView_RowEditing(object sender, GridViewEditEventArgs e) { using(MyTableAdapter ta = new MyTableAdapter()) { ta.Update(...); TypedDataTable dt = ta.GetRecords(); this.GridView.DataSource = dt; this.GridView.DataBind(); } } In this scenario, I have the feeling that I update some changes to the DB, then I retrive and bind all the data, and not only the modified parts. Is there any way to update only the DataSet, and this to update on his turn the DataBase and the GridView? I do not want to retrive all the data after a CRUD operations is performed, I just want to retrive the changes made. Thanks. PS: I'm using .NET 3.5 and VS 2008 with SP1.

    Read the article

  • Do I really ned bindParam?

    - by sandelius
    Hi there! I'm trying to do a little PDO CRUD to learn some PDO. I have a question about bindParam. Here's my update method right now: public static function update($conditions = array(), $data = array(), $table = '') { self::instance(); // Late static bindings (PHP 5.3) $table = ($table === '') ? self::table() : $table; // Check which data array we want to use $values = (empty($data)) ? self::$_fields : $data; $sql = "UPDATE $table SET "; foreach ($values as $f => $v) { $sql .= "$f = ?, "; } // let's build the conditions self::build_conditions($conditions); // fix our WHERE, AND, OR, LIKE conditions $extra = self::$condition_string; // querystring $sql = rtrim($sql, ', ') . $extra; // let's merge the arrays into on $v_val = array_values($values); $c_val = array_values($conditions); $array = array_merge($v_val, self::$condition_array); $stmt = self::$db->prepare($sql); return $stmt->execute($array); } in my "self::$condition_array" I get all the right values from the ?. SO the query looks like this: UPDATE table SET this = ?, another = ? WHERE title = ? AND time = ? as you can see I dont use bindParams instead I pass the right values in the right order ($array) directly into the execute($array) method. This works like a charm BUT is it safe not use use bindParam here? If not then how can I do it? Thanks from Sweden Tobias

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >