tag:blogger.com,1999:blog-68071635042954559172024-02-07T02:43:28.047-08:00 C Language, Java, Advance java with all framework,Android, iPhoneJava Strut,hibernate tutorial,best java example with source code,android tutorial,android interview question,iPhone all example,all c languages example,c languages project with source code,iPhone and android project free download.Unknownnoreply@blogger.comBlogger256125tag:blogger.com,1999:blog-6807163504295455917.post-53119890554829078522014-01-06T22:48:00.000-08:002014-01-06T22:48:27.146-08:00staff delete and update example<div dir="ltr" style="text-align: left;" trbidi="on">
#include<iostream.h><br />#include<string.h><br />class Staff{<br /> protected:<br /> char id[10];<br /> char name[20];<br /> long salary;<br /> public:<br /> void input();<br /> void output();<br /> long getSalary();<br /> long setSalary();<br />};<br />void Staff::input()<br /> {cout<<"Id: ";cin.seekg(0,ios::end);cin.get(id,10);<br /> cout<<"Name: ";cin>>name;<br /> cout<<"Salary: ";cin>>salary;<br /> }<br />void Staff::output()<br /> {cout<<id<<"\t"<<name<<"\t"<<salary<<"\t"<<endl;<br /> }<br />long Staff::setSalary()<br /> {return salary;<br /> }<br />long Staff::getSalary()<br /> {return salary;}<br />void deleteSalary(Staff s[],int n)<br /> {int sa;<br /> cout<<"Delte salary: ";cin>>sa;<br /> for(int i=0;i<n;i++)<br /> if(s[i].getSalary()==sa)<br /> { n=n-1;<br /> for(int j=i;j<n;j++)<br /> s[j]=s[j+1];<br /> i--;<br /> }<br /> cout<<"Id\tName\tSalary"<<endl;<br /> for(i=0;i<n;i++)<br /> {s[i].output();<br /> }<br /> }<br />void sortSalary(Staff s[],int n)<br /> {<br /> for(int i=0;i<n-1;i++)<br /> for(int j=i+1;j<n;j++)<br /> if(s[i].getSalary()>s[j].getSalary())<br /> {Staff tmp=s[i];<br /> s[i]=s[j];<br /> s[j]=tmp;<br /> }<br /> cout<<"Id\tName\tSalary"<<endl;<br /> for(i=0;i<n;i++)<br /> {s[i].output();<br /> }<br /> }<br />void updateSalary(Staff s[],int n)<br /> {int sa1;<br /> cout<<"Update Salary: ";cin>>sa1;<br /> for(int i=0;i<n;i++)<br /> if(s[i].getSalary()==sa1)<br /> {<br /> cout<<"New Salary: ";cin>>s[i].setSalary();<br /> }<br /> for(i=0;i<n;i++)<br /> {s[i].output();<br /> }<br /> }<br />void main()<br />{ Staff st[50];<br /> int n,sw;<br /> cout<<"Number of Staff: ";cin>>n;<br /> for(int i=0;i<n;i++)<br /> {st[i].input();<br /> }<br /> cout<<"Press '1' for Sorting Salary."<<endl;<br /> cout<<"Press '2' for Deleting salary."<<endl;<br /> cout<<"Press '3' for Update salary."<<endl;<br /> loop:<br /> cout<<"Please choose one of them: ";cin>>sw;<br /> switch(sw)<br /> { case 1: sortSalary(st,n);<br /> break;<br /> case 2: deleteSalary(st,n);<br /> break;<br /> case 3: updateSalary(st,n);<br /> break;<br /> default: cout<<"Please choose again."<<endl;<br /> goto loop;<br /> break;<br /> }<br />}</div>
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-6807163504295455917.post-48767124477008989922013-12-22T01:52:00.000-08:002013-12-22T01:52:41.382-08:00Odesk Seo Test Answers 2013-2014<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
1. Some words, when followed by a colon, have special meanings to yahoo. What is performed by the link:Operator?<br />
<br />
a. it shows all the outbound links from the url<br />
b. It shows how many pages of the site yahoo is pointing to<br />
c.It shows all the pages that point to that url<br />
d. It show url's with broken links<br />
<br />
answer: C<br />
<br />
2. Which blackhat Seo techniques is characterized by a method to deceive search engine, by detecting the search engine bot and "feeding" it with a different HTML code than the HTML actually served to users?<br />
<br />
a.Coaling<br />
b.Foisting<br />
c.Slighting<br />
d.Cloaking<br />
<br />
answer: D<br />
<br />
3. Why is it bad idea from SEO perspective to host free articles and write ups that are very common on the internet?<br />
<br />
a.Because they will not lead to fresh traffic<br />
b.Because you could be penalize by search engine for using duplicate contents<br />
c.Because you will not get the benefits of proper keyword targeting<br />
d.because people could turn up claiming copyright infirigement<br />
<br />
answer: B<br />
<br />
4. What will happen if you type the word 'Certification-Networking' in the google search box?<br />
<br />
a.Google will find the web pages about "certification" and also containing the word "networking"<br />
b.Google will find ALL the web pages containing the word word "Certification" and "Networking"<br />
c.Google will find ALL the web pages in which the words "Certification" and "Networking" appear together.<br />
d.Google will find the web pages about Certification that do not contain the word Networking<br />
<br />
answer: C<br />
<br />
5. Which of the following factors does google take into account while accessing whether or not a website is an authority website?<br />
<br />
a. The frequency with which the contents of the website is updated<br />
b. the number of web pages containing relevant information on the main theme of the website<br />
c.The number of in-bound natural links related to the website's theme (or keywords)<br />
d. None of the above<br />
<br />
answer: C<br />
<br />
<br />
6. What is keyword density?<br />
<br />
a.The number of times the keyword is used / (divided by) the total word count on page - (minus) the total words in HTML on the page<br />
b.The number of times the keyword is used x (multiply by) the total word count on page.<br />
c.The number of times the keyword is used in the page description<br />
d.The number of times the keyword is used in the page title<br />
e.The number of times the keyword is used / (divided by) the total word count on the page.<br />
<br />
answer: E<br />
<br />
7. Which of the following statement about FFA pages are true?<br />
<br />
a.They are greatly beneficial to SEO<br />
b.They are also called Link Farms<br />
c.They are Paid Listings<br />
d.They contain numerous inbound links<br />
<br />
answer: B<br />
<br />
8. What is the illegal act of copying of a page by unauthorized parties in order to filter off traffic to another site called?<br />
<br />
a.Traffic jacking<br />
b.Visitors Jacking<br />
c.View Jacking<br />
d. Page Jacking<br />
<br />
answer: D<br />
<br />
9. What is the most likely time period required for getting a google page ranking?<br />
<br />
a.1 week<br />
b. 3 weeks<br />
c. 1 month<br />
d. More than 3 months<br />
<br />
answer: D<br />
<br />
10. Which of the following can be termed as a good keyword selection and placement strategies?<br />
<br />
a.Targeting synonyms of the main keyword, A & D<br />
b.Targeting the highest searched keywords only<br />
c.Copying competitor keywords<br />
d.Optimizing 5 or more keywords per page (check)<br />
<br />
answer: A<br />
<br />
11. Some words, when followed by a colon, have special meanings to yahoo. What is perfermed by the link:Operator?<br />
<br />
a. it shows all the outbound links from the url<br />
b. It shows how many pages of the site yahoo is pointing to<br />
c. It shows all the pages that point to that url<br />
d. It show url's with broken links<br />
answer: C<br />
<br />
12. Which blackhat Seo techniques is characterized by a method to decieve search engine, by detecting the search engine bot and "feeding" it with a different HTML code than the HTML actually served to users?<br />
<br />
a.Coaling<br />
b.Foisting<br />
c.Slighting<br />
d.Cloaking<br />
<br />
answer: D<br />
<br />
13. Why is it bad idea from SEO perspective to host free articles and write ups that are very common on the internet?<br />
<br />
a.Because they will not lead to fresh traffic<br />
b.Because you could be penalize by search engine for using duplicate contents<br />
c.Because you will not get the benefits of proper keyword targeting<br />
d.because people could turn up claiming copyright infirigement<br />
<br />
answer: B<br />
<br />
14. What will happen if you type the word 'Certification-Networking' in the google search box?<br />
<br />
a.Google will find the web pages about "certification" and also containing the word "networking"<br />
b.Google will find ALL the web pages containing the word word "Certification" and "Networking"<br />
c.Google will find ALL the web pages in which the words "Certification" and "Networking" appear together.<br />
d.Google will find the web pages about Certification that do not contain the word Networking<br />
<br />
answer: C<br />
<br />
15. Which of the following factors does google take into account while accessing whether or not a website is an authority website?<br />
<br />
a. The frequency with which the contents of the website is updated<br />
b. the number of web pages containing relevant information on the main theme of the website<br />
c.The number of in-bound natural links related to the website's theme (or keywords)<br />
d. None of the above<br />
<br />
answer: C<br />
<br />
16. What is keyword density?<br />
<br />
a.The number of times the keyword is used / (divided by) the total word count on page - (minus) the total words in HTML on the page<br />
b.The number of times the keyword is used x (multiply by) the total word count on page.<br />
c.The number of times the keyword is used in the page description<br />
d.The number of times the keyword is used in the page title<br />
e.The number of times the keyword is used / (divided by) the total word count on the page.<br />
<br />
answer: E<br />
<br />
17. Which of the following statement about FFA pages are true?<br />
<br />
a.They are greatly beneficial to SEO<br />
b.They are also called Link Farms<br />
c.They are Paid Listings<br />
d.They contain numerous inbound links<br />
<br />
answer: B<br />
<br />
18. What is the illegal act of copying of a page by unauthorized parties in order to filter off traffic to another site called?<br />
<br />
a.Traffic jacking<br />
b.Visitors Jacking<br />
c.View Jacking<br />
d. Page Jacking<br />
<br />
answer:D<br />
<br />
19. What is the most likely time period required for getting a google page ranking?<br />
<br />
a.1 week<br />
b. 3 weeks<br />
c. 1 month<br />
d. More than 3 months<br />
<br />
answer: D<br />
<br />
20. Which of the following can be termed as a good keyword selection and placement strategies?<br />
<br />
a. Targeting synonyms of the main keyword (ans) A & D<br />
b.Targeting the highest searched keywords only<br />
c.Copying competitor keywords<br />
d*Optimizing 5 or more keywords per page (check)<br />
<br />
answer: D<br />
<br />
21. Google displays up to ------------------------ characters of a web pages title tag<br />
<br />
a.56<br />
b.60 * B & C<br />
c.66<br />
d.80<br />
<br />
answer: B<br />
<br />
22. Which of the following fact about Alexa are correct ?<br />
<br />
a.Alexa provides free data on relative website visitors traffic<br />
b. Alexa and Quancast provide information on visitors household income<br />
c.Alexa is baised towards US based traffic<br />
d.Quantcast only track people who have installed the quantcast toolbar<br />
<br />
answer: A<br />
<br />
23. What is the name of the search engine technology due to which a query for the word "actor" will aslo show search result for related word such as actress, acting or act?<br />
<br />
a.Spreading<br />
b.Dilating<br />
c.RSD (real time synonyms detection)<br />
d.Stemming<br />
e.Branching<br />
<br />
answer: D<br />
<br />
24.Do search engine such as google detect unnatural linking patterns by checking the class C IP address of the page where the link to the website originates<br />
<br />
a. Yes<br />
b. No<br />
<br />
answer: A<br />
<br />
25. Which of the following conditions will google treat favorably from the "Relevancy" perspective.<br />
<br />
a.The website offering product and services to the visitors country<br />
b.A website that provides Free content for related keywords<br />
c.Hidden keywords on the homepage matching search term<br />
d.Image alt tag on the homepage matching search term<br />
<br />
answer: B<br />
<br />
26. Which of the following website design guideline has been recommended by google?<br />
<br />
a.Having a clear hierachy and text links<br />
b.Every page should be reachable from atleast one static text link<br />
c.If the sitemap is larger than 100 or so links, you should break the sitemap into separate pages<br />
d.Keep the links on a given page to a reasonable number (fewer than 100)<br />
e. Use less than 30 images or graphics per page<br />
<br />
answer: A<br />
<br />
27. What is the main reason for the effectiveness of Optimizing a web page towards a long tails keyword search? Recheck<br />
<br />
a.There are more long tail searches than shorter keyword queries<br />
b.*Search engine often pass on long tail searches to lesser or new website<br />
c.Search engine do not pass on long tail search traffic to website that rank high for shorter keyword searches (check)<br />
d.There are fewer webvsite that have targeted such keyword's<br />
<br />
answer: <span class="Apple-tab-span" style="white-space: pre;"> </span>D<br />
<br />
28 Which of the following statement is correct with regard's to the images within a web page?<br />
<br />
a.Images can not be spidered by the search engine (check)<br />
b.Important keywords related to the image should be plcaed in the ALT text<br />
c.Images should always be kept close to the top of a web page<br />
d. Image maps should be used while including the images<br />
<br />
answer: B<br />
<br />
29. What does the 302 server Response Code signify?<br />
<br />
a.It signifies conflict, too many people wanting the same file at the same time<br />
b.The page has been permanently removed<br />
c.The method you are using to access the file is not allowed<br />
d.The page has temporarily moved<br />
e.What you requested is just too big to process<br />
<br />
answer: D<br />
<br />
<br />
30. State whether the following statement is true or false. A sitemap provide a list of natural links to user accessible pages on a website<br />
<br />
a.True<br />
b.False<br />
<br />
answer: B<br />
<br />
31. State whether true or false.<br />
The Yahoo Directory listing is a free service for commercial site?<br />
<br />
a.True<br />
b.False<br />
<br />
answer: A<br />
</div>
Unknownnoreply@blogger.com15tag:blogger.com,1999:blog-6807163504295455917.post-25687653143216363342013-12-20T03:40:00.000-08:002013-12-20T04:07:14.390-08:00login example using struts 2 and hibernate with mysql <div dir="ltr" style="text-align: left;" trbidi="on">
CREATE TABLE `login_master` (<br />
`login_id` int(10) NOT NULL,<br />
`login_name` varchar(30) NOT NULL,<br />
`login_password` varchar(30) NOT NULL,<br />
`hint_password` varchar(50) NOT NULL,<br />
`temp` varchar(30) NOT NULL,<br />
PRIMARY KEY (`login_id`)<br />
) ENGINE=MEMORY DEFAULT CHARSET=latin1;<br />
<br />
Login.jsp<br />
<br />
<%@taglib uri="/struts-tags" prefix="s"%><br />
<html><br />
<head><br />
<title>Login</title><br />
</head><br />
<body><br />
<h1>Login</h1><br />
<div id="login"><br />
<s:form action="Login" id="form1" method="post"><br />
<h2><br />
<p><s:textfield name="username" label="username" id="textfield" /></p><br />
<br><br />
<p><s:password name="password" label="password" id="textfield2"></s:password></p><br />
</h2><br />
<s:submit value="Authentification" /><br />
</s:form> <s:if test="hasActionErrors()"><br />
<s:div id="errror1" cssStyle="color:red "><br />
<p><s:actionerror /></p><br />
<br><br />
</s:div><br />
</s:if> <br clear="all" /></body><br />
</html><br />
<br />
struts.xml<br />
<br />
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"><br />
<struts><br />
<package name="default" extends="struts-default"><br />
<action name="Login" class="Action.LoginAction"><br />
<result name="Home">Login.jsp</result><br />
<result name="success">Home.html</result><br />
<result name="input">Login.jsp</result><br />
</action><br />
</package><br />
</struts> <br />
<br />
Action.java<br />
<br />
package Action;<br />
<br />
import java.util.Map;<br />
<br />
import org.apache.log4j.Logger;<br />
import org.apache.struts2.interceptor.SessionAware;<br />
<br />
import DAO.Logindao;<br />
import bean.Loginbean;<br />
import com.opensymphony.xwork2.ActionSupport;<br />
import com.opensymphony.xwork2.ModelDriven;<br />
<br />
public class LoginAction extends ActionSupport implements ModelDriven<Loginbean>,SessionAware{<br />
<br />
/**<br />
* <br />
*/<br />
private static final long serialVersionUID = 1L;<br />
Logger logger = Logger.getLogger(LoginAction.class);<br />
Loginbean bean=new Loginbean();<br />
private Map<String, Object> session = null;<br />
Logindao dao=new Logindao();<br />
boolean isValidat;<br />
<br />
public String execute()<br />
{<br />
if(dao.find(bean.getUsername(),bean.getPassword()))<br />
<br />
return "success";<br />
<br />
else<br />
<br />
this.addActionError("The username or password is incorrect."); <br />
return "Home";<br />
}<br />
<br />
public String Logout()<br />
{<br />
<br />
return "Logout";<br />
}<br />
<br />
public Loginbean getModel()<br />
{<br />
return bean;<br />
}<br />
public void setSession(Map<String, Object> session) {<br />
this.session = session;<br />
}<br />
public Map<String, Object> getSession() {<br />
return session;<br />
}<br />
<br />
}<br />
<br />
<br />
<br />
<br />
<br />
Loginbean.java<br />
<br />
package bean;<br />
<br />
public class Loginbean {<br />
private String username;<br />
private String password;<br />
<br />
<br />
public String getUsername() {<br />
return username;<br />
}<br />
public void setUsername(String username) {<br />
this.username = username;<br />
}<br />
public String getPassword() {<br />
return password;<br />
}<br />
public void setPassword(String password) {<br />
this.password = password;<br />
}<br />
}<br />
<br />
Logindao.java<br />
<br />
package DAO;<br />
<br />
import java.util.Iterator;<br />
import java.util.List;<br />
import master.LoginMaster;<br />
import org.hibernate.Query;<br />
import org.hibernate.Session;<br />
import util.HibernateUtil;<br />
<br />
public class Logindao{<br />
<br />
Session session;<br />
<br />
@SuppressWarnings("unchecked")<br />
public boolean find(String name, String password) {<br />
session = HibernateUtil.getSession(); <br />
String SQL_QUERY= " from LoginMaster u where u.loginName='" + name + "' and u.loginPassword='" + password + "'";<br />
<br />
System.out.println(SQL_QUERY);<br />
Query query = session.createQuery(SQL_QUERY);<br />
Iterator<LoginMaster> it = query.iterate();<br />
List<LoginMaster> list = query.list();<br />
if (list.size() > 0) {<br />
session.close();<br />
return true;<br />
}<br />
session.close();<br />
return false;<br />
<br />
}<br />
}<br />
<br />
HibernateUtil.java<br />
<br />
package util;<br />
import org.hibernate.Session;<br />
import org.hibernate.SessionFactory;<br />
import org.hibernate.cfg.AnnotationConfiguration;<br />
import org.hibernate.cfg.Configuration;<br />
<br />
public class HibernateUtil {<br />
private static SessionFactory sessionFactory;<br />
<br />
public static void createSessionFactory() {<br />
sessionFactory = new Configuration().configure().buildSessionFactory();<br />
System.out.println("Value of sessionFactory is==="+sessionFactory);<br />
}<br />
<br />
public static Session getSession() {<br />
return sessionFactory.openSession();<br />
}<br />
<br />
}<br />
<br />
Struts2dispatcher.java<br />
<br />
package util;<br />
<br />
<br />
import javax.servlet.FilterConfig;<br />
import javax.servlet.ServletException;<br />
<br />
import org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter;<br />
import org.hibernate.HibernateException;<br />
public class Struts2dispatcher extends StrutsPrepareAndExecuteFilter{<br />
<br />
public void init(FilterConfig filterConfig) throws ServletException {<br />
super.init(filterConfig);<br />
try {<br />
HibernateUtil.createSessionFactory();<br />
System.out.println("application initializing successfully");<br />
} catch (HibernateException e) {<br />
throw new ServletException(e);<br />
}<br />
<br />
}<br />
<br />
}<br />
<br />
hibernate.cfg.xml <br />
<?xml version='1.0' encoding='utf-8'?><br />
<!DOCTYPE hibernate-configuration PUBLIC<br />
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"<br />
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><br />
<hibernate-configuration><br />
<session-factory><br />
<property name="connection.driver_class">com.mysql.jdbc.Driver</property><br />
<property name="connection.url">jdbc:mysql://localhost:330/LoginMasterdatabase</property><br />
<property name="connection.username">root</property><br />
<property name="connection.password">root</property><br />
<property name="connection.pool_size">1</property><br />
<property name="dialect">org.hibernate.dialect.MySQLDialect</property><br />
<property name="current_session_context_class">thread</property><br />
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property><br />
<property name="show_sql">true</property><br />
<property name="hbm2ddl.auto">validate</property<br />
<mapping resource="master/LoginMaster.hbm.xml" /><br />
</session-factory><br />
</hibernate-configuration><br />
<br />
<br />
<br />
<br />
<br />
<br />
LoginMaster.java<br />
<br />
package master;<br />
<br />
<br />
/**<br />
* LoginMaster generated by hbm2java<br />
*/<br />
public class LoginMaster implements java.io.Serializable {<br />
<br />
private int loginId;<br />
private String loginName;<br />
private String loginPassword;<br />
private String hintPassword;<br />
private String temp;<br />
<br />
public LoginMaster() {<br />
}<br />
<br />
public LoginMaster(int loginId, String loginName, String loginPassword,<br />
String hintPassword, String temp) {<br />
this.loginId = loginId;<br />
this.loginName = loginName;<br />
this.loginPassword = loginPassword;<br />
this.hintPassword = hintPassword;<br />
this.temp = temp;<br />
}<br />
<br />
public int getLoginId() {<br />
return this.loginId;<br />
}<br />
<br />
public void setLoginId(int loginId) {<br />
this.loginId = loginId;<br />
}<br />
<br />
public String getLoginName() {<br />
return this.loginName;<br />
}<br />
<br />
public void setLoginName(String loginName) {<br />
this.loginName = loginName;<br />
}<br />
<br />
public String getLoginPassword() {<br />
return this.loginPassword;<br />
}<br />
<br />
public void setLoginPassword(String loginPassword) {<br />
this.loginPassword = loginPassword;<br />
}<br />
<br />
public String getHintPassword() {<br />
return this.hintPassword;<br />
}<br />
<br />
public void setHintPassword(String hintPassword) {<br />
this.hintPassword = hintPassword;<br />
}<br />
<br />
public String getTemp() {<br />
return this.temp;<br />
}<br />
<br />
public void setTemp(String temp) {<br />
this.temp = temp;<br />
}<br />
<br />
}<br />
<br />
<br />
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-46983276068082322442013-12-19T04:36:00.003-08:002013-12-21T01:28:19.827-08:00 how to create a simple Gujarati or any language web application in struts2 and hibernate with mysql <div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>GU</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]-->
<br />
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;"> </span></span><span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">whenever we create a simple jsp page or html file the default char set is
'ISO'</span><span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"> like <%@ page language="java" contentType="text/html;
charset=ISO-8859-1"<span style="mso-spacerun: yes;"> </span>pageEncoding="ISO-8859-1"%></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">Because it treats English is the standard language for developing a web
application.</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">So in order to make language specific application first we need to change
the charset from ex: charset=ISO-8859-1 to charset="UTF-8".</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">Now I am going to create a simple application having text box is an input
field to enter text in any language store it in the database and displays on
the same web page.</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";"> </span><span style="font-family: "Courier New";"> </span>
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";">CREATE TABLE `student_master` (</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";"><span style="mso-spacerun: yes;">
</span>`student_id` int(20) NOT NULL auto_increment,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";"><span style="mso-spacerun: yes;">
</span>`student_fname` varchar(20) character set utf8 default NULL,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";"><span style="mso-spacerun: yes;">
</span>`student_mname` varchar(30) character set utf8 default NULL,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";"><span style="mso-spacerun: yes;">
</span>`student_lname` varchar(30) character set utf8 default NULL,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";"><span style="mso-spacerun: yes;">
</span>`student_p_add` varchar(70) character set utf8 default NULL,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";"><span style="mso-spacerun: yes;"> </span>`status`
tinyint(1) default NULL,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";"><span style="mso-spacerun: yes;">
</span>`temp6` varchar(40) character set utf8 default NULL,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";"><span style="mso-spacerun: yes;">
</span>PRIMARY KEY<span style="mso-spacerun: yes;"> </span>(`student_id`)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New";">) ENGINE=MEMORY<span style="mso-spacerun: yes;"> </span>DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">Studentform.jsp</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: #bf5f3f; font-family: "Courier New"; font-size: 10.0pt;"><%@</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #3f7f7f;">page</span>
<span style="color: #7f007f;">pageEncoding</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"UTF-8"</span></i><span style="color: #bf5f3f;">%></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: #bf5f3f; font-family: "Courier New"; font-size: 10.0pt;"><%@</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">taglib</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">uri</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"/struts-tags"</span></i>
<span style="color: #7f007f;">prefix</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"s"</span></i><span style="color: #bf5f3f;">%></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: #bf5f3f; font-family: "Courier New"; font-size: 10.0pt;"><%@</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #3f7f7f;">taglib</span>
<span style="color: #7f007f;">prefix</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"sj"</span></i> <span style="color: #7f007f;">uri</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"/struts-jquery-tags"</span></i><span style="color: #bf5f3f;">%></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><!</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">doctype</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: teal;">html></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">html</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">lang</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"en"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">head</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;"> </span><meta
http-equiv="Content-Language" content="hi"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;"> </span><meta
http-equiv="Content-Type" content="text/html;
charset=UTF-8"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;"> </span></head></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;"> </span><body></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span><</span><u><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">header</span></u><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: teal;"><</span><span style="color: #3f7f7f;">h3</span><span style="color: teal;">></span></span><span lang="GU" style="color: black; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">વિદ્યાર્થી</span><span lang="GU" style="color: black; font-family: "Shruti","sans-serif"; font-size: 10.0pt; mso-ascii-font-family: "Courier New"; mso-hansi-font-family: "Courier New";"> </span><span lang="GU" style="color: black; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">રજીસ્ટ્રેશન</span><span lang="GU" style="color: black; font-family: "Shruti","sans-serif"; font-size: 10.0pt; mso-ascii-font-family: "Courier New"; mso-hansi-font-family: "Courier New";"> </span><span lang="GU" style="color: black; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">ફોર્મ</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">h3</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <u><span style="color: teal;"><</span></u><span style="color: teal;">/</span><span style="color: #3f7f7f;">header</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">div</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"tablesorter"</span></i>
<span style="color: #7f007f;">style</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"font-style:inherit;font-size:15px;font-variant:inherit;font-style:
inherit;font-weight: normal;color:#2C333D;background-color: #E5E5E5 "</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">center</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">s:form</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">action</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"addStudent!addStudentdata.action"</span></i><span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"student"</span></i> <span style="color: #7f007f;">enctype</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"multipart/form-data"</span></i><span style="mso-spacerun: yes;"> </span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">table</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">tr</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">align</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"left"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">s:textfield</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"FirstName"</span></i>
<span style="color: #7f007f;">label</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">નામ</span></i><i><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt;">"</span></i><span style="font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span><span style="color: #7f007f;">size</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"25"</span></i>
<span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"my"</span></i><span style="color: teal;">/></span><span style="color: black;"><span style="mso-tab-count: 1;"> </span></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">align</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"right"</span></i>
<span style="color: #7f007f;">colspan</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"1"</span></i><span style="color: teal;">></span><span style="color: black;"><span style="mso-tab-count: 1;"> </span></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">s:textfield</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"MiddleName"</span></i>
<span style="color: #7f007f;">label</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">પિતા</span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; mso-ascii-font-family: "Courier New"; mso-hansi-font-family: "Courier New";"> </span></i><i><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt;">/ </span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">પતિ</span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; mso-ascii-font-family: "Courier New"; mso-hansi-font-family: "Courier New";"> </span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">નામ</span></i><i><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt;">"</span></i><span style="font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span><span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"target"</span></i>
<span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"my"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">s:textfield</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">tr</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">tr</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">s:textfield</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"LastName"</span></i>
<span style="color: #7f007f;">label</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">અટક</span></i><i><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt;">"</span></i><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"my"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">s:textfield</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">tr</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">tr</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">s:textfield</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"permanentAddress"</span></i><span style="color: #7f007f;">label</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">કાયમી</span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; mso-ascii-font-family: "Courier New"; mso-hansi-font-family: "Courier New";"> </span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">સરનામું</span></i><i><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt;">"</span></i><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"my"</span></i><span style="color: teal;">/></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">tr</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">tr</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">align</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"left"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;">
</span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="font-family: "Courier New"; font-size: 10.0pt;">
<span style="color: #7f007f;">height</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">""</span></i> <span style="color: #7f007f;">colspan</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"2"</span></i>
<span style="color: #7f007f;">align</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"left"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">s:textfield</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"Phonenumber"</span></i><span style="mso-tab-count: 1;"> </span><span style="color: #7f007f;">label</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">ફોન</span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; mso-ascii-font-family: "Courier New"; mso-hansi-font-family: "Courier New";"> </span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">નંબર</span></i><i><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt;">"</span></i><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"my"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">s:textfield</span><span style="color: teal;">></span><span style="color: black;"> </span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">tr</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">tr</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">align</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"center"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;">
</span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="font-family: "Courier New"; font-size: 10.0pt;">
<span style="color: #7f007f;">height</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"47"</span></i> <span style="color: #7f007f;">colspan</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"2"</span></i>
<span style="color: #7f007f;">align</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"center"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">s:submit</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">value</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">સાચવો</span></i><i><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt;">"</span></i><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"userSave"</span></i>
<span style="color: #7f007f;">theme</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"simple"</span></i> <span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"colorsubmit"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">s:submit</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-spacerun: yes;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">s:submit</span><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"colorsubmit"</span></i>
<span style="color: #7f007f;">value</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">રદ</span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; mso-ascii-font-family: "Courier New"; mso-hansi-font-family: "Courier New";"> </span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt;">કરો</span></i><i><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt;">"</span></i><span style="font-family: "Courier New"; font-size: 10.0pt;"> <span style="color: #7f007f;">theme</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"simple"</span></i><span style="color: teal;">/></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span><span style="mso-spacerun: yes;">
</span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">td</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span></span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">tr</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">table</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">s:form</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt;"> </span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">center</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">div</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt;">body</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt;">></span><span style="font-family: "Courier New"; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%;"></</span><span style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%;">html</span><span style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%;">></span><span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">Now I have defined the charset is "UTF-8" which is essential for
any language.Now the form tag contains one text box to enter text.We need to
define a accept-charset attribute of form tag to "UTF-8" to send the
request to server in hindi language.</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">Now if the method attribute of form tag is "Get" then we need to
specify request.setCharacterEncoding("UTF-8") in our Action class.
and If we are using "POST" method means request is in the body then
we need to add the attribute URIEncoding="UTF-8" in the server.xml
file of tomcat which is in the conf directory.</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">for Ex:</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;"> </span><Connector port="8080"
maxHttpHeaderSize="8192"</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;">
</span>maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;">
</span>enableLookups="false" redirectPort="8443"
acceptCount="100"</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;">
</span>connectionTimeout="20000"
disableUploadTimeout="true" URIEncoding="UTF-8" /></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">struts.xml</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><?</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">xml</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">version</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"1.0"</span></i> <span style="color: #7f007f;">encoding</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"iso-8859-1"</span></i><span style="color: teal;">?></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><!</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">DOCTYPE</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: teal;">struts</span> <span style="color: grey;">PUBLIC</span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">"-//Apache
Software Foundation//DTD Struts Configuration 2.0//EN"</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">"<a href="http://struts.apache.org/dtds/struts-2.0.dtd"><span style="color: blue;">http://struts.apache.org/dtds/struts-2.0.dtd</span></a>"</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">struts</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-spacerun: yes;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">package</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"default"</span></i> <span style="color: #7f007f;">extends</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"struts-default"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">action</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"addStudent"</span></i>
<span style="color: #7f007f;">class</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"Action.StudentAction"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">result</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"Home"</span></i><span style="color: teal;">></span><span style="color: black;">studentregistration.jsp</span><span style="color: teal;"></</span><span style="color: #3f7f7f;">result</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">result</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"success"</span></i><span style="color: teal;">></span></span><span style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%;">studentview</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.jsp</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">result</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">action</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">package</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">struts</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">StudentAction.java</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">package Action;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
java.util.List;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
java.util.Map;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
javax.servlet.http.HttpServletRequest;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
org.apache.log4j.Logger;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
org.apache.struts.action.ActionMessages;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
org.apache.struts2.interceptor.ServletRequestAware;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
org.apache.struts2.interceptor.SessionAware;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
service.studentservice;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
master.StudentMaster;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
DAO.studentdao;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
bean.StudentBean;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
com.opensymphony.xwork2.ActionSupport;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import
com.opensymphony.xwork2.ModelDriven;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public class
StudentAction<span style="mso-spacerun: yes;"> </span>extends ActionSupport
implements ModelDriven<StudentBean>,ServletRequestAware,SessionAware {</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>boolean insert = false;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>StudentBean sbean=new StudentBean();</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>studentdao sdao=new studentdao();</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>StudentMaster studentmaster=new
StudentMaster();</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>List<StudentMaster>
liststudent; </span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>private Map<String, Object>
ses;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>HttpServletRequest request;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span><span style="mso-tab-count: 1;"> </span>boolean
isinsert=false;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>Logger logger =
Logger.getLogger(StudentAction.class);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>public String addStudentdata()throws
Exception{</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>System.out.println("Inside
addStudent()....");</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>try{</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 4;"> </span><span style="mso-spacerun: yes;"> </span>isinsert = studentservice.addstudent(sbean);</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 4;"> </span>if(isinsert){</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>addActionMessage("Student
details add successfully"); <span style="mso-tab-count: 3;"> </span><span style="mso-tab-count: 1;"> </span>getStudentList();</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 4;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 4;"> </span>else{</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 5;"> </span>addActionError("error:001");</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 4;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>}catch (Exception e) {</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 4;"> </span>e.printStackTrace();</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>return "success";</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>public String getStudentList()throws
Exception{</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>try {<span style="mso-tab-count: 2;"> </span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 4;"> </span>liststudent =
sdao.getstudent();</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 4;"> </span>ses.put("liststudent",liststudent);<span style="mso-tab-count: 3;"> </span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>} catch (Exception e) {</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 4;"> </span>e.printStackTrace();</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>return "view";</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>public StudentBean getModel() {</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>// TODO Auto-generated method
stub</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>return sbean;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>public void
setServletRequest(HttpServletRequest req) {</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>// TODO Auto-generated method
stub</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>this.request=req;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>public void
setSession(Map<String, Object> ses) {</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>// TODO Auto-generated method
stub</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>this.ses=ses;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>public HttpServletRequest
getHttpServletRequest() {</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>return request;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>public Map<String, Object>
getSes() {</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>return ses;</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">StudentBean.java</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">package</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> bean;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> java.util.Date;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">class</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> StudentBean<span style="mso-spacerun: yes;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">implements</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
java.io.Serializable{</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="color: #3f5fbf; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">/**</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: #3f5fbf; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>* </span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: #3f5fbf; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>*/</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">private</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">static</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">final</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">long</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><i><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">serialVersionUID</span></i><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> =
1L;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">private</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">studid</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">private</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">int</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">studentid</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">private</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">FirstName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">private</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">MiddleName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;<span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">private</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">LastName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">private</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">Phonenumber</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">private</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">permanentAddress</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String
getMotherName() {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">return</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">MotherName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">void</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> setMotherName(String motherName) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">MotherName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> =
motherName;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String
getPhonenumber() {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">return</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">Phonenumber</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">void</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> setPhonenumber(String phonenumber) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">Phonenumber</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> =
phonenumber;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String
getFirstName() {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">return</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">FirstName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">void</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> setFirstName(String firstName) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">FirstName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> =
firstName;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String
getMiddleName() {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">return</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">MiddleName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">void</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> setMiddleName(String middleName) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">MiddleName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> =
middleName;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String
getLastName() {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">return</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">LastName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">void</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> setLastName(String lastName) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">LastName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> =
lastName;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String
getPermanentAddress() {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">return</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">permanentAddress</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">void</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> setPermanentAddress(String permanentAddress) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">this</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.</span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">permanentAddress</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> = permanentAddress;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String
getFatherName() {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">return</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">FatherName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">void</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> setFatherName(String fatherName) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">FatherName</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> =
fatherName;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">studentservice.java</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">package</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> service;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> java.util.Map;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> org.apache.struts2.interceptor.SessionAware;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> DAO.studentdao;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> bean.StudentBean;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> master.StudentMaster;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">class</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> studentservice </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">implements</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> SessionAware {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>Map<String,Object> </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">ses</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">static</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">boolean</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
addstudent(StudentBean b) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">// </span><b><span lang="EN" style="color: #7f9fbf; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">TODO</span></b><span lang="EN" style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> Auto-generated
method stub</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>StudentMaster sm=</span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">new</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> StudentMaster();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>studentdao dao=</span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">new</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> studentdao();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">boolean</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
add=</span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">false</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">try</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">{</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>sm.setStudentFname(b.getFirstName());</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>sm.setStudentMname(b.getMiddleName());</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>sm.setStudentLname(b.getLastName());</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>sm.setStudentBdate(b.getBirthDate());</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>sm.setStatus(</span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">true</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">);</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>sm.setStudentPAdd(b.getPermanentAddress());</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>add=dao.addstudent(sm);</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>} </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">catch</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
(Exception e) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>e.printStackTrace();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">return</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
add;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%;"><span style="mso-tab-count: 2;"> </span>}</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">void</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> setSession(Map<String, Object> session) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">// </span><b><span lang="EN" style="color: #7f9fbf; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">TODO</span></b><span lang="EN" style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> Auto-generated
method stub</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">this</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.</span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">ses</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">=session;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%;">}</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%;">studentdao.java</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">package</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> DAO;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> java.util.List;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> java.util.Map;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> org.hibernate.Query;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> org.hibernate.Session;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> util.HibernateUtil;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> master.StudentMaster;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">import</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> bean.StudentBean;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">class</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> studentdao {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>Session </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> String </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">date</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">boolean</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> addstudent(StudentMaster studentmaster) </span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>{</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">boolean</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
isInserted = </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">false</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">try</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>{</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> =
HibernateUtil.<i>getSession</i>();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.beginTransaction();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.save(studentmaster);</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.getTransaction().commit();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.flush();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.close();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> =
</span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">null</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>isInserted = </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">true</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>} </span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">catch</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
(Exception e) </span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>{</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>e.printStackTrace();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">return</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
isInserted;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="color: #646464; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">@SuppressWarnings</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">(</span><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">"unchecked"</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">)</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">public</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
List<StudentMaster> getstudent() {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">// </span><b><span lang="EN" style="color: #7f9fbf; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">TODO</span></b><span lang="EN" style="color: #3f7f5f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> Auto-generated
method stub</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>List<StudentMaster>list = </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">null</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">try</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> =
HibernateUtil.<i>getSession</i>();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.beginTransaction();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.getTransaction().commit();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>Query query = </span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.createQuery(</span><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">" from StudentMaster"</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">);</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>list = query.list();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>System.</span><i><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">out</span></i><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.println(</span><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">"You Now in Student List"</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">);</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>System.</span><i><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">out</span></i><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.println(</span><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">"List Size : "</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">+list.size());</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #0000c0; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">session</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">.flush();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>} </span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">catch</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
(Exception e) {</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span>e.printStackTrace();</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span>}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><b><span lang="EN" style="color: #7f0055; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">return</span></b><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">
list;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span>}<span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">}</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">studentview.jsp</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: #bf5f3f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><%@</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #3f7f7f;">page</span> <span style="color: #7f007f;">pageEncoding</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"UTF-8"</span></i> <span style="color: #bf5f3f;">%></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: #bf5f3f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><%@</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #3f7f7f;">taglib</span> <span style="color: #7f007f;">prefix</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"s"</span></i> <span style="color: #7f007f;">uri</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"/struts-tags"</span></i><span style="color: #bf5f3f;">%></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: #bf5f3f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><%@</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #3f7f7f;">taglib</span> <span style="color: #7f007f;">uri</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"http://displaytag.sf.net"</span></i> <span style="color: #7f007f;">prefix</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"display"</span></i><span style="color: #bf5f3f;">%></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: #bf5f3f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><%@</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #3f7f7f;">taglib</span> <span style="color: #7f007f;">prefix</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"c"</span></i> <span style="color: #7f007f;">uri</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"http://java.sun.com/jsp/jstl/core"</span></i><span style="color: #bf5f3f;">%></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><!</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">doctype</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: teal;">html></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">html</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">lang</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"en"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">head</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">meta</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <u><span style="color: #7f007f;">charset</span></u><span style="color: black;">=</span><i><span style="color: #2a00ff;">"utf-8"</span></i> <span style="color: teal;">/></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">head</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">body</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><u><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">header</span></u><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">h3</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="GU" style="color: black; font-family: "Shruti","sans-serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">વિદ્યાર્થી</span><span lang="GU" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="GU" style="color: black; font-family: "Shruti","sans-serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">માહિતી</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">h3</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<u><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span></u><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">/</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">header</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">table</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">s:form</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">action</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"addStudent!getStudentList.action"</span></i>
<span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"studentview"</span></i> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"studentview"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">display:table</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"liststud"</span></i>
<span style="color: #7f007f;">list</span><span style="color: black;">=</span>"<span style="color: black;">${liststudent}</span>" <u><span style="color: #7f007f;">width</span></u><span style="color: black;">=</span><i><span style="color: #2a00ff;">"80%"</span></i>
<u><span style="color: #7f007f;">border</span></u><span style="color: black;">=</span><i><span style="color: #2a00ff;">"1"</span></i> <span style="color: #7f007f;">pagesize</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"8"</span></i>
<span style="color: #7f007f;">class</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">""</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">s:hidden</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">name</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"liststud.studentId"</span></i> <span style="color: #7f007f;">key</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"studentId"</span></i> <span style="color: #7f007f;">value</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"%{liststud.studentId}"</span></i><span style="color: teal;">/></span><span style="color: black;"><span style="mso-tab-count: 2;"> </span></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">display:column</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">title</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">નંબર</span></i><i><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">"</span></i><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="color: #bf5f3f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><%=</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">liststud_rowNum</span><span lang="EN" style="color: #bf5f3f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">%></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">display:column</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">display:column</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">title</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">નામ</span></i><i><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">"</span></i><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">property</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"studentFname"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">display:column</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">display:column</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">title</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">પિતા</span></i><i><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> / </span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">પતિ</span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">નામ</span></i><i><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">"</span></i><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">property</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"studentMname"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">display:column</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">display:column</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">title</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">અટક</span></i><i><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">"</span></i><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">property</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"studentLname"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">display:column</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">display:column</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">title</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"</span></i></span><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">કાયમી</span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span></i><i><span lang="GU" style="color: #2a00ff; font-family: "Shruti","sans-serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">સરનામું</span></i><i><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">"</span></i><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">property</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"studentPAdd"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">display:column</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">display:column</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">title</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"Action"</span></i><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">img</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">src</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"images/icn_edit.png"</span></i>
<span style="color: #7f007f;">id</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"colorsubmit"</span></i> <span style="color: #7f007f;">onclick</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">"javascript:updateStudent(</span></i><span style="color: black;">${liststud.studentId}</span><i><span style="color: #2a00ff;">)"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">img</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">&nbsp;</span><span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> </span><span lang="EN" style="color: #2a00ff; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">&nbsp;</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">img</span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"> <span style="color: #7f007f;">src</span><span style="color: black;">=</span><i><span style="color: #2a00ff;">""</span></i>
<span style="color: #7f007f;">onclick</span><span style="color: black;">=</span><span style="color: #2a00ff;">"<u>"</u></span><span style="color: teal;">></</span><span style="color: #3f7f7f;">img</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 3;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">display:column</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 2;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">display:table</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: black; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-tab-count: 1;"> </span></span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">s:form</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">table</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">body</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span><span lang="EN" style="font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;"></</span><span lang="EN" style="color: #3f7f7f; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">html</span><span lang="EN" style="color: teal; font-family: "Courier New"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN;">></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">Next step is store the value taken from the form onto the hibernate.</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">Now in the hibernate.cfg.xml if we are using JNDI as a datasource then we
have to do some changes in the context.xml of tomcat which is in the conf
directory.</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">Like</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><Resource name="jndi_ialds" auth="Container"
type="javax.sql.DataSource" removeAbandoned="true"</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;">
</span>removeAbandonedTimeout="60" logAbandoned="true"</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;">
</span>maxActive="100" maxIdle="30"
maxWait="10000"</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;">
</span>username="root" password=""
driverClassName="com.mysql.jdbc.Driver"</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="mso-spacerun: yes;">
</span>url="jdbc:mysql://localhost/dbname?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf8"/></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">and if we are using a driver class in the hibernate.cfg.xml file the we add
to property in our hibernate.cfg.xml file like:</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><property
name="connection.useUnicode">true</property></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><property
name="connection.characterEncoding">UTF-8</property></span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;">Now after following these simple steps we can inset or display the Gujarati
text.</span></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;">
<br /></div>
<!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:Shruti;
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]--></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-12683073228044910942013-12-19T04:17:00.000-08:002013-12-19T04:17:15.421-08:00Sqlite (create table and retrieve data from sqlite database and display in tableview)Reading data from DB. ADD/Update/Delete Operation<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Student.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "sqlite3.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, readwrite) NSInteger StudentId,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Age;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) NSString *Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*Perc;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSMutableArray *)readRecords;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSInteger)addRecord:(Student *)sObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (BOOL)editRecord:(Student *)sObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (BOOL)deleteRecord:(Student *)sObj;</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Student.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize StudentId,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Perc;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSMutableArray *)readRecords</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableArray *recordArr = [[NSMutableArray alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *query = [NSString stringWithFormat:@"SELECT * FROM student ORDER BY Name ASC"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3 *db;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_open([dbPath UTF8String], &db) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_stmt *compiledStatement;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_prepare_v2(db,[query UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
while(sqlite3_step(compiledStatement) == SQLITE_ROW)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *currentSObj = [[Student alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.StudentId = sqlite3_column_int(compiledStatement, 0);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.Name = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.Age = sqlite3_column_int(compiledStatement, 2);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.Perc = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 3)];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordArr addObject:currentSObj];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_finalize(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_close(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return recordArr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSInteger)addRecord:(Student *)sObj</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSInteger retVal = false;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *query;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
query = [NSString stringWithFormat:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@"INSERT INTO student (Name, Age, Perc) VALUES ('%@', '%d', '%@')",</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Perc </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3 *db;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_open([dbPath UTF8String], &db) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_stmt *compiledStatement;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_prepare_v2(db,[query UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_step(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
retVal = true;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_finalize(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(retVal)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
retVal = sqlite3_last_insert_rowid(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_close(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return retVal;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (BOOL)editRecord:(Student *)sObj</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
BOOL retVal = false;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *query;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
query = [NSString stringWithFormat:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@"UPDATE student SET Name = '%@', Age = '%d', Perc = '%@' WHERE StudentId = '%d'",</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Perc,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.StudentId</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3 *db;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_open([dbPath UTF8String], &db) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_stmt *compiledStatement;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_prepare_v2(db,[query UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_step(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
retVal = true;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_finalize(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_close(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return retVal;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (BOOL)deleteRecord:(Student *)sObj</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
BOOL retVal = false;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *query = [NSString stringWithFormat:@"DELETE FROM student WHERE StudentId = '%d'", sObj.StudentId];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3 *db;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_open([dbPath UTF8String], &db) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_stmt *compiledStatement;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_prepare_v2(db,[query UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_step(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_finalize(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
retVal = true;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_close(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return retVal;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
AppDelegate.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (strong, nonatomic) IBOutlet UIWindow *window;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (strong, nonatomic) IBOutlet UINavigationController *nav;</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
AppDelegate.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize nav;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self checkDatabase];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
self.window.rootViewController = nav;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self.window makeKeyAndVisible];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return YES;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)checkDatabase</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databasePath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databaseName = @"test.sqlite";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSFileManager *fileManager = [NSFileManager defaultManager];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(![fileManager fileExistsAtPath:databasePath])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databasePathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:databaseName];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[fileManager removeItemAtPath:databasePath error:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[fileManager copyItemAtPath:databasePathFromApp toPath:databasePath error:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
else</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databasePathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:databaseName];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[fileManager copyItemAtPath:databasePathFromApp toPath:databasePath error:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface ip22ViewController : UIViewController <UITableViewDataSource, UITableViewDelegate></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableArray *studentRecordsArr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UIBarButtonItem *addBarBtn;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UITableView *recordTblView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (IBAction)addRecBtnPressed:(id)sender;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.m</h1>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
<o:p> </o:p></h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize addBarBtn,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
recordTblView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (IBAction)addRecBtnPressed:(id)sender</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *tempSObj = [[Student alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
tempSObj.Name = @"Alex";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
tempSObj.Age = 16;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
tempSObj.Perc = @"90.80";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(![Student addRecord:tempSObj])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[[[UIAlertView alloc] initWithTitle:@"Warning!"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
message:@"Details has not been saved.\nPlease verify your data."</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
delegate:self</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
cancelButtonTitle:@"OK"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
otherButtonTitles:nil] show];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self initAndLoadTable];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
self.navigationItem.rightBarButtonItem = addBarBtn;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self initAndLoadTable];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)initAndLoadTable</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
studentRecordsArr = [Student readRecords];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView reloadData];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)didReceiveMemoryWarning</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super didReceiveMemoryWarning];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
// Dispose of any resources that can be recreated.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#pragma mark - Table Methods</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return 100;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return studentRecordsArr.count;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
static NSString *CellIdentifier = @"Cell";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *sObj = [studentRecordsArr objectAtIndex:indexPath.row];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
StudentCellViewController *sVC = [[StudentCellViewController alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sVC.studentObj = sObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[cell.contentView addSubview:sVC.view];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return cell;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *sObj = [studentRecordsArr objectAtIndex:indexPath.row];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(![Student deleteRecord:sObj])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[[[UIAlertView alloc] initWithTitle:@"Warning!"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
message:@"Something went wrong!"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
delegate:self</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
cancelButtonTitle:@"OK"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
otherButtonTitles:nil] show];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
else</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[studentRecordsArr removeObjectAtIndex:indexPath.row];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView beginUpdates];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView deleteRowsAtIndexPaths:[[NSArray alloc] initWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationMiddle];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView endUpdates];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
StudentCellViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@class Student;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface StudentCellViewController : UIViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UILabel *NameLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*AgeLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*PercLbl;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) Student *studentObj;</div>
<div class="MsoPlainText" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
StudentCellViewController.m</h1>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
<span style="font-family: 'Courier New'; font-size: 10.5pt;"> </span></h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@implementation StudentCellViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize NameLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AgeLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
PercLbl;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize studentObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NameLbl.text = studentObj.Name;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AgeLbl.text = [NSString stringWithFormat:@"%dyr", studentObj.Age];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
PercLbl.text = [NSString stringWithFormat:@"%.2f%%", studentObj.Perc.doubleValue]; </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-33847583690383174782013-12-19T03:33:00.000-08:002013-12-19T03:33:54.564-08:00Read the Records using JSON in iPhone<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
APILinks.txt</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Read:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
http://.../JSON/student.php?action=list</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Add:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
http://…/JSON/student.php?action=add&Name=Alex&Age=16&Perc=90</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Edit:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
http://.../JSON/student.php?action=edit&Name=Alex&Age=16&Perc=90.86&StudentId=3</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Delete:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
http://.../JSON/student.php?action=delete&StudentId=3</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
student.php (Json File)</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"><?php<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $DB_Host = "localhost";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $DB_Name = "test_ios_trainees";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $DB_Username = "root";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $DB_Password = "root123";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $WEBSITE_URL = "http://.../JSON/";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $con = mysql_connect($DB_Host, $DB_Username, $DB_Password) or die(mysql_errno());<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $db = mysql_select_db($DB_Name, $con) or die(mysql_error());<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $action = ( isset($_REQUEST["action"]) && trim($_REQUEST["action"]) != "" ) ? trim($_REQUEST["action"]) : "";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> if($action == "list")<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $jsonRecArr = array();<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $sqry = "SELECT * FROM students ORDER BY Name ASC";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $sres = mysql_query($sqry) or die("can not select form students - ".mysql_error());<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> while($srow = mysql_fetch_array($sres))<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $recStr = '{"StudentId":"'.trim($srow["StudentId"]).'", "Name":"'.trim($srow["Name"]).'", "Age":"'.trim($srow["Age"]).'", "Perc":"'.trim($srow["Perc"]).'"}';<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> array_push($jsonRecArr, $recStr);<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> mysql_free_result($sres);<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $json = '{"students":['.implode(",", $jsonRecArr).']}';<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> echo $json;<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> else if($action == "add")<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> if( isset($_REQUEST["Name"]) && trim($_REQUEST["Name"]) != "" &&<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> isset($_REQUEST["Age"]) && trim($_REQUEST["Age"]) != "" &&<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> isset($_REQUEST["Perc"]) && trim($_REQUEST["Perc"]) != "")<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $iqry = "INSERT INTO students SET<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> Name = '".trim($_REQUEST["Name"])."',<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> Age = '".(int)trim($_REQUEST["Age"])."',<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> Perc = '".(float)trim($_REQUEST["Perc"])."'";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> mysql_query($iqry) or die("can not insert into students - ".mysql_error()); <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> echo "OK";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> exit; <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> else<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> echo "INVALID PARAMETER";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> else if($action == "edit")<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> if( isset($_REQUEST["StudentId"]) && trim($_REQUEST["StudentId"]) != "" &&<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> isset($_REQUEST["Name"]) && trim($_REQUEST["Name"]) != "" &&<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> isset($_REQUEST["Age"]) && trim($_REQUEST["Age"]) != "" &&<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> isset($_REQUEST["Perc"]) && trim($_REQUEST["Perc"]) != "")<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $iqry = "UPDATE students SET<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> Name = '".trim($_REQUEST["Name"])."',<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> Age = '".(int)trim($_REQUEST["Age"])."',<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> Perc = '".(float)trim($_REQUEST["Perc"])."'<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> WHERE StudentId = '".trim($_REQUEST["StudentId"])."'";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> mysql_query($iqry) or die("can not update students - ".mysql_error()); <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> echo "OK";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> else<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> echo "INVALID PARAMETER";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> else if($action == "delete")<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> if( isset($_REQUEST["StudentId"]) && trim($_REQUEST["StudentId"]) != "")<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> $iqry = "DELETE FROM students WHERE StudentId = '".trim($_REQUEST["StudentId"])."'"; <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> mysql_query($iqry) or die("can not delete from students - ".mysql_error()); <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> echo "OK";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> exit; <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> } <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> else<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> echo "INVALID PARAMETER";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> else<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> echo "Nothing is here for you!";<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US">?> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h2 style="background-color: white; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 11px; margin: 0px 0px 1em; position: relative;">
Import JSON Whole file for Framework</h2>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
AppDelegate.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) NSString *apiURL;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
AppDelegate.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize apiURL;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
In didfinisj=h method..</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
apiURL = @"http://.../JSON/";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@class AppDelegate;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface ViewController : UIViewController <UITableViewDataSource, UITableViewDelegate></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AppDelegate *appDel;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableArray *recordsArr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UITableView *recordTblView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UIActivityIndicatorView *processActView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "ViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "AppDelegate.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "MyFunctions.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@implementation ViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize recordTblView,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
processActView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
appDel = (ip24AppDelegate *)[[UIApplication sharedApplication] delegate];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
processActView.hidden = NO;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSOperationQueue *queue = [NSOperationQueue new];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(recordsRequest) object:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[queue addOperation:operation];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[operation release];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)didReceiveMemoryWarning</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super didReceiveMemoryWarning]; </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)recordsRequest</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *post =[NSString stringWithFormat:@""];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[request setURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@student.php?action=list", appDel.apiURL]]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[request setHTTPMethod:@"POST"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[request setHTTPBody:postData];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSURLResponse *response;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSData *urlData=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *data= [[NSString alloc]initWithData:urlData encoding:NSUTF8StringEncoding];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self performSelectorOnMainThread:@selector(recordResponse:) withObject:data waitUntilDone:NO];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)recordResponse:(NSString *)str</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{ </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
recordsArr = [Student readRecords:str];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView reloadData];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
processActView.hidden = YES;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#pragma mark - Table Methods</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return 100;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return recordsArr.count;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
static NSString *CellIdentifier = @"Cell";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *sObj = [recordsArr objectAtIndex:indexPath.row];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
StudentCellViewController *studentCellVC = [[StudentCellViewController alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
studentCellVC.studentObj = sObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[cell.contentView addSubview:studentCellVC.view];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return cell;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *sObj = [recordsArr objectAtIndex:indexPath.row];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSOperationQueue *queue = [NSOperationQueue new];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(deleteRecordRequest:) object:sObj];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[queue addOperation:operation];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordsArr removeObjectAtIndex:indexPath.row];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView beginUpdates];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView deleteRowsAtIndexPaths:[[NSArray alloc] initWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationMiddle];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView endUpdates];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)dealloc</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView release];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[processActView release];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super dealloc];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
MyFunctions.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <Foundation/Foundation.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface MyFunctions : NSObject</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSString *)trim:(NSString *)stringToTrim;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
MyFunctions.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "MyFunctions.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@implementation MyFunctions</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSString *)trim:(NSString *)stringToTrim</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return [stringToTrim stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Student.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <Foundation/Foundation.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface Student : NSObject</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) NSString *StudentId,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*Perc;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSMutableArray *)readRecords:(NSString *)dataStr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Student.m</h1>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
<o:p> </o:p></h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "SBJson.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "NSObject+SBJson.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "MyFunctions.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@implementation Student</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize StudentId,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Perc;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSMutableArray *)readRecords:(NSString *)dataStr</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableArray *recArr = [[NSMutableArray alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSDictionary *json = [dataStr JSONValue];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *items = [json valueForKey:@"students"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSEnumerator *enumerator = [items objectEnumerator];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSDictionary *item;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
while((item = (NSDictionary *)[enumerator nextObject]))</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *sObj = [[Student alloc] init]; </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.StudentId = [MyFunctions trim:[item objectForKey:@"StudentId"]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Name = [MyFunctions trim:[item objectForKey:@"Name"]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Age = [MyFunctions trim:[item objectForKey:@"Age"]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Perc = [MyFunctions trim:[item objectForKey:@"Perc"]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recArr addObject:sObj];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return recArr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoPlainText" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
StudentCellViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@class Student;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface StudentCellViewController : UIViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UILabel *NameLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*AgeLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*PercLbl;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) Student *studentObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoPlainText" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
StudentCellViewController.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "MyFunctions.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@implementation StudentCellViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize NameLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AgeLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
PercLbl;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize studentObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if (self) {</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
// Custom initialization</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return self;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NameLbl.text = [MyFunctions trim:studentObj.Name];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AgeLbl.text = [NSString stringWithFormat:@"%@yr", [MyFunctions trim:studentObj.Age]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
PercLbl.text = [NSString stringWithFormat:@"%@%%", [MyFunctions trim:studentObj.Perc]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)didReceiveMemoryWarning</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super didReceiveMemoryWarning];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
// Dispose of any resources that can be recreated.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div>
<br /></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-80195539445556392122013-12-19T03:28:00.001-08:002013-12-19T03:28:40.936-08:00xml parsing retrieve data with insert,update,delete from the mysql in iphone<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 class="post-title entry-title" itemprop="name" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 22px; margin: 0.75em 0px 0px; position: relative;">
</h3>
<div class="post-body entry-content" id="post-body-5725082181458131410" itemprop="description articleBody" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 1.4; position: relative; width: 980px;">
<div dir="ltr" trbidi="on">
<div class="MsoNoSpacing">
<br /></div>
<h1 style="margin: 0px; position: relative;">
AppDelegate.h</h1>
<div class="MsoNormal">
@property (strong, nonatomic) IBOutlet UIWindow *window;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@property (strong, nonatomic) IBOutlet UINavigationController *nav;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@property (nonatomic, retain) NSString *apiURL;</div>
<div class="MsoNoSpacing">
<br /></div>
<h1 style="margin: 0px; position: relative;">
AppDelegate.m</h1>
<div class="MsoNormal">
@synthesize apiURL;</div>
<div class="MsoNormal">
@synthesize nav;</div>
<div class="MsoNormal">
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
apiURL = @"http://FolderPath/XML/";</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
self.window.rootViewController = nav;</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[self.window makeKeyAndVisible];</div>
<div class="MsoNormal">
return YES;</div>
<div class="MsoNormal">
}</div>
<h1 style="margin: 0px; position: relative;">
ViewController.h</h1>
<div class="MsoNormal">
@class ip23AppDelegate,</div>
<div class="MsoNormal">
Student;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@interface ip23ViewController : UIViewController <NSXMLParserDelegate,</div>
<div class="MsoNormal">
UITableViewDataSource,</div>
<div class="MsoNormal">
UITableViewDelegate></div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
ip23AppDelegate *appDel;</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
Student *aRecord;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
NSMutableString *recordsStr;</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NSMutableArray *recordsArr;</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@property (nonatomic, retain) IBOutlet UIActivityIndicatorView *processActView;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@property (nonatomic, retain) IBOutlet UITableView *recordsTblView;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@property (nonatomic, retain) IBOutlet UIBarButtonItem *refreshBarBtn,</div>
<div class="MsoNormal">
*addBarBtn;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (IBAction)refreshBtnPressed:(id)sender;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (IBAction)addBtnPressed:(id)sender;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@end</div>
<h1 style="margin: 0px; position: relative;">
ViewController.m</h1>
<div class="MsoNormal">
#import "ViewController.h"</div>
<div class="MsoNormal">
#import "AppDelegate.h"</div>
<div class="MsoNormal">
#import "Student.h"</div>
<div class="MsoNormal">
#import "MyFunctions.h"</div>
<div class="MsoNormal">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@implementation ip23ViewController</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@synthesize processActView,</div>
<div class="MsoNormal">
recordsTblView;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@synthesize refreshBarBtn,</div>
<div class="MsoNormal">
addBarBtn;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (IBAction)refreshBtnPressed:(id)sender</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
[self initTableAndView];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (IBAction)addBtnPressed:(id)sender</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
Student *sObj = [[Student alloc] init];</div>
<div class="MsoNormal">
sObj.Name = @"Alex";</div>
<div class="MsoNormal">
sObj.Age = @"16";</div>
<div class="MsoNormal">
sObj.Perc = @"90.16";</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NSOperationQueue *queue = [NSOperationQueue new];</div>
<div class="MsoNormal">
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(addRecordRequest:) object:sObj];</div>
<div class="MsoNormal">
[queue addOperation:operation];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)viewDidLoad</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
[super viewDidLoad];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
self.navigationItem.leftBarButtonItem = refreshBarBtn;</div>
<div class="MsoNormal">
self.navigationItem.rightBarButtonItem = addBarBtn; </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
appDel = (ip23AppDelegate *)[[UIApplication sharedApplication] delegate];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[self initTableAndView];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)didReceiveMemoryWarning</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
[super didReceiveMemoryWarning];</div>
<div class="MsoNormal">
// Dispose of any resources that can be recreated.</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
#pragma mark - Add</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)addRecordResponse:(NSString *)response</div>
<div class="MsoNormal">
{ </div>
<div class="MsoNormal">
if([response isEqualToString:@"OK"])</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
[[[UIAlertView alloc] initWithTitle:@"Success!"</div>
<div class="MsoNormal">
message:@"Record added successfully."</div>
<div class="MsoNormal">
delegate:self</div>
<div class="MsoNormal">
cancelButtonTitle:@"OK"</div>
<div class="MsoNormal">
otherButtonTitles:nil] show];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[self initTableAndView];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
else if([response isEqualToString:@"INVALID PARAMETER"])</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
[[[UIAlertView alloc] initWithTitle:@"Warning!"</div>
<div class="MsoNormal">
message:@"Record is not added.\nPlease varify your data."</div>
<div class="MsoNormal">
delegate:self</div>
<div class="MsoNormal">
cancelButtonTitle:@"OK"</div>
<div class="MsoNormal">
otherButtonTitles:nil] show];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
else</div>
<div class="MsoNormal">
{ </div>
<div class="MsoNormal">
[[[UIAlertView alloc] initWithTitle:@"Warning!"</div>
<div class="MsoNormal">
message:@"Something went wrong.\nPlease try again later."</div>
<div class="MsoNormal">
delegate:self</div>
<div class="MsoNormal">
cancelButtonTitle:@"OK"</div>
<div class="MsoNormal">
otherButtonTitles:nil] show];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)addRecordRequest:(Student *)sObj</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
NSString *boundary = @"---------------------------14737809831466499882746641449";</div>
<div class="MsoNormal">
NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary];</div>
<div class="MsoNormal">
NSMutableData *body = [NSMutableData data];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[body appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"Name\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[sObj.Name dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[body appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"Age\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[sObj.Age dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[body appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"Perc\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[sObj.Perc dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[body appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"action\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[@"add" dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
[body appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
// close form</div>
<div class="MsoNormal">
[body appendData:[[NSString stringWithFormat:@"--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NSString *urlString = [NSString stringWithFormat:@"%@/student.php", appDel.apiURL];</div>
<div class="MsoNormal">
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];</div>
<div class="MsoNormal">
[request setURL:[NSURL URLWithString:urlString]];</div>
<div class="MsoNormal">
[request setHTTPMethod:@"POST"];</div>
<div class="MsoNormal">
[request addValue:contentType forHTTPHeaderField:@"Content-Type"];</div>
<div class="MsoNormal">
[request setHTTPBody:body];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];</div>
<div class="MsoNormal">
NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[self performSelectorOnMainThread:@selector(addRecordResponse:) withObject:returnString waitUntilDone:NO];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
#pragma mark - Delete</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)deleteRecordResponse:(NSString *)response</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
if([response isEqualToString:@"OK"])</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
//Action</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
else</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
[[[UIAlertView alloc] initWithTitle:@"Warning!"</div>
<div class="MsoNormal">
message:@"Something went wrong.\nPlease try again later."</div>
<div class="MsoNormal">
delegate:self</div>
<div class="MsoNormal">
cancelButtonTitle:@"OK"</div>
<div class="MsoNormal">
otherButtonTitles:nil] show];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[self initTableAndView];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
//NSLog(@"%@", response);</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)deleteRecordRequest:(Student *)sObj</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
NSString *post =[NSString stringWithFormat:@"action=delete&StudentId=%@", sObj.StudentId];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];</div>
<div class="MsoNormal">
NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];</div>
<div class="MsoNormal">
[request setURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/student.php", appDel.apiURL]]];</div>
<div class="MsoNormal">
[request setHTTPMethod:@"POST"];</div>
<div class="MsoNormal">
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];</div>
<div class="MsoNormal">
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];</div>
<div class="MsoNormal">
[request setHTTPBody:postData];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NSURLResponse *response;</div>
<div class="MsoNormal">
NSData *urlData=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:nil];</div>
<div class="MsoNormal">
NSString *resp = [[NSString alloc]initWithData:urlData encoding:NSUTF8StringEncoding];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[self performSelectorOnMainThread:@selector(deleteRecordResponse:) withObject:resp waitUntilDone:NO];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
#pragma mark - XML Parse</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)initTableAndView</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
recordsTblView.userInteractionEnabled = NO;</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
processActView.hidden = NO;</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
recordsArr = [[NSMutableArray alloc] init];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NSOperationQueue *queue = [NSOperationQueue new];</div>
<div class="MsoNormal">
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(getApiData) object:nil];</div>
<div class="MsoNormal">
[queue addOperation:operation];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)loadDataInTable</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
recordsTblView.userInteractionEnabled = YES; </div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
processActView.hidden = YES;</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[recordsTblView reloadData];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)getApiData</div>
<div class="MsoNormal">
{ </div>
<div class="MsoNormal">
NSString *myApiLink = [NSString stringWithFormat:@"%@student.php?action=list",</div>
<div class="MsoNormal">
appDel.apiURL];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
//NSLog(@"%@", myApiLink);</div>
<div class="MsoNormal">
NSURL *url = [[NSURL alloc] initWithString:myApiLink];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NSXMLParser *xParse = [[NSXMLParser alloc] initWithContentsOfURL:url];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[xParse setDelegate:self];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[xParse parse];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[self performSelectorOnMainThread:@selector(loadDataInTable) withObject:nil waitUntilDone:NO];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict</div>
<div class="MsoNormal">
{ </div>
<div class="MsoNormal">
if([elementName isEqualToString:@"Student"])</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
aRecord = [[Student alloc] init];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
if(!recordsStr)</div>
<div class="MsoNormal">
recordsStr = [[NSMutableString alloc] initWithString:string];</div>
<div class="MsoNormal">
else</div>
<div class="MsoNormal">
[recordsStr appendString:string];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
if([elementName isEqualToString:@"Students"])</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
return;</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
else if([elementName isEqualToString:@"Student"])</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
[recordsArr addObject:aRecord];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
aRecord = nil;</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
else</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
if([elementName isEqualToString:@"StudentId"] ||</div>
<div class="MsoNormal">
[elementName isEqualToString:@"Name"] ||</div>
<div class="MsoNormal">
[elementName isEqualToString:@"Age"] ||</div>
<div class="MsoNormal">
[elementName isEqualToString:@"Perc"])</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
[aRecord setValue:recordsStr forKey:elementName];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
recordsStr = nil;</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
#pragma mark - Table Methods</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
return 100;</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
return recordsArr.count;</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
static NSString *CellIdentifier = @"Cell";</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
Student *sObj = [recordsArr objectAtIndex:indexPath.row]; </div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
StudentCellViewController *studentCellVC = [[StudentCellViewController alloc] init];</div>
<div class="MsoNormal">
studentCellVC.studentObj = sObj;</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[cell.contentView addSubview:studentCellVC.view];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
return cell;</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
Student *sObj = [recordsArr objectAtIndex:indexPath.row];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NSOperationQueue *queue = [NSOperationQueue new];</div>
<div class="MsoNormal">
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(deleteRecordRequest:) object:sObj];</div>
<div class="MsoNormal">
[queue addOperation:operation];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[recordsArr removeObjectAtIndex:indexPath.row];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[recordsTblView beginUpdates];</div>
<div class="MsoNormal">
[recordsTblView deleteRowsAtIndexPaths:[[NSArray alloc] initWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationMiddle];</div>
<div class="MsoNormal">
[recordsTblView endUpdates];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@end</div>
<h1 style="margin: 0px; position: relative;">
MyFunctions.h</h1>
<div class="MsoNormal">
+ (NSString *)trim:(NSString *)stringToTrim;</div>
<h1 style="margin: 0px; position: relative;">
MyFunctions.m</h1>
<div class="MsoNormal">
+ (NSString *)trim:(NSString *)stringToTrim</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
return [stringToTrim stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];</div>
<div class="MsoNormal">
}</div>
<h1 style="margin: 0px; position: relative;">
Student.h</h1>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@property (nonatomic, retain) NSString *StudentId,</div>
<div class="MsoNormal">
*Name,</div>
<div class="MsoNormal">
*Age,</div>
<div class="MsoNormal">
*Perc;</div>
<h1 style="margin: 0px; position: relative;">
Student.m</h1>
<div class="MsoNormal">
@synthesize StudentId,</div>
<div class="MsoNormal">
Name,</div>
<div class="MsoNormal">
Age,</div>
<div class="MsoNormal">
Perc;</div>
<h1 style="margin: 0px; position: relative;">
StudentCellViewController.h</h1>
<div class="MsoNormal">
@property (nonatomic, retain) IBOutlet UILabel *NameLbl,</div>
<div class="MsoNormal">
*AgeLbl,</div>
<div class="MsoNormal">
*PercLbl;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@property (nonatomic, retain) Student *studentObj;</div>
<div class="MsoNormal">
@class Student;</div>
<h1 style="margin: 0px; position: relative;">
StudentCellViewController.m</h1>
<div class="MsoNormal">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal">
#import "Student.h"</div>
<div class="MsoNormal">
#import "MyFunctions.h"</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@implementation StudentCellViewController</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@synthesize NameLbl,</div>
<div class="MsoNormal">
AgeLbl,</div>
<div class="MsoNormal">
PercLbl;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@synthesize studentObj;</div>
<div class="MsoNormal">
- (void)viewDidLoad</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
[super viewDidLoad];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
NameLbl.text = [MyFunctions trim:studentObj.Name];</div>
<div class="MsoNormal">
AgeLbl.text = [NSString stringWithFormat:@"%@yr", [MyFunctions trim:studentObj.Age]];</div>
<div class="MsoNormal">
PercLbl.text = [NSString stringWithFormat:@"%@%%", [MyFunctions trim:studentObj.Perc]];</div>
<div class="MsoNormal">
}</div>
<div class="MsoPlainText">
<br /></div>
<div class="MsoNoSpacing">
API</div>
<h1 style="margin: 0px; position: relative;">
API Links</h1>
<div class="MsoNormal">
Read:</div>
<div class="MsoNormal">
http://Folderpath/XML/student.php?action=list</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Add:</div>
<div class="MsoNormal">
http:// Folderpath /XML/student.php?action=add&Name=Alex&Age=16&Perc=90</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Edit:</div>
<div class="MsoNormal">
http:// Folderpath /XML/student.php?action=edit&Name=Alex&Age=16&Perc=90.86&StudentId=3</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Delete:</div>
<div class="MsoNormal" style="text-indent: 36pt;">
http:// Folderpath /XML/student.php?action=delete&StudentId=3</div>
<div class="MsoNormal">
<br /></div>
<h1 style="margin: 0px; position: relative;">
student-list.php</h1>
<div class="MsoNormal">
<span lang="EN-US"><?php<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> header ("content-type: text/xml");<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> sleep(3);<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> echo '<?xml version="1.0" encoding="UTF-8"?><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Students><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Name>Alan</Name><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Age>18</Age><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Perc>88.90</Perc><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> </Student><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Name>Bob</Name><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Age>20</Age><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Perc>85.60</Perc><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> </Student><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Name>Alex</Name><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Age>16</Age><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Perc>90.16</Perc><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> </Student> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> </Students>';<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US">?><o:p></o:p></span></div>
<h1 style="margin: 0px; position: relative;">
student-list.xml</h1>
<div class="MsoNormal">
<span lang="EN-US"><?xml version="1.0" encoding="UTF-8"?><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"><Students><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Name>Alan</Name><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Age>18</Age><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Perc>88.90</Perc><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> </Student><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Name>Bob</Name><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Age>20</Age><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Perc>85.60</Perc><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> </Student><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Name>Alex</Name><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Age>16</Age><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <Perc>90.16</Perc><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> </Student> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"></Students><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<h1 style="margin: 0px; position: relative;">
Student.php</h1>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-US"><?php<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $DB_Host = "localhost";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $DB_Name = "test_ios_trainees";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $DB_Username = "root";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $DB_Password = "root123";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $WEBSITE_URL = "http://FolderPath/XML/";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $con = mysql_connect($DB_Host, $DB_Username, $DB_Password) or die(mysql_errno());<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $db = mysql_select_db($DB_Name, $con) or die(mysql_error());<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $action = ( isset($_REQUEST["action"]) && trim($_REQUEST["action"]) != "" ) ? trim($_REQUEST["action"]) : "";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $xmlHeader = '<?xml version="1.0" encoding="UTF-8"?>';<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> if($action == "list")<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> header ("content-type: text/xml");<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $xml = $xmlHeader;<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $xml .= '<Students>';<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $sqry = "SELECT * FROM students ORDER BY Name ASC";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $sres = mysql_query($sqry) or die("can not select form students - ".mysql_error());<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> while($srow = mysql_fetch_array($sres))<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $xml .= '<Student>'; <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $xml .= '<StudentId>'.trim($srow["StudentId"]).'</StudentId>';<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $xml .= '<Name>'.trim($srow["Name"]).'</Name>';<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $xml .= '<Age>'.trim($srow["Age"]).'</Age>';<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $xml .= '<Perc>'.trim($srow["Perc"]).'</Perc>';<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $xml .= '</Student>';<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> mysql_free_result($sres);<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $xml .= '</Students>';<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> echo $xml;<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> else if($action == "add")<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> if( isset($_REQUEST["Name"]) && trim($_REQUEST["Name"]) != "" &&<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> isset($_REQUEST["Age"]) && trim($_REQUEST["Age"]) != "" &&<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> isset($_REQUEST["Perc"]) && trim($_REQUEST["Perc"]) != "")<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $iqry = "INSERT INTO students SET<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> Name = '".trim($_REQUEST["Name"])."',<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> Age = '".(int)trim($_REQUEST["Age"])."',<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> Perc = '".(float)trim($_REQUEST["Perc"])."'";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> mysql_query($iqry) or die("can not insert into students - ".mysql_error()); <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> echo "OK";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> exit; <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> else<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> echo "INVALID PARAMETER";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> else if($action == "edit")<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> if( isset($_REQUEST["StudentId"]) && trim($_REQUEST["StudentId"]) != "" &&<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> isset($_REQUEST["Name"]) && trim($_REQUEST["Name"]) != "" &&<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> isset($_REQUEST["Age"]) && trim($_REQUEST["Age"]) != "" &&<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> isset($_REQUEST["Perc"]) && trim($_REQUEST["Perc"]) != "")<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $iqry = "UPDATE students SET<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> Name = '".trim($_REQUEST["Name"])."',<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> Age = '".(int)trim($_REQUEST["Age"])."',<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> Perc = '".(float)trim($_REQUEST["Perc"])."'<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> WHERE StudentId = '".trim($_REQUEST["StudentId"])."'";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> mysql_query($iqry) or die("can not update students - ".mysql_error()); <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> echo "OK";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> else<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> echo "INVALID PARAMETER";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> else if($action == "delete")<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> if( isset($_REQUEST["StudentId"]) && trim($_REQUEST["StudentId"]) != "")<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> $iqry = "DELETE FROM students WHERE StudentId = '".trim($_REQUEST["StudentId"])."'"; <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> mysql_query($iqry) or die("can not delete from students - ".mysql_error()); <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> echo "OK";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> exit; <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> } <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> else<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> echo "INVALID PARAMETER";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> else<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> {<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> echo "Nothing is here for you!";<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> exit;<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-US"> }<o:p></o:p></span></div>
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt;">?> </span></div>
</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-86010186869228092742013-12-19T03:22:00.001-08:002013-12-19T03:22:54.309-08:00xml parsing retrieve data from the MYSQL in iPhone<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
API</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
API Links</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Read:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
http://Folderpath/XML/student.php?action=list</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Add:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
http:// Folderpath /XML/student.php?action=add&Name=Alex&Age=16&Perc=90</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Edit:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
http:// Folderpath /XML/student.php?action=edit&Name=Alex&Age=16&Perc=90.86&StudentId=3</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Delete:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px; text-indent: 36pt;">
http:// Folderpath /XML/student.php?action=delete&StudentId=3</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
student-list.php</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"><?php<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> header ("content-type: text/xml");<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> sleep(3);<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> echo '<?xml version="1.0" encoding="UTF-8"?><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Students><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Name>Alan</Name><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Age>18</Age><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Perc>88.90</Perc><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> </Student><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Name>Bob</Name><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Age>20</Age><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Perc>85.60</Perc><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> </Student><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Name>Alex</Name><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Age>16</Age><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Perc>90.16</Perc><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> </Student> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> </Students>';<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US">?><o:p></o:p></span></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
student-list.xml</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"><?xml version="1.0" encoding="UTF-8"?><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"><Students><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Name>Alan</Name><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Age>18</Age><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Perc>88.90</Perc><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> </Student><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Name>Bob</Name><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Age>20</Age><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Perc>85.60</Perc><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> </Student><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Student><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Name>Alex</Name><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Age>16</Age><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> <Perc>90.16</Perc><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"> </Student> <o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span lang="EN-US"></Students><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
AppDelegate.h</h1>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
<o:p> </o:p></h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) NSString *apiURL;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (strong, nonatomic) UIWindow *window;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
AppDelegate.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span style="font-family: 'Courier New'; font-size: 10.5pt;">@synthesize apiURL;</span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span style="font-family: 'Courier New'; font-size: 10.5pt;"> apiURL = @"http://FolderPath/XML/";<o:p></o:p></span></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@class ip23AppDelegate,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface ip23ViewController : UIViewController <<span class="Heading2Char"><span style="font-size: 14pt;">NSXMLParserDelegate,</span></span></div>
<h2 style="background-color: white; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 11px; margin: 0px 0px 1em; position: relative;">
UITableViewDataSource,</h2>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="Heading2Char"><span style="font-size: 14pt;">UITableViewDelegat</span></span>e></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
ip23AppDelegate *appDel;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *aRecord;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableString *recordsStr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableArray *recordsArr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UIActivityIndicatorView *processActView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UITableView *recordsTblView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "ViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "AppDelegate.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "MyFunctions.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@implementation ip23ViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize processActView,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
recordsTblView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
appDel = (ip23AppDelegate *)[[UIApplication sharedApplication] delegate];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSOperationQueue *queue = [NSOperationQueue new];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(getApiData) object:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[queue addOperation:operation];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)didReceiveMemoryWarning</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super didReceiveMemoryWarning];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
// Dispose of any resources that can be recreated.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#pragma mark - XML Parse</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)loadDataInTable</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
processActView.hidden = YES;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordsTblView reloadData];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)getApiData</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
processActView.hidden = NO;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
recordsArr = [[NSMutableArray alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *myApiLink = [NSString stringWithFormat:@"%@student-list.php",</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
appDel.apiURL];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
//NSLog(@"%@", myApiLink);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSURL *url = [[NSURL alloc] initWithString:myApiLink];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSXMLParser *xParse = [[NSXMLParser alloc] initWithContentsOfURL:url];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[xParse setDelegate:self];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[xParse parse];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self performSelectorOnMainThread:@selector(loadDataInTable) withObject:nil waitUntilDone:NO];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{ </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if([elementName isEqualToString:@"Student"])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
aRecord = [[Student alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(!recordsStr)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
recordsStr = [[NSMutableString alloc] initWithString:string];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
else</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordsStr appendString:string];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if([elementName isEqualToString:@"Students"])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
else if([elementName isEqualToString:@"Student"])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordsArr addObject:aRecord];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
aRecord = nil;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
else</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if([elementName isEqualToString:@"Name"] ||</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[elementName isEqualToString:@"Age"] ||</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[elementName isEqualToString:@"Perc"])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[aRecord setValue:recordsStr forKey:elementName];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
recordsStr = nil;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#pragma mark - Table Methods</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return 100;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return recordsArr.count;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
static NSString *CellIdentifier = @"Cell";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *sObj = [recordsArr objectAtIndex:indexPath.row]; </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
StudentCellViewController *studentCellVC = [[StudentCellViewController alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
studentCellVC.studentObj = sObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[cell.contentView addSubview:studentCellVC.view];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return cell;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoPlainText" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
MyFunctions.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <Foundation/Foundation.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface MyFunctions : NSObject</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSString *)trim:(NSString *)stringToTrim;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
MyFunctions.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "MyFunctions.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@implementation MyFunctions</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSString *)trim:(NSString *)stringToTrim</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return [stringToTrim stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Student.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) NSString *Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*Perc;</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Student.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Perc;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
StudentCellViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@class Student;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface StudentCellViewController : UIViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UILabel *NameLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*AgeLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*PercLbl;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) Student *studentObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
StudentCellViewController.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "MyFunctions.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@implementation StudentCellViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize NameLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AgeLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
PercLbl;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize studentObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NameLbl.text = [MyFunctions trim:studentObj.Name];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AgeLbl.text = [NSString stringWithFormat:@"%@yr", [MyFunctions trim:studentObj.Age]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
PercLbl.text = [NSString stringWithFormat:@"%@%%", [MyFunctions trim:studentObj.Perc]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-10776050919098748312013-12-19T03:19:00.000-08:002013-12-19T03:19:11.526-08:00Using Datepicker add birth date into textfield in ios<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@interface</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">CustomKeyboardAppDelegate</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">NSObject</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIApplicationDelegate</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">></span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">{</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">...</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@property</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">nonatomic</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">,</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> retain</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">IBOutlet</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIWindow</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">window</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@property</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">nonatomic</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">,</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> retain</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">IBOutlet</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UITextField</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">textField</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@property</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">nonatomic</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">,</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> retain</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">IBOutlet</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIToolbar</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">accessoryView</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@property</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">nonatomic</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">,</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> retain</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">IBOutlet</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIDatePicker</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">customInput</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">-</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">IBAction</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">dateChanged</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">id</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">sender</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">-</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">IBAction</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">doneEditing</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">id</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">sender</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@end</span></span><span style="font-family: Consolas; font-size: 10.5pt;"><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@implementation</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">CustomKeyboardAppDelegate</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@synthesize</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> window</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">_window</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@synthesize</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> textField </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> _textField</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@synthesize</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> accessoryView </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> _accessoryView</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@synthesize</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> customInput </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> _customInput</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">-</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">BOOL</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">application</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:(</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIApplication</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">application didFinishLaunchingWithOptions</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:(</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">NSDictionary</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">launchOptions<o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">{</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="kwd"><span style="border: 1pt none windowtext; color: darkblue; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">self</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">textField</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">inputView </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="kwd"><span style="border: 1pt none windowtext; color: darkblue; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">self</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">customInput</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="kwd"><span style="border: 1pt none windowtext; color: darkblue; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">self</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">textField</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">inputAccessoryView </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="kwd"><span style="border: 1pt none windowtext; color: darkblue; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">self</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">accessoryView</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">...</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> <o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">}</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">...</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">-</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">IBAction</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">dateChanged</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">id</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">sender </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">{</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIDatePicker</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">picker </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIDatePicker</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">sender</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="kwd"><span style="border: 1pt none windowtext; color: darkblue; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">self</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">textField</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">text </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">[</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">NSString</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> stringWithFormat</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:@</span></span><span class="str"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">"%@"</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">,</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> picker</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">date</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">];</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">}</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">-</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">IBAction</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">doneEditing</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">id</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">sender </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">{</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">[</span></span><span class="kwd"><span style="border: 1pt none windowtext; color: darkblue; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">self</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">textField resignFirstResponder</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">];</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">}</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@end</span></span><o:p></o:p></div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Second way</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">-</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="kwd"><span style="border: 1pt none windowtext; color: darkblue; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">void</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">textFieldDidBeginEditing</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:(</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UITextField</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">sender<o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">{</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> sender</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="kwd"><span style="border: 1pt none windowtext; color: darkblue; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">delegate</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> self</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="kwd"><span style="border: 1pt none windowtext; color: darkblue; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">if</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">([</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">sender isEqual</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">dateFieldText</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">])</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">{</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIBarButtonItem</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">doneButton </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">[[</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIBarButtonItem</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> alloc</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">]</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> initWithTitle</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:@</span></span><span class="str"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">"Save Date"</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> style</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIBarButtonItemStyleDone</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> target</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">self<o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> action</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@selector</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">datePicker</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)];</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> self</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">navigationItem</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">rightBarButtonItem </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> doneButton</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">}</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="kwd"><span style="border: 1pt none windowtext; color: darkblue; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">else</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">{</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIBarButtonItem</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">submitButton </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">[[</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIBarButtonItem</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> alloc</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">]</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> initWithTitle</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:@</span></span><span class="str"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">"Done"</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> style</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIBarButtonItemStyleDone</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> target</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">self<o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> action</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@selector</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">datePicker</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)];</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> self</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">navigationItem</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">rightBarButtonItem </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> submitButton</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">}</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> <o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">}</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">-(</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">IBAction</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">datePicker<o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">{</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIDatePicker</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">*</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">datePicker </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">[[</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIDatePicker</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> alloc</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">]</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> init</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">];</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> datePicker</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">datePickerMode </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">=</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIDatePickerModeDateAndTime</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">;</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">[</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">datePicker addTarget</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">self action</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="lit"><span style="border: 1pt none windowtext; color: maroon; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">@selector</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">(</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">saveDate</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">)</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> forControlEvents</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="typ"><span style="border: 1pt none windowtext; color: #2b91af; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">UIControlEventValueChanged</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">];</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">[</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">self</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">.</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">dateFieldText setInputView</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">:</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">datePicker</span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">];</span></span><span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span class="pln"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"> </span></span><span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;">}</span></span></div>
<div>
<span class="pun"><span style="border: 1pt none windowtext; font-family: Consolas; font-size: 10.5pt; padding: 0cm;"><br /></span></span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-22071055156488885182013-12-19T03:15:00.003-08:002013-12-19T03:15:18.527-08:00Sqlite (create table and retrieve data from sqlite database and display in tableview)Reading data from DB. ADD/Update/Delete Operation<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Student.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "sqlite3.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, readwrite) NSInteger StudentId,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Age;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) NSString *Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*Perc;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSMutableArray *)readRecords;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSInteger)addRecord:(Student *)sObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (BOOL)editRecord:(Student *)sObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (BOOL)deleteRecord:(Student *)sObj;</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Student.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize StudentId,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Perc;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSMutableArray *)readRecords</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableArray *recordArr = [[NSMutableArray alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *query = [NSString stringWithFormat:@"SELECT * FROM student ORDER BY Name ASC"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3 *db;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_open([dbPath UTF8String], &db) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_stmt *compiledStatement;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_prepare_v2(db,[query UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
while(sqlite3_step(compiledStatement) == SQLITE_ROW)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *currentSObj = [[Student alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.StudentId = sqlite3_column_int(compiledStatement, 0);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.Name = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.Age = sqlite3_column_int(compiledStatement, 2);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.Perc = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 3)];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordArr addObject:currentSObj];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_finalize(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_close(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return recordArr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSInteger)addRecord:(Student *)sObj</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSInteger retVal = false;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *query;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
query = [NSString stringWithFormat:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@"INSERT INTO student (Name, Age, Perc) VALUES ('%@', '%d', '%@')",</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Perc </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3 *db;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_open([dbPath UTF8String], &db) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_stmt *compiledStatement;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_prepare_v2(db,[query UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_step(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
retVal = true;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_finalize(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(retVal)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
retVal = sqlite3_last_insert_rowid(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_close(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return retVal;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (BOOL)editRecord:(Student *)sObj</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
BOOL retVal = false;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *query;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
query = [NSString stringWithFormat:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@"UPDATE student SET Name = '%@', Age = '%d', Perc = '%@' WHERE StudentId = '%d'",</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.Perc,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sObj.StudentId</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3 *db;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_open([dbPath UTF8String], &db) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_stmt *compiledStatement;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_prepare_v2(db,[query UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_step(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
retVal = true;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_finalize(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_close(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return retVal;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (BOOL)deleteRecord:(Student *)sObj</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
BOOL retVal = false;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *query = [NSString stringWithFormat:@"DELETE FROM student WHERE StudentId = '%d'", sObj.StudentId];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3 *db;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_open([dbPath UTF8String], &db) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_stmt *compiledStatement;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_prepare_v2(db,[query UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_step(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_finalize(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
retVal = true;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_close(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return retVal;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
AppDelegate.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (strong, nonatomic) IBOutlet UIWindow *window;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (strong, nonatomic) IBOutlet UINavigationController *nav;</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
AppDelegate.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize nav;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self checkDatabase];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
self.window.rootViewController = nav;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self.window makeKeyAndVisible];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return YES;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)checkDatabase</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databasePath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databaseName = @"test.sqlite";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSFileManager *fileManager = [NSFileManager defaultManager];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(![fileManager fileExistsAtPath:databasePath])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databasePathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:databaseName];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[fileManager removeItemAtPath:databasePath error:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[fileManager copyItemAtPath:databasePathFromApp toPath:databasePath error:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
else</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databasePathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:databaseName];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[fileManager copyItemAtPath:databasePathFromApp toPath:databasePath error:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface ip22ViewController : UIViewController <UITableViewDataSource, UITableViewDelegate></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableArray *studentRecordsArr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UIBarButtonItem *addBarBtn;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UITableView *recordTblView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (IBAction)addRecBtnPressed:(id)sender;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.m</h1>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
<o:p> </o:p></h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize addBarBtn,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
recordTblView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (IBAction)addRecBtnPressed:(id)sender</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *tempSObj = [[Student alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
tempSObj.Name = @"Alex";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
tempSObj.Age = 16;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
tempSObj.Perc = @"90.80";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(![Student addRecord:tempSObj])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[[[UIAlertView alloc] initWithTitle:@"Warning!"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
message:@"Details has not been saved.\nPlease verify your data."</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
delegate:self</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
cancelButtonTitle:@"OK"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
otherButtonTitles:nil] show];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self initAndLoadTable];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
self.navigationItem.rightBarButtonItem = addBarBtn;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self initAndLoadTable];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)initAndLoadTable</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
studentRecordsArr = [Student readRecords];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView reloadData];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)didReceiveMemoryWarning</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super didReceiveMemoryWarning];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
// Dispose of any resources that can be recreated.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#pragma mark - Table Methods</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return 100;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return studentRecordsArr.count;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
static NSString *CellIdentifier = @"Cell";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *sObj = [studentRecordsArr objectAtIndex:indexPath.row];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
StudentCellViewController *sVC = [[StudentCellViewController alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sVC.studentObj = sObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[cell.contentView addSubview:sVC.view];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return cell;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *sObj = [studentRecordsArr objectAtIndex:indexPath.row];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(![Student deleteRecord:sObj])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[[[UIAlertView alloc] initWithTitle:@"Warning!"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
message:@"Something went wrong!"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
delegate:self</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
cancelButtonTitle:@"OK"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
otherButtonTitles:nil] show];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
else</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[studentRecordsArr removeObjectAtIndex:indexPath.row];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView beginUpdates];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView deleteRowsAtIndexPaths:[[NSArray alloc] initWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationMiddle];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordTblView endUpdates];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
StudentCellViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@class Student;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface StudentCellViewController : UIViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UILabel *NameLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*AgeLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*PercLbl;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) Student *studentObj;</div>
<div class="MsoPlainText" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
StudentCellViewController.m</h1>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
<span style="font-family: 'Courier New'; font-size: 10.5pt;"> </span></h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@implementation StudentCellViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize NameLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AgeLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
PercLbl;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize studentObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NameLbl.text = studentObj.Name;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AgeLbl.text = [NSString stringWithFormat:@"%dyr", studentObj.Age];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
PercLbl.text = [NSString stringWithFormat:@"%.2f%%", studentObj.Perc.doubleValue]; </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-37729967329100629402013-12-19T03:11:00.000-08:002013-12-19T03:11:49.059-08:00 Sqlite (create table and retrieve data from sqlite database and display in tableview) Reading data from DB<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Structure</h1>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Student.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <Foundation/Foundation.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "sqlite3.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface Student : NSObject</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, readwrite) NSInteger StudentId,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Age;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) NSString *Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*Perc;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSMutableArray *)readRecords;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
Student.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize StudentId,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Age,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Name,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Perc;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
+ (NSMutableArray *)readRecords</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableArray *recordArr = [[NSMutableArray alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *query = [NSString stringWithFormat:@"SELECT * FROM student ORDER BY Name ASC"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3 *db;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *dbPath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_open([dbPath UTF8String], &db) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_stmt *compiledStatement;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(sqlite3_prepare_v2(db,[query UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
while(sqlite3_step(compiledStatement) == SQLITE_ROW)</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *currentSObj = [[Student alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.StudentId = sqlite3_column_int(compiledStatement, 0);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.Name = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.Age = sqlite3_column_int(compiledStatement, 2);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
currentSObj.Perc = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 3)];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[recordArr addObject:currentSObj];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_finalize(compiledStatement);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sqlite3_close(db);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return recordArr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
AppDelegate.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self checkDatabase];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
// Override point for customization after application launch.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
self.viewController = [[ip22ViewController alloc] initWithNibName:@"ip22ViewController" bundle:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
self.window.rootViewController = self.viewController;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self.window makeKeyAndVisible];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return YES;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)checkDatabase</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *documentsDir = [documentPaths objectAtIndex:0];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databasePath = [documentsDir stringByAppendingPathComponent:@"test.sqlite"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databaseName = @"test.sqlite";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSFileManager *fileManager = [NSFileManager defaultManager];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if(![fileManager fileExistsAtPath:databasePath])</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databasePathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:databaseName];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[fileManager removeItemAtPath:databasePath error:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[fileManager copyItemAtPath:databasePathFromApp toPath:databasePath error:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
else</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSString *databasePathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:databaseName];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[fileManager copyItemAtPath:databasePathFromApp toPath:databasePath error:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface ip22ViewController : UIViewController <UITableViewDataSource, UITableViewDelegate></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSMutableArray *studentRecordsArr;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "StudentCellViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
studentRecordsArr = [Student readRecords];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#pragma mark - Table Methods</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return 100;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return studentRecordsArr.count;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
static NSString *CellIdentifier = @"Cell";</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Student *sObj = [studentRecordsArr objectAtIndex:indexPath.row];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
StudentCellViewController *sVC = [[StudentCellViewController alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sVC.studentObj = sObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[cell.contentView addSubview:sVC.view];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
return cell;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
StudentCellViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@class Student;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface StudentCellViewController : UIViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) IBOutlet UILabel *NameLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*AgeLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
*PercLbl;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, retain) Student *studentObj;</div>
<div class="MsoPlainText" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
StudentCellViewController.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "Student.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize NameLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AgeLbl,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
PercLbl;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize studentObj;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NameLbl.text = studentObj.Name;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
AgeLbl.text = [NSString stringWithFormat:@"%dyr", studentObj.Age];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
PercLbl.text = [NSString stringWithFormat:@"%.2f%%", studentObj.Perc.doubleValue]; </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-2682201244154554652013-12-19T02:28:00.001-08:002013-12-19T02:28:21.764-08:00Notification Demo example in iPhone<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 class="post-title entry-title" itemprop="name" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 22px; margin: 0.75em 0px 0px; position: relative;">
<br /></h3>
<div class="post-body entry-content" id="post-body-742901513336907775" itemprop="description articleBody" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 1.4; position: relative; width: 980px;">
<div dir="ltr" trbidi="on">
<h1 style="margin: 0px; position: relative;">
ViewController.h</h1>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@class MyViewController;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@interface ip21ViewController : UIViewController</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@property (nonatomic, retain) MyViewController *myvc;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@end</div>
<div class="MsoPlainText">
<br /></div>
<h1 style="margin: 0px; position: relative;">
ViewController.m</h1>
<h1 style="margin: 0px; position: relative;">
<o:p> </o:p></h1>
<div class="MsoNormal">
#import "MyViewController.h"</div>
<div class="MsoNormal">
@synthesize myvc;</div>
<div class="MsoNormal">
- (void)viewDidLoad</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
[super viewDidLoad];</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
myvc = [[MyViewController alloc] init];</div>
<div class="MsoNormal">
myvc.view.frame = CGRectMake(60, 60, myvc.view.frame.size.width, myvc.view.frame.size.height);</div>
<div class="MsoNormal">
[self.view addSubview:myvc.view];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[[NSNotificationCenter defaultCenter] addObserver:self</div>
<div class="MsoNormal">
selector:@selector(didColorChangeNotification:)</div>
<div class="MsoNormal">
name:@"ColorChangeNotification"</div>
<div class="MsoNormal">
object:nil];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (void)didColorChangeNotification:(NSNotification *)aNotification</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
if([aNotification.name isEqualToString:@"ColorChangeNotification"])</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
NSDictionary *dict = [aNotification userInfo];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
int c = [[dict objectForKey:@"Color"] integerValue];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
if(c == 1)</div>
<div class="MsoNormal">
self.view.backgroundColor = [UIColor redColor]; </div>
<div class="MsoNormal">
else if(c == 2)</div>
<div class="MsoNormal">
self.view.backgroundColor = [UIColor greenColor];</div>
<div class="MsoNormal">
else if(c == 3)</div>
<div class="MsoNormal">
self.view.backgroundColor = [UIColor blueColor];</div>
<div class="MsoNormal">
else</div>
<div class="MsoNormal">
self.view.backgroundColor = [UIColor grayColor];</div>
<div class="MsoNormal">
}</div>
<div class="MsoNormal">
}</div>
<h1 style="margin: 0px; position: relative;">
MyViewController.h</h1>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@interface MyViewController : UIViewController</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
- (IBAction)buttoCLicked:(UIButton *)sender;</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
@end</div>
<div class="MsoPlainText">
<br /></div>
<h1 style="margin: 0px; position: relative;">
MyViewController.m</h1>
<h1 style="margin: 0px; position: relative;">
<o:p> </o:p></h1>
<div class="MsoNormal">
- (IBAction)buttoCLicked:(UIButton *)sender</div>
<div class="MsoNormal">
{</div>
<div class="MsoNormal">
NSDictionary *info = [[NSDictionary alloc] initWithObjectsAndKeys:[NSString stringWithFormat:@"%d", sender.tag], @"Color", nil];</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
[[NSNotificationCenter defaultCenter] postNotificationName:@"ColorChangeNotification" object:nil userInfo:info];</div>
<div class="MsoNormal">
}</div>
</div>
</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-23912448783404016862013-12-19T02:26:00.000-08:002013-12-19T02:26:37.333-08:00Protocol simple example<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.h</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "MyVC.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface ip20ViewController : UIViewController <MyVCDelegate></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
MyVC *myvc;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
ViewController.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)clickPressed:(NSString *)message</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
NSLog(@"%@", message);</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[myvc dismissViewControllerAnimated:YES completion:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidAppear:(BOOL)animated</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidAppear:animated];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
myvc = [[MyVC alloc] init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
myvc.delegate = self;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self presentViewController:myvc animated:YES completion:nil];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
MyVC.h</h1>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
<o:p> </o:p></h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@protocol MyVCDelegate <NSObject></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@optional</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)clickPressed:(NSString *)message;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface MyVC : UIViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic, strong) id<MyVCDelegate> delegate;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (IBAction)click:(id)sender;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoPlainText" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
MyVC.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize delegate;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (IBAction)click:(id)sender</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[delegate clickPressed:@"Just Clicked!"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-35585532551714475202013-12-19T02:24:00.000-08:002013-12-19T02:24:45.485-08:00Gps With Array in iphone<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
GpsViewController.h</h1>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <UIKit/UIKit.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import <Mapkit/Mapkit.h></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@interface GpsViewController : UIViewController</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic,retain) IBOutlet MKMapView *mapView;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@property (nonatomic,retain) IBOutlet UISegmentedControl *sgmnt;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
-(IBAction)segmentSelect:(id)sender;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@end</div>
<div class="MsoNoSpacing" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
GpsViewController.m</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "GpsViewController.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "MapStruct.h"</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
@synthesize mapView,</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
sgmnt;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
-(IBAction)segmentSelect:(id)sender</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
if (sgmnt.selectedSegmentIndex==0) {</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[mapView setMapType:MKMapTypeStandard];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
else if (sgmnt.selectedSegmentIndex==1) {</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[mapView setMapType:MKMapTypeSatellite];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
else {</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[mapView setMapType:MKMapTypeHybrid];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
} </div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
- (void)viewDidLoad</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[super viewDidLoad];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
mapView.showsUserLocation=YES;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self setMap:22.3000:70.7800:@"Rajkot":@"The City of Saurastra"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self setMap: 22.4700:70.0700:@"jamnagar":@"The City of Saurastra"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[self setMap:21.5200:70.4700:@"junagadh":@"The City of Saurastra"];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
// Do any additional setup after loading the view, typically from a nib.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
-(void)setMap:(CLLocationDegrees)lati :(CLLocationDegrees)longi :(NSString *)tit :(NSString *)subtit</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
{</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
MKCoordinateRegion region;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
region.center.latitude = lati;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
region.center.longitude = longi;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
region.span.longitudeDelta = 2.8f;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
region.span.latitudeDelta = 1.5f;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[mapView setRegion:region animated:YES];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
MapStruct *ms=[[MapStruct alloc]init];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
ms.title=tit;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
ms.subtitle=subtit;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
ms.coordinate=region.center;</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[mapView addAnnotation:(id)ms];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
[mapView selectAnnotation:(id)ms animated:YES];</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
}</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-72087009963319874132013-12-19T02:19:00.000-08:002013-12-19T02:19:17.226-08:00PushView controller and PopView controller in iPhone <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
UISelectCategoryController *selectCategory;<br />
<br />
<br />
PushView Controller:-<br />
<br />
-(IBAction)btnNext_TouchUpInside:(id)sender{<br />
<br />
selectCategory = [[UISelectCategoryController alloc]initWithNibName:@"SelectCategoryView"bundle:nil];<br />
[self.navigationController pushViewController:selectCategory animated:YES];<br />
}<br />
<br />
PopView Controller:-<br />
<br />
-(IBAction)btnBack_TouchUpInside:(id)sender{<br />
<br />
[self.navigationController popViewControllerAnimated:YES];<br />
}<br />
<br />
popToView Controller:-<br />
<br />
-(IBAction)btnLocation_TouchUpInside:(id) sender{<br />
<br />
NSArray *viewController = [self.navigationController viewControllers];<br />
[self.navigationController popToViewController:[viewController objectAtIndex:1] animated:YES];<br />
}<br />
<br />
popToRootView Controller:-<br />
<br />
-(IBAction)btnLogOut_TouchUpInside:(id)sender<br />
{<br />
<br />
[self.navigationController popToRootViewControllerAnimated:YES];<br />
}<br />
<div>
<br /></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-43134111398008656052013-12-19T02:11:00.000-08:002013-12-19T02:11:42.359-08:00 Upload images with text using iPhone SDK using ASIHttpRequest <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
This example shows how to upload images using iPhone SDK. In this example we pick multiple images from iPhone Image Gallery or from iPhone Camera and send them to server using ASIHttpRequest.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span style="color: #333333;"><br /><br /><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Code for .h file.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
<br />
@interface RootViewController : UIViewController<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span>{<br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
NSMutableArray *arrImages;<br />
IBOutlet UIButton *btnImage1;<br />
IBOutlet UIButton *btnImage2;<br />
IBOutlet UIButton *btnImage3;<br />
IBOutlet UIButton *btnImage4;<br />
}<br />
<br />
- (IBAction)btnTakePicture_Clicked:(id)sender;<br />
- (IBAction)btnPostImages_Clicked:(id)sender;<br />
@end</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Code for .m file.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "RootViewController.h"<br />
#import "ASIFormDataRequest.h"<br />
<br />
@implementation RootViewController<br />
int intButton;<br />
<br />
#pragma mark -<br />
#pragma mark View lifecycle<br />
<br />
<br />
- (void)viewDidLoad {<br />
[super viewDidLoad];<br />
<br />
self.title = @"Select Images";<br />
arrImages = [[NSMutableArray alloc]init];<br />
}<br />
<br />
- (IBAction)btnTakePicture_Clicked:(id)sender<br />
{<br />
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select Image from..." delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Camera", @"Image Gallary", nil];<br />
actionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;<br />
actionSheet.alpha=0.90;<br />
actionSheet.tag = 1;<br />
[actionSheet showInView:self.view];<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
[actionSheet release];<br />
UIButton *btn = (UIButton *)sender;<br />
intButton = btn.tag;<br />
}<br />
<br />
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex<br />
{<br />
switch (actionSheet.tag)<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
{<br />
case 1:<br />
switch (buttonIndex)<br />
{<br />
case 0:<br />
{ <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
#if TARGET_IPHONE_SIMULATOR<br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Message" message:@"Camera not available." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];<br />
[alert show];<br />
[alert release];<br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
#elif TARGET_OS_IPHONE <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
UIImagePickerController *picker = [[UIImagePickerController alloc] init]; <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
picker.sourceType = UIImagePickerControllerSourceTypeCamera; <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
picker.delegate = self; <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
//picker.allowsEditing = YES; <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
[self presentModalViewController:picker animated:YES];<br />
[picker release];<br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
#endif <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
}<br />
break;<br />
case 1:<br />
{<br />
UIImagePickerController *picker = [[UIImagePickerController alloc] init]; <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
picker.delegate = self; <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
[self presentModalViewController:picker animated:YES];<br />
[picker release];<br />
}<br />
break;<br />
}<br />
break;<br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
default:<br />
break;<br />
} <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
}<br />
<br />
-(void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info<br />
{<br />
NSData *dataImage = UIImageJPEGRepresentation([info objectForKey:@"UIImagePickerControllerOriginalImage"],1);<br />
UIImage *img = [[UIImage alloc] initWithData:dataImage];<br />
<br />
if (intButton == 1) {<br />
[btnImage1 setBackgroundImage:img forState:UIControlStateNormal];<br />
[btnImage1 setImage:nil forState:UIControlStateNormal];<br />
}<br />
else if (intButton == 2) {<br />
[btnImage2 setBackgroundImage:img forState:UIControlStateNormal];<br />
[btnImage2 setImage:nil forState:UIControlStateNormal];<br />
}<br />
else if (intButton == 3) {<br />
[btnImage3 setBackgroundImage:img forState:UIControlStateNormal];<br />
[btnImage3 setImage:nil forState:UIControlStateNormal];<br />
}<br />
else {<br />
[btnImage4 setBackgroundImage:img forState:UIControlStateNormal];<br />
[btnImage4 setImage:nil forState:UIControlStateNormal];<br />
}<br />
[arrImages addObject:dataImage];<br />
[picker dismissModalViewControllerAnimated:YES];<br />
}<br />
<br />
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {<br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
[self.navigationController dismissModalViewControllerAnimated:YES]; <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
}<br />
<br />
- (IBAction)btnPostImages_Clicked:(id)sender {<br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
if ([arrImages count] > 0) {<br />
NSString *strURL = @"Write Your URL Here.";<br />
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:strURL]];<br />
[request setDelegate:self];<br />
[request setPostValue:@"This is sample text..." forKey:@"text"];<br />
for (int i = 0; i < [arrImages count]; i++) {<br />
[request addData:[arrImages objectAtIndex:i] withFileName:@"image.jpg" andContentType:@"image/jpeg" forKey:[NSString stringWithFormat:@"image%d", i + 1]];<br />
} <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
[request startAsynchronous];<br />
}<br />
else {<br />
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"Message" message:@"Please select images..." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];<br />
[alertView show];<br />
[alertView release];<br />
}<br />
}<br />
<br />
- (void)requestFinished:(ASIHTTPRequest *)request {<br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
NSString *receivedString = [request responseString];<br />
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"Message" message:receivedString delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil];<br />
[alertView show];<br />
[alertView release];<br />
}<br />
- (void)requestFailed:(ASIHTTPRequest *)request {<br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
NSString *receivedString = [request responseString];<br />
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"Message" message:receivedString delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];<br />
[alertView show];<br />
[alertView release];<br />
}<br />
<br />
#pragma mark -<br />
#pragma mark Memory management<br />
<br />
- (void)didReceiveMemoryWarning {<br />
// Releases the view if it doesn't have a superview.<br />
[super didReceiveMemoryWarning];<br />
<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />
// Relinquish ownership any cached data, images, etc that aren't in use.<br />
}<br />
<br />
- (void)viewDidUnload {<br />
// Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.<br />
// For example: self.myOutlet = nil;<br />
}<br />
<br />
<br />
- (void)dealloc {<br />
[super dealloc];<br />
}<br />
<br />
<br />
@end </div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-58813893411545016332013-12-19T02:07:00.000-08:002013-12-19T02:07:44.218-08:00 Send text to twitter account using iPhone SDK <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
This example shows how to send text to Twitter account using iPhone SDK this example using OAuth.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span style="color: #333333;"><br /><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Code for .h file.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />#import "SA_OAuthTwitterController.h"<br /><br />@class SA_OAuthTwitterEngine;<br /><br />@interface UITwitterSharingController : UIViewController<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />{<br /> IBOutlet UIView *viewTextView;<br /> IBOutlet UITextView *txtViewDescription;<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> SA_OAuthTwitterEngine *_engine;<br /> NSString *oauth_token;<br /> NSString *oauth_token_secret;<br />}<br /><br />- (IBAction)btnShare_Clicked:(id)sender;<br /><br />- (void)btnDone_Clicked:(id)sender;<br />- (void)authenticateInAppViaTwitter;<br />- (void)postInAppTwitter;<br /><br />@end</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Code for .m file.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
#import "UITwitterSharingController.h"<br />#import "SA_OAuthTwitterEngine.h"<br /><br />#define kOAuthConsumerKey @"78lKbzufPV9F7WmfvhUEw"<br />#define kOAuthConsumerSecret @"0vDpOuE7Y6knvRLCQ2zruc1q2oTkFNTXHW1dwEU"<br /><br />@implementation UITwitterSharingController<br /><br />int intTwitterFlag;<br /><br />- (void)viewDidLoad {<br /> [super viewDidLoad];<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> self.navigationController.navigationBar.hidden = TRUE;<br /> txtViewDescription.font = [UIFont systemFontOfSize:13];<br /> intTwitterFlag = 0;<br />}<br /><br />- (IBAction)btnShare_Clicked:(id)sender<br />{<br /> [self authenticateInAppViaTwitter];<br />}<br /><br />- (void)authenticateInAppViaTwitter<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />{ <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> intTwitterFlag = 0;<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> if(!_engine)<br /> {<br /> _engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];<br /> _engine.consumerKey = kOAuthConsumerKey;<br /> _engine.consumerSecret = kOAuthConsumerSecret; <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> }<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self];<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> if (controller)<br /> {<br /> [self presentModalViewController: controller animated: YES];<br /> intTwitterFlag = 1;<br /> }<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> if (intTwitterFlag == 0)<br /> {<br /> [self performSelector:@selector(postInAppTwitter)withObject:nil afterDelay:1.0];<br /> }<br />}<br /><br />- (void)postInAppTwitter<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />{ <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> [_engine sendUpdate:txtViewDescription.text];<br />}<br /><br />//=============================================================================================================================<br />#pragma mark SA_OAuthTwitterEngineDelegate<br />- (void) storeCachedTwitterOAuthData: (NSString *) data forUsername: (NSString *) username<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />{<br /> NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> [defaults setObject: data forKey: @"authData"];<br /> [defaults synchronize];<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> if (intTwitterFlag == 1)<br /> { <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> [self performSelector:@selector(postInAppTwitter)withObject:nil afterDelay:1.0];<br /> }<br />}<br /><br />- (NSString *) cachedTwitterOAuthDataForUsername: (NSString *) username<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />{<br /> return [[NSUserDefaults standardUserDefaults] objectForKey: @"authData"];<br />}<br /><br />//=============================================================================================================================<br />#pragma mark TwitterEngineDelegate<br />- (void) requestSucceeded: (NSString *) requestIdentifier<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />{<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> NSLog(@"Request %@ succeeded", requestIdentifier);<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> UIAlertView *alrtView = [[UIAlertView alloc]initWithTitle:@"Tweet posted on your twitter account" message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Ok", nil];<br /> [alrtView show];<br /> [alrtView release];<br />}<br /><br />- (void) requestFailed: (NSString *) requestIdentifier withError: (NSError *) error<span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br />{<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> NSLog(@"Request %@ failed with error: %@", requestIdentifier, error);<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> UIAlertView *alrtView = [[UIAlertView alloc]initWithTitle:@"Tweet did not posted" message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Ok", nil];<br /> [alrtView show];<br /> [alrtView release];<br />}<br /><br />- (void)textViewDidBeginEditing:(UITextView *)textView<br />{<br /> [self.view addSubview:viewTextView];<br /> [UIView beginAnimations:nil context:NULL];<br /> [UIView setAnimationDuration:0.3];<br /> CGRect rect = self.view.frame;<br /> //rect.origin.y = self.view.frame.origin.y - 174;<br /> rect.origin.y = self.view.frame.origin.y - 0;<br /> self.view.frame = rect;<br /> viewTextView.frame = CGRectMake(0, 200, 320, 44);<br /> //viewTextView.frame = CGRectMake(0, 374, 320, 44);<br /> [UIView commitAnimations];<br />}<br /><br />- (void)btnDone_Clicked:(id)sender<br />{<br /> [txtViewDescription resignFirstResponder];<br /> [UIView beginAnimations:nil context:NULL];<br /> [UIView setAnimationDuration:0.3];<br /> CGRect rect = self.view.frame;<br /> //rect.origin.y = self.view.frame.origin.y + 174;<br /> rect.origin.y = self.view.frame.origin.y + 0;<br /> self.view.frame = rect;<br /> viewTextView.frame = CGRectMake(0, 460, 320, 44);<br /> [UIView commitAnimations];<br />}<br /><br />/*<br />// Override to allow orientations other than the default portrait orientation.<br />- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {<br /> // Return YES for supported orientations<br /> return (interfaceOrientation == UIInterfaceOrientationPortrait);<br />}<br />*/<br /><br />- (void)didReceiveMemoryWarning {<br /> // Releases the view if it doesn't have a superview.<br /> [super didReceiveMemoryWarning];<br /> <span class="apple-converted-space"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> // Release any cached data, images, etc that aren't in use.<br />}<br /><br />- (void)viewDidUnload {<br /> [super viewDidUnload];<br /> // Release any retained subviews of the main view.<br /> // e.g. self.myOutlet = nil;<br />}<br /><br /><br />- (void)dealloc {<br /> [super dealloc];<br />}<br /><br /><br />@end</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-82859271899059055362013-12-19T02:04:00.000-08:002013-12-19T02:04:47.800-08:00 select image from iPhone saved photo album or Camera<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
This code is used for selecting image from iPhone Saved Photo Album or from iPhone Camera.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br />1. Code for .h file.<span style="color: #333333;"><br /><br />#import</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /><br />@interface RootViewController : UIViewController</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;">{<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> IBOutlet UIImageView *imgPicture;<br /> NSData *dataImage;<br />}<br /><br />- (IBAction)btnTakePicture_Clicked:(id)sender;<br /><br />@end</span>2. Code for .m file.<span style="color: #333333;"><br /><br />#import "RootViewController.h"<br /><br /><br />@implementation RootViewController<br /><br /><br />#pragma mark -<br />#pragma mark View lifecycle<br /><br /><br />- (void)viewDidLoad {<br /> [super viewDidLoad];<br /><br />}<br /><br />- (IBAction)btnTakePicture_Clicked:(id)sender<br />{<br /> UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select Image from..." delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Camera", @"Image Gallary", nil];<br /> actionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;<br /> actionSheet.alpha=0.90;<br /> actionSheet.tag = 1;<br /> [actionSheet showInView:self.view];</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> [actionSheet release];<br />}<br /><br />- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex<br />{<br /> switch (actionSheet.tag)</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> {<br /> case 1:<br /> switch (buttonIndex)<br /> {<br /> case 0:<br /> { </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />#if TARGET_IPHONE_SIMULATOR<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Saw Them" message:@"Camera not available." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];<br /> [alert show];<br /> [alert release];<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />#elif TARGET_OS_IPHONE </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> UIImagePickerController *picker = [[UIImagePickerController alloc] init];</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> picker.sourceType = UIImagePickerControllerSourceTypeCamera;</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> picker.delegate = self;</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> //picker.allowsEditing = YES;</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> [self presentModalViewController:picker animated:YES];<br /> [picker release];<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />#endif </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> }<br /> break;<br /> case 1:<br /> {<br /> UIImagePickerController *picker = [[UIImagePickerController alloc] init];</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> picker.delegate = self;</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> [self presentModalViewController:picker animated:YES];<br /> [picker release];<br /> }<br /> break;<br /> }<br /> break;<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> default:<br /> break;<br /> } </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />}<br />/*<br /><br /> // if you want to edit selected image then use this delegate method.<br /><br />- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo<br />{<br /> imgPicture.image = image;<br /> [self.navigationController dismissModalViewControllerAnimated:YES];<br />} </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />*/<br /><br />-(void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info<br />{<br /> dataImage = UIImageJPEGRepresentation([info objectForKey:@"UIImagePickerControllerOriginalImage"],1);<br /> imgPicture.image = [[UIImage alloc] initWithData:dataImage];<br /> [picker dismissModalViewControllerAnimated:YES];<br />}<br /><br />- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> [self.navigationController dismissModalViewControllerAnimated:YES]; </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />}<br /><br /><br />// Override to allow orientations other than the default portrait orientation.<br />- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {<br /> // Return YES for supported orientations.<br /> return (interfaceOrientation == UIInterfaceOrientationPortrait);<br />}<br /><br />#pragma mark -<br />#pragma mark Memory management<br /><br />- (void)didReceiveMemoryWarning {<br /> // Releases the view if it doesn't have a superview.<br /> [super didReceiveMemoryWarning];<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> // Relinquish ownership any cached data, images, etc that aren't in use.<br />}<br /><br />- (void)viewDidUnload {<br /> // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.<br /> // For example: self.myOutlet = nil;<br />}<br /><br /><br />- (void)dealloc {<br /> [super dealloc];<br />}<br /><br /><br />@end<o:p></o:p></span></div>
<div>
<span style="color: #333333;"><br /></span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-28375990134297210772013-12-19T01:59:00.000-08:002013-12-19T01:59:15.191-08:00 Rotate view according to device orientation <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
This example shows how to handle device orientation and rotate view accordingly to device orientation.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /><br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
1. Code for .h file.<span style="color: #333333;"><br /><br />#import</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /><br /><br />@interface LoginViewController : UIViewController {<br /><br /> IBOutlet UILabel *lblUserName;<br /> IBOutlet UILabel *lblEmail;<br /> IBOutlet UILabel *lblPassword;<br /> IBOutlet UILabel *lblConfirmPassword;<br /> IBOutlet UITextField *txtUserName;<br /> IBOutlet UITextField *txtEmail;<br /> IBOutlet UITextField *txtPassword;<br /> IBOutlet UITextField *txtConfirmPassword;<br />}<br /><br />@end<br /></span>2. Code for .m file.<span style="color: #333333;"><br /><br />#import "LoginViewController.h"<br /><br /><br />@implementation LoginViewController<br /><br />- (void)viewDidLoad {<br /> [super viewDidLoad];<br />}<br /><br />- (void)orientationLandscape<br />{<br /> [lblUserName setFrame:CGRectMake(95, 30, 87, 21)];<br /> [lblEmail setFrame:CGRectMake(95, 69, 111, 21)];<br /> [lblPassword setFrame:CGRectMake(95, 108, 66, 21)];<br /> [lblConfirmPassword setFrame:CGRectMake(95, 147, 123, 21)];<br /> [txtUserName setFrame:CGRectMake(219, 20, 175, 31)];<br /> [txtEmail setFrame:CGRectMake(219, 59, 175, 31)];<br /> [txtPassword setFrame:CGRectMake(219, 98, 175, 31)];<br /> [txtConfirmPassword setFrame:CGRectMake(219, 137, 175, 31)];<br />}<br /><br />- (void)orientationPortrait<br />{<br /> [lblUserName setFrame:CGRectMake(11, 31, 87, 21)];<br /> [lblEmail setFrame:CGRectMake(11, 69, 111, 21)];<br /> [lblPassword setFrame:CGRectMake(11, 108, 66, 21)];<br /> [lblConfirmPassword setFrame:CGRectMake(11, 147, 123, 21)];<br /> [txtUserName setFrame:CGRectMake(135, 20, 175, 31)];<br /> [txtEmail setFrame:CGRectMake(135, 59, 175, 31)];<br /> [txtPassword setFrame:CGRectMake(135, 98, 175, 31)];<br /> [txtConfirmPassword setFrame:CGRectMake(135, 137, 175, 31)];<br />}<br /><br />// Override to allow orientations other than the default portrait orientation.<br />- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />{<br /> // Return YES for supported orientations<br /> if ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight))<br /> {<br /> [self orientationLandscape];<br /> }<br /> else<br /> {<br /> [self orientationPortrait];<br /> }<br /> return YES;<br />}<br /><br /><br />- (void)didReceiveMemoryWarning {<br /> // Releases the view if it doesn't have a superview.<br /> [super didReceiveMemoryWarning];<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> // Release any cached data, images, etc that aren't in use.<br />}<br /><br />- (void)viewDidUnload {<br /> [super viewDidUnload];<br /> // Release any retained subviews of the main view.<br /> // e.g. self.myOutlet = nil;<br />}<br /><br /><br />- (void)dealloc {<br /> [super dealloc];<br />}<br /><br /><br />@end<o:p></o:p></span></div>
<div>
<span style="color: #333333;"><br /></span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-23245720894592425452013-12-19T01:51:00.001-08:002013-12-19T01:51:55.833-08:00 Post Image and text on Facebook using FBGraph<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
This example shows how to post on facebook wall using FBGraph. This example shows hows to shift up and down UIView on appearing of keyboard. This example shows how to take picture from iphone saved photo album or from iphone camera. This example shows UIActionSheet example for selecting pictures from iphone gallery or from iphone camera.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span style="color: #333333;"><br /><br /><br /><o:p></o:p></span></div>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;">Code for .h file.<br /><br />#import</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br />#import "FbGraph.h"<br /><br />@interface RootViewController : UIViewController</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;">{<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> FbGraph *fbGraph;<br /> IBOutlet UIImageView *imgPicture;<br /> IBOutlet UITextField *txtComment;<br /> NSData *dataImage;<br />}<br /><br />@property (nonatomic, retain) FbGraph *fbGraph;<br /><br />- (void)postInAppFacebook;<br />- (void)setViewMovedUp:(BOOL)movedUp;<br />- (IBAction)btnTakePicture_Clicked:(id)sender;<br />- (IBAction)btnPostOnFacebook_Clicked:(id)sender;<br /><br />@end</span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /><br /> Code for .m file.<br /><br /><br />#import "RootViewController.h"<br />#import "FbGraphFile.h"<br /><br />@implementation RootViewController<br /><br />@synthesize fbGraph;<br /><br />- (void)viewDidLoad {<br /> [super viewDidLoad];<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> //[self authenticateInAppViaFacebook];<br />}<br /><br />- (IBAction)btnTakePicture_Clicked:(id)sender<br />{<br /> UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select Image from..." delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Camera", @"Image Gallary", nil];<br /> actionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;<br /> actionSheet.alpha=0.90;<br /> actionSheet.tag = 1;<br /> [actionSheet showInView:self.view];</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> [actionSheet release];<br />}<br /><br />- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex<br />{<br /> switch (actionSheet.tag)</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> {<br /> case 1:<br /> switch (buttonIndex)<br /> {<br /> case 0:<br /> { </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br />#if TARGET_IPHONE_SIMULATOR<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Saw Them" message:@"Camera not available." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];<br /> [alert show];<br /> [alert release];<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br />#elif TARGET_OS_IPHONE </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> UIImagePickerController *picker = [[UIImagePickerController alloc] init];</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> picker.sourceType = UIImagePickerControllerSourceTypeCamera;</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> picker.delegate = self;</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> //picker.allowsEditing = YES;</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> [self presentModalViewController:picker animated:YES];<br /> [picker release];<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br />#endif </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> }<br /> break;<br /> case 1:<br /> {<br /> UIImagePickerController *picker = [[UIImagePickerController alloc] init];</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> picker.delegate = self;</span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> [self presentModalViewController:picker animated:YES];<br /> [picker release];<br /> }<br /> break;<br /> }<br /> break;<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> default:<br /> break;<br /> } </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br />}<br /><br />-(void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info<br />{<br /> dataImage = UIImageJPEGRepresentation([info objectForKey:@"UIImagePickerControllerOriginalImage"],1);<br /> imgPicture.image = [[UIImage alloc] initWithData:dataImage];<br /> [picker dismissModalViewControllerAnimated:YES];<br />}<br /><br />- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> [self.navigationController dismissModalViewControllerAnimated:YES]; </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br />}<br /><br />- (IBAction)btnPostOnFacebook_Clicked:(id)sender<br />{<br /> if ([txtComment.text isEqualToString:@""] ) {<br /> UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:nil message:@"Please enter comment for Picture..." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];<br /> [alertView show];<br /> [alertView release];<br /> }<br /> else if (dataImage == Nil){<br /> UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:nil message:@"Please select Picture from gallery or iPhone camera..." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];<br /> [alertView show];<br /> [alertView release];<br /> }<br /> else {<br /> /*Facebook Application ID*/<br /> NSString *client_id = @"172038482843979";<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> self.fbGraph = [[FbGraph alloc] initWithFbClientID:client_id];<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> [fbGraph authenticateUserWithCallbackObject:self andSelector:@selector(postInAppFacebook) andExtendedPermissions:@"user_photos,user_videos,publish_stream,offline_access" andSuperView:self.view];<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> }<br />}<br /><br />- (void)postInAppFacebook {<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:3];<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> //create a UIImage (you could use the picture album or camera too)<br /> UIImage *picture = [[UIImage alloc]initWithData:dataImage];<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> //create a FbGraphFile object insance and set the picture we wish to publish on it<br /> FbGraphFile *graph_file = [[FbGraphFile alloc] initWithImage:picture];<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> //finally, set the FbGraphFileobject onto our variables dictionary....<br /> [variables setObject:graph_file forKey:@"file"];<br /> //[variables setObject:@"http://iphoneapp-dev.blogspot.com/" forKey:@"description"];<br /> [variables setObject:[NSString stringWithFormat:@"http://iphoneapp-dev.blogspot.com %@", txtComment.text] forKey:@"message"];<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> //the fbGraph object is smart enough to recognize the binary image data inside the FbGraphFile<br /> //object and treat that is such.....<br /> [fbGraph doGraphPost:@"me/photos" withPostVars:variables];<br /> NSLog(@"Now log into Facebook and look at your profile & photo albums...");<br />}<br /><br />- (void)setViewMovedUp:(BOOL)movedUp{<br /> [UIView beginAnimations:nil context:NULL];<br /> [UIView setAnimationDuration:0.3];<br /> // Make changes to the view's frame inside the animation block. They will be animated instead<br /> // of taking place immediately.<br /> CGRect rect = self.view.frame;<br /> if (movedUp){ </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> if(rect.origin.y == 0)<br /> rect.origin.y = self.view.frame.origin.y - 216;<br /> }<br /> else{ </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> if(rect.origin.y < 0)<br /> rect.origin.y = self.view.frame.origin.y + 216;<br /> } </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> self.view.frame = rect; </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> [UIView commitAnimations];<br />}<br /><br />- (void)textFieldDidBeginEditing:(UITextField *)textField{<br /> // The keyboard will be shown. If the user is editing the comments, adjust the display so that the<br /> // comments field will not be covered by the keyboard.<br /> [self setViewMovedUp:YES];<br />}<br /><br />- (BOOL)textFieldShouldReturn:(UITextField *)textField{ </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> [textField resignFirstResponder];<br /> [self setViewMovedUp:NO];<br /> return NO;<br />}<br /><br />- (void)didReceiveMemoryWarning {<br /> // Releases the view if it doesn't have a superview.<br /> [super didReceiveMemoryWarning];<br /> </span><span class="apple-converted-space" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;"><span style="font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 12pt;"><br /> // Release any cached data, images, etc that aren't in use.<br />}<br /><br />- (void)viewDidUnload {<br /> [super viewDidUnload];<br /> // Release any retained subviews of the main view.<br /> // e.g. self.myOutlet = nil;<br />}<br /><br /><br />- (void)dealloc {<br /> [super dealloc];<br /> [fbGraph release];<br />}<br /><br />@end</span></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-72987467671561334952013-12-19T01:49:00.000-08:002013-12-19T01:49:10.562-08:00drag image or button in iPhone SDK using UITouch Events <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
This code is show UITouch delegate methods. In this example we use touchMoved delegate method for dragging the image.<br />
<br />
<br />
<br />
1. Code for .h file.<br />
<br />
#import<br />
<br />
<br />
@interface UIDrawController : UIViewController {<br />
<br />
IBOutlet UIImageView *imgApple;<br />
}<br />
<br />
@end<br />
<br />
2. Code for .m file.<br />
<br />
#import "UIDrawController.h"<br />
<br />
<br />
@implementation UIDrawController<br />
<br />
- (void)viewDidLoad {<br />
[super viewDidLoad];<br />
<br />
self.navigationController.navigationBar.hidden = TRUE;<br />
}<br />
<br />
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event<br />
{<br />
UITouch *touch = [touches anyObject];<br />
CGPoint pointMoved = [touch locationInView:self.view]; <br />
imgApple.frame = CGRectMake(pointMoved.x, pointMoved.y, 64, 64);<br />
}<br />
<br />
- (void)didReceiveMemoryWarning {<br />
// Releases the view if it doesn't have a superview.<br />
[super didReceiveMemoryWarning];<br />
<br />
// Release any cached data, images, etc that aren't in use.<br />
}<br />
<br />
- (void)viewDidUnload {<br />
[super viewDidUnload];<br />
// Release any retained subviews of the main view.<br />
// e.g. self.myOutlet = nil;<br />
}<br />
<br />
<br />
- (void)dealloc {<br />
[super dealloc];<br />
}<br />
<br />
<br />
@end<br />
<div>
<br /></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-7975648843266267222013-12-19T01:41:00.000-08:002013-12-19T01:41:28.353-08:00 Curl up and down a UIView with animation example in iPhone <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
This examples shows how to Curl Up a UIView with animation effect.<span class="apple-converted-space"><b><span style="color: red; font-family: Georgia, serif; font-size: 10pt;"> </span></b></span><span style="color: #333333;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Code for .h file.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span style="color: #333333;">#import</span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /><br />@interface FirstViewController : UIViewController {<br /><br /> IBOutlet UIView *viewSecond;<br /> IBOutlet UIView *viewFirst; </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />}<br /><br />- (IBAction)btnSecondView_Clicked:(id)sender;<br />- (IBAction)btnFirstView_Clicked:(id)sender;<br /><br />@end<br /><br /><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
Code for .m file.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span style="color: #333333;"><br />#import "FirstViewController.h"<br /><br />@implementation FirstViewController<br /><br />- (void)viewDidLoad {<br /> [super viewDidLoad];<br />}<br /><br />- (void)btnSecondView_Clicked:(id)sender {<br /><br /> [UIView beginAnimations:nil context:nil];<br /> [UIView setAnimationDelegate:self];<br /> [UIView setAnimationDuration:2.0];<br /> [viewSecond setAlpha:0.0];<br /> [viewFirst setAlpha:1.0];<br /> [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:viewSecond cache:YES];<br /> [UIView commitAnimations]; </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />}<br /><br />- (IBAction)btnFirstView_Clicked:(id)sender {<br /><br /> [UIView beginAnimations:nil context:nil];<br /> [UIView setAnimationDelegate:self];<br /> [UIView setAnimationDuration:2.0];<br /> [viewFirst setAlpha:0.0]; </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> [viewSecond setAlpha:1.0];<br /> [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:viewFirst cache:YES];<br /> [UIView commitAnimations];<br />}<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />- (void)didReceiveMemoryWarning {<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> [super didReceiveMemoryWarning];<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />}<br /><br /><br />- (void)dealloc {<br /> [super dealloc];<br />}<br /><br /><br />@end</span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-61459719447782433432013-12-19T01:35:00.000-08:002013-12-19T01:35:21.888-08:00 Create a countdown timer application in iPhone<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
This code is used to create a countdown timer in iPhone app.</h1>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
<o:p> </o:p></h1>
<h1 style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; margin: 0px; position: relative;">
1. Code for .h file.</h1>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br />@interface UIMyContoller : UIViewController {<br /><br /> NSTimer *timer;<br /> IBOutlet UILabel *myCounterLabel;<br />}<br /><br />@property (nonatomic, retain) UILabel *myCounterLabel;<br />-(void)updateCounter:(NSTimer *)theTimer;<br />-(void)countdownTimer;<br /><br />@end</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<b><span style="color: red;">2. Code for .m file.</span></b><span style="color: red;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br />@implementation UIMyController<br />@synthesize myCounterLabel;<br /><br />int hours, minutes, seconds;<br />int secondsLeft;<br /><br />- (void)viewDidLoad {<br /> [super viewDidLoad];<br /> <span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> secondsLeft = 16925;<br /> [self countdownTimer];<br />}<br /><br />- (void)updateCounter:(NSTimer *)theTimer {<br /> if(secondsLeft > 0 ){<br /> secondsLeft -- ;<br /> hours = secondsLeft / 3600;<br /> minutes = (secondsLeft % 3600) / 60;<br /> seconds = (secondsLeft %3600) % 60;<br /> myCounterLabel.text = [NSString stringWithFormat:@"%02d:%02d:%02d", hours, minutes, seconds];<br /> }<br /> else{<br /> secondsLeft = 16925;<br /> }<br />}<br /><br />-(void)countdownTimer{<br /> <span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> secondsLeft = hours = minutes = seconds = 0;<br /> if([timer isValid])<br /> {<br /> [timer release];<br /> }<br /> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; <span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><br /> timer = [NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(updateCounter:) userInfo:nil repeats:YES];<br /> [pool release];<br />}</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-73160786740006822992013-12-18T06:15:00.000-08:002013-12-18T06:15:50.061-08:00draw user define lines and curves in iPhone <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
This code is used to draw user define lines and curves on iPhone app. This code is used to draw line paint brush on iPhone app.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
1. Code for .h file.</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<span style="color: #333333;">@interface UIMyController : UIViewController {<br /><br />IBOutlet UIView *viewField;<br />UIImageView *drawImage;<br />BOOL mouseSwiped;<br />CGPoint lastPoint;<br /><br />}<br /><br />@end<o:p></o:p></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 18px;">
2. code for .m file<span style="color: #333333;"><br /></span> <span style="color: #333333;"><br />- (void)viewDidLoad {<br /> [super viewDidLoad];<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> drawImage = [[UIImageView alloc] initWithImage:nil];<br /> drawImage.frame = viewField.frame;<br /> [self.view addSubview:drawImage];<br />}<br /><br />- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> mouseSwiped = NO;<br /> UITouch *touch = [touches anyObject];<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> if ([touch tapCount] == 2) {<br /> drawImage.image = nil;<br /> return;<br /> }<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> lastPoint = [touch locationInView:viewField];<br /> //lastPoint.y = 20;<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />}<br /><br /><br />- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {<br /> mouseSwiped = YES;<br /> UITouch *touch = [touches anyObject]; </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> CGPoint currentPoint = [touch locationInView:viewField];<br /> //currentPoint.y -= 20; // only for 'kCGLineCapRound'<br /> UIGraphicsBeginImageContext(viewField.frame.size);<br /> //Albert Renshaw - Apps4Life<br /> [drawImage.image drawInRect:CGRectMake(0, 0, drawImage.frame.size.width, drawImage.frame.size.height)]; //originally self.frame.size.width, self.frame.size.height)];<br /> CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); //kCGLineCapSquare, kCGLineCapButt, kCGLineCapRound<br /> CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 5.0); // for size<br /> CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0); //values for R, G, B, and Alpha<br /> CGContextBeginPath(UIGraphicsGetCurrentContext());<br /> CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);<br /> CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y);<br /> CGContextStrokePath(UIGraphicsGetCurrentContext());<br /> drawImage.image = UIGraphicsGetImageFromCurrentImageContext();<br /> UIGraphicsEndImageContext();<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> lastPoint = currentPoint; </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br />}<br /><br />- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> UITouch *touch = [touches anyObject];<br /> </span><span class="apple-converted-space"><span style="color: #333333; font-family: Georgia, serif; font-size: 10pt;"> </span></span><span style="color: #333333;"><br /> if ([touch tapCount] == 2) {<br /> drawImage.image = nil;<br /> return;<br /> }<br /> if(!mouseSwiped) {<br /> //if color == green<br /> UIGraphicsBeginImageContext(viewField.frame.size);<br /> [drawImage.image drawInRect:CGRectMake(0, 0, drawImage.frame.size.width, drawImage.frame.size.height)]; //originally self.frame.size.width, self.frame.size.height)];<br /> CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound); //kCGLineCapSquare, kCGLineCapButt, kCGLineCapRound<br /> CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 5.0);<br /> CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0);<br /> CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);<br /> CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);<br /> CGContextStrokePath(UIGraphicsGetCurrentContext());<br /> CGContextFlush(UIGraphicsGetCurrentContext());<br /> drawImage.image = UIGraphicsGetImageFromCurrentImageContext();<br /> UIGraphicsEndImageContext();<br /> }<br />}<o:p></o:p></span></div>
<div>
<span style="color: #333333;"><br /></span></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6807163504295455917.post-21323397646268182782013-12-18T05:45:00.000-08:002013-12-18T05:45:37.835-08:00This Code is used to find UIID (Device Id) for iPhone Device or iPhone Simulator.<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 25.59375px;">NSString *udid = [[UIDevice currentDevice] uniqueIdentifier];</span><br style="color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 25.59375px;" /><span style="background-color: white; color: #222222; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 13px; line-height: 25.59375px;">udid = [udid stringByReplacingOccurrencesOfString:@"-" withString:@""];</span></div>
Unknownnoreply@blogger.com0