Web Services in.net (2)
|
|
- Caroline Fields
- 6 years ago
- Views:
Transcription
1 Web Services in.net (2) These slides are meant to be for teaching purposes only and only for the students that are registered in CSE4413 and should not be published as a book or in any form of commercial product, unless written permission is obtained. 1
2 Another example A web service that exposes methods for add, subtract, multiply, divide. 2
3 3
4 4
5 The code: MathService.asmx.cs The web methods 5
6 The code using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Web; using System.Web.Services; namespace WebService1Math /// <summary> /// Summary description for Service1. /// </summary> public class MathService : System.Web.Services.WebService public MathService() //CODEGEN: This call is required by the ASP.NET Web Services Designer InitializeComponent(); #region Component Designer generated code //Required by the Web Services Designer private IContainer components = null; 6
7 // / [WebMethod ( Description = "Add two integers") ] public int Add(int a, int b) return a+b; [WebMethod ( Description = "Substract two integers") ] public int Minus(int a, int b) return a-b; [WebMethod ( Description = "Multiply two integers") ] public int Times(int a, int b) return a*b; [WebMethod ( Description = "Divide two integers") ] public int Divide(int a, int b) return a/b; 7
8 Using the MathService web service With a windows application The buttons clicks invoke corresponding method of web service. 8
9 Building the windows application 9
10 Select the appropriate service. 10
11 Supply the desired name. 11
12 .. The web service is incorporated into your windows application. The web service. The windows application Form. 12
13 Build the GUI Web service. Form 13
14 Write appropriate code for event handling myws is a web service object created inside this application. Choose desired method which is exposed by myws web service. 14
15 The code using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace WindowsApplication1UseMathWebService /// <summary> /// Summary description for Form1. /// </summary> public class Form1 : System.Windows.Forms.Form private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox textbox1; private System.Windows.Forms.TextBox textbox2; private System.Windows.Forms.TextBox textbox3; private System.Windows.Forms.Label label3; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button4; /// <summary> /// Required designer variable. /// </summary> 15
16 private System.ComponentModel.Container components = null; private MathWebService.MathService myws; public Form1() InitializeComponent(); Declare web service object myws. // // private void InitializeComponent() this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.textbox1 = new System.Windows.Forms.TextBox(); #endregion /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() Application.Run(new Form1()); 16
17 private void button1_click(object sender, System.EventArgs e) myws = new MathWebService.MathService(); int a = Int32.Parse( textbox1.text); int b = Int32.Parse( textbox2.text); textbox3.text = "" + myws.add( a, b); private void button2_click(object sender, System.EventArgs e) myws = new MathWebService.MathService(); int a = Int32.Parse( textbox1.text); int b = Int32.Parse( textbox2.text); textbox3.text = "" + myws.minus( a, b); / Create web service object, myws. Call method Add() of myws. private void button3_click(object sender, System.EventArgs e) myws = new MathWebService.MathService(); int a = Int32.Parse( textbox1.text); int b = Int32.Parse( textbox2.text); textbox3.text = "" + myws.times( a, b); private void button4_click(object sender, System.EventArgs e) myws = new MathWebService.MathService(); int a = Int32.Parse( textbox1.text); int b = Int32.Parse( textbox2.text); textbox3.text = "" + myws.divide( a, b); 17
18 Using the MathService web service With a Web (ASP.NET) application 18
19 Building the Web ASP.net application 19
20 .. After going through the usual steps, the web Service is incorporated into your ASP.net application. The Web Service. The ASP.NET web Form 20
21 Build the GUI Instance variable myws (of type MathWebService.MathService) has been declared. 21
22 using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; The code namespace WebApplication1UseMathService /// <summary> /// Summary description for WebForm1. /// </summary> public class WebForm1 : System.Web.UI.Page protected System.Web.UI.WebControls.Label Label1; protected System.Web.UI.WebControls.Label Label2; protected System.Web.UI.WebControls.Label Label3; protected System.Web.UI.WebControls.TextBox TextBox1; protected System.Web.UI.WebControls.TextBox TextBox2; protected System.Web.UI.WebControls.TextBox TextBox3; protected System.Web.UI.WebControls.Button Button1; protected System.Web.UI.WebControls.Button Button2; protected System.Web.UI.WebControls.Button Button3; protected System.Web.UI.WebControls.Button Button4; 22
23 private MathWebService.MathService myws; private void Page_Load(object sender, System.EventArgs e) // Put user code to initialize the page here #region Web Form Designer generated code override protected void OnInit(EventArgs e) // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.oninit(e); /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() this.button1.click += new System.EventHandler(this.Button1_Click); this.button2.click += new System.EventHandler(this.Button2_Click); this.button3.click += new System.EventHandler(this.Button3_Click); this.button4.click += new System.EventHandler(this.Button4_Click); this.load += new System.EventHandler(this.Page_Load); #endregion 23
24 private void Button1_Click(object sender, System.EventArgs e) myws = new MathWebService.MathService(); int a = Int32.Parse( TextBox1.Text); int b = Int32.Parse( TextBox2.Text); TextBox3.Text = "" + myws.add(a, b); / private void Button2_Click(object sender, System.EventArgs e) myws = new MathWebService.MathService(); int a = Int32.Parse( TextBox1.Text); int b = Int32.Parse( TextBox2.Text); TextBox3.Text = "" + myws.minus(a, b); private void Button3_Click(object sender, System.EventArgs e) myws = new MathWebService.MathService(); int a = Int32.Parse( TextBox1.Text); int b = Int32.Parse( TextBox2.Text); TextBox3.Text = "" + myws.times(a, b); private void Button4_Click(object sender, System.EventArgs e) myws = new MathWebService.MathService(); int a = Int32.Parse( TextBox1.Text); int b = Int32.Parse( TextBox2.Text); TextBox3.Text = "" + myws.divide(a, b); 24
25 A web service that accesses a database Can build a Web Service that: Opens a data base Poses queries Receives results Makes results available to an application through its exposed methods (i.e., methods that have been qualified with the [WebMethod] attribute). 25
26 Example oledbdataadapter1 queries thedatabase MyStudents.mdb. Method GetGPA() is exposed as web method and returns a DataSet with all the GPAs from table Student. 26
27 Retrieve the gpa column of table Student 27
28 Running 28
29 29
30 The result gpa values retrieved from table Student The returned values are packed in a DataSet returned by method GetGPAs(). The consumer of this service should receive the dataset and use it accordingly. 30
31 The code using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Web; using System.Web.Services; namespace WebService1ADOAccess /// <summary> /// Summary description for Service1. /// </summary> public class Service1 : System.Web.Services.WebService public Service1() //CODEGEN: This call is required by the ASP.NET Web Services Designer InitializeComponent(); private System.Data.OleDb.OleDbConnection oledbconnection1; private System.Data.OleDb.OleDbDataAdapter oledbdataadapter1; private System.Data.OleDb.OleDbCommand oledbselectcommand1; private System.Data.OleDb.OleDbCommand oledbinsertcommand1; private System.Data.DataSet dataset1; #region Component Designer generated code 31
32 //Required by the Web Services Designer private IContainer components = null; /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() this.oledbconnection1 = new System.Data.OleDb.OleDbConnection(); this.oledbdataadapter1 = new System.Data.OleDb.OleDbDataAdapter(); this.oledbinsertcommand1 = new System.Data.OleDb.OleDbCommand(); this.oledbselectcommand1 = new System.Data.OleDb.OleDbCommand(); this.dataset1 = new System.Data.DataSet(); ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit(); // // oledbconnection1 // this.oledbconnection1.connectionstring OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Data Source=""E:\ e-commerce course\ WINTER 2006\MySlides\_Slides _3 ADO NET slides\ado.net My code tests\mystudentsdb.mdb"";jet OLEDB:Engine Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;jet OLEDB:SFP=False;persist security info=false;extended Properties=;Mode=Share Deny None;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1"; // // oledbdataadapter1 // 32
33 this.oledbdataadapter1.insertcommand = this.oledbinsertcommand1; this.oledbdataadapter1.selectcommand = this.oledbselectcommand1; this.oledbdataadapter1.tablemappings.addrange(new System.Data.Common.DataTableMapping[] new System.Data.Common.DataTableMapping("Table", "Student", new System.Data.Common.DataColumnMapping[] new System.Data.Common.DataColumnMapping("age", "age"), new System.Data.Common.DataColumnMapping("gpa", "gpa"), new System.Data.Common.DataColumnMapping("sex", "sex"), new System.Data.Common.DataColumnMapping("sid", "sid"), new System.Data.Common.DataColumnMapping("sname", "sname"), new System.Data.Common.DataColumnMapping("year", "year"))); // // oledbinsertcommand1 // this.oledbinsertcommand1.commandtext = "INSERT INTO Student(age, gpa, sex, sid, sname, year) VALUES (?,?,?,?,?,?)"; this.oledbinsertcommand1.connection = this.oledbconnection1; this.oledbinsertcommand1.parameters.add(new System.Data.OleDb.OleDbParameter("age", System.Data.OleDb.OleDbType.Integer, 0, "age")); this.oledbinsertcommand1.parameters.add(new System.Data.OleDb.OleDbParameter("gpa", System.Data.OleDb.OleDbType.Double, 0, "gpa")); this.oledbinsertcommand1.parameters.add(new System.Data.OleDb.OleDbParameter("sex", System.Data.OleDb.OleDbType.VarWChar, 255, "sex")); this.oledbinsertcommand1.parameters.add(new System.Data.OleDb.OleDbParameter("sid", System.Data.OleDb.OleDbType.Integer, 0, "sid")); this.oledbinsertcommand1.parameters.add(new System.Data.OleDb.OleDbParameter("sname", System.Data.OleDb.OleDbType.VarWChar, 255, "sname")); this.oledbinsertcommand1.parameters.add(new System.Data.OleDb.OleDbParameter("year", System.Data.OleDb.OleDbType.Integer, 0, "year")); 33
34 // // oledbselectcommand1 // this.oledbselectcommand1.commandtext = "SELECT gpa FROM Student"; this.oledbselectcommand1.connection = this.oledbconnection1; // // dataset1 // this.dataset1.datasetname = "NewDataSet"; this.dataset1.locale = new System.Globalization.CultureInfo("en-US"); ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).EndInit(); /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) if(disposing && components!= null) components.dispose(); base.dispose(disposing); #endregion 34
35 / [ WebMethod ( Description = "average class GPA") ] public System.Data.DataSet GetGPAs() oledbconnection1.open(); oledbdataadapter1.fill( dataset1, "res"); return dataset1; 35
36 Using the ADO Web Service With a windows application Pressing the button will invoke method GetGPAs() of the web service. Web service instance variable. DataGrid to accommodate the returned dataset. 36
37 Running 37
38 The code using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace WindowsApplication1UseWebServiceWithADO /// <summary> /// Summary description for Form1. /// </summary> public class Form1 : System.Windows.Forms.Form private System.Windows.Forms.DataGrid datagrid1; private System.Windows.Forms.Button button1; /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; public Form1() /// <summary> 38
39 // // /// Clean up any resources being used. /// </summary> private void InitializeComponent() #endregion [STAThread] static void Main() Application.Run(new Form1()); private ADOWebService.Service1 myws; Declare web service object. / private void button1_click(object sender, System.EventArgs e) myws = new ADOWebService.Service1(); datagrid1.setdatabinding( myws.getgpas(), "res"); Display received DataSet in the DataGrid. Call method GetGPAs(). 39
40 Using the ADO Web Service With a web application Calls method GetGPAs() of web service. Web service instance variable. DataGrid to accommodate the returned dataset. 40
41 Running 41
42 Web services can also deal with user defined types. So far, all web methods we encountered, work with system predefined types (i.e., they return, for example, int, string, DataSet, etc, which are all pre-defined types). A web service method can work (access, use and return) with user-defined types. User defined types are typically classes defined by the developer as part of the web service development. 42
43 The issues When a web service uses a user defined class and a web method returns an object of that class then the issue is how the receiver of that object (consumer of the web service) is aware of the received type. Note, the user-defined type resides at the site of the web service. The consumer (receiver of that type) resides at a different site. 43
44 Architecture Consumer calls web method Consumer of web service Web service class Employee private str name; private double salary; // end Employee class [WebMethod] public Employee MyMethod() return e; Employee ee = MyMethod(); The consumer must 1. Be aware of the Employee class. 2. be able to work with this object (e.g., access its properties). Web service returns object e (of type Employee). 44
45 How it is done Once the consumer specifies its intention to use the web service (by doing Add Web Reference, in visual studio, for example), it (the consumer) becomes equipped with the appropriate glue code that allows it to make sense of the received SOAP message later on (when the web method is invoked). When a user-defined type is used by a web method, the returned object (and its type characteristics) is serialized and sent to the consumer as part of a message that is normally transmitted from the web service site to the consumer site, upon invoking a web method. (Serialization is the process of converting and saving a type on a persistent storage medium, such as a disk. Upon doing so, then the type can be transmitted or copied to other media. In this context, serialization means converting and saving the type as XML and attaching this XML in a message, the SOAP message.) 45
46 How it is done / The message is sent through SOAP (simple object access protocol), from the web service to the consumer of the web service. Once the consumer receives the SOAP message, it uses its glue code to de-serialize the incoming user-defined type, and extract the relevant structure information. 46
47 An ASP.net app that uses the employee web service. [code structure] The web service reference added to the web application (by Add Web Reference.) User defined class Employee is used by the web service EmployeeService. The Web Service EmployeeService. The consumer becomes aware that the referenced web service contains a method MakeEmployee(). The consumer. A web application (ASP.net) that uses a web service EmployeeWebService. 47
48 [System.Xml.Serialization.XmlTypeAttribute(Namespace=" public class Employee /// <remarks/> public string Name; /// <remarks/> public System.Double Salary; Serialized Employee class 48
49 /// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute(" RequestNamespace=" ResponseNamespace=" Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public Employee MakeEmployee(string name, System.Double salary) object[] results = this.invoke("makeemployee", new object[] name, salary); return ((Employee)(results[0])); Glue code that informs the consumer that upon arrival of a SOAP message, there is a web method MakeEmployee(), which takes as parameters a string and a double and return an Employee object. 49
50 When testing the Web Service, you can see the structure of the SOAP messages that will be sent and received during invocation of the method MakeEmployee(). 50
51 The structure of the SOAP message. The purpose of this message is to invoke method MakeEmployee. 51
52 The entire SOAP message. [ consumer -> web service ] This is the message sent by the consumer to the web service. It asks the web service to invoke method MakeEmployee, and it supplies the required parameters. POST /WebService1WithUserDefinedClass/EmployeeService.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: " <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <MakeEmployee xmlns=" <name>string</name> <salary>double</salary> </MakeEmployee> </soap:body> </soap:envelope> Notice, the name and salary variable names are listed in this message with lower case n and s, i.e., the same way as they are declared in class Employee (at the web service site). 52
53 The entire SOAP message. [ web service -> consumer ] This is the message sent by the web service to the consumer. It communicates back to the consumer the result (returned thing ) of method MakeEmployee. HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <MakeEmployeeResponse xmlns=" <MakeEmployeeResult> <Name>string</Name> <Salary>double</Salary> </MakeEmployeeResult> </MakeEmployeeResponse> </soap:body> </soap:envelope> [System.Xml.Serialization.XmlTypeAttribute(Namespace=" public class Employee public string Name; public System.Double Salary; Notice, the name and salary variable names are listed with capital N and S. This is because the consumer does NOT know about the name and salary instance variables of Employee at the web service site, BUT it knows about the Name and Salary variables, of class Employee, as they have been serialized and are referenced at the consumer site. 53
54 Invoking method MakeEmployee() 54
55 The result This result is how we see it when testing the web service. In production mode, i.e., when consuming the web service from a remote application, these values are serialized into XML and incorporated into the SOAP response message from the web service to the consumer. Then the consumer s glue code is capable to de-serialize them and create an Employee object having these values. 55
Web Services in.net (6) cont d
Web Services in.net (6) cont d These slides are meant to be for teaching purposes only and only for the students that are registered in CSE3403 and should not be published as a book or in any form of commercial
More informationWeb Services in.net (7)
Web Services in.net (7) These slides are meant to be for teaching purposes only and only for the students that are registered in CSE4413 and should not be published as a book or in any form of commercial
More informationWeb Services in.net (6)
Web Services in.net (6) These slides are meant to be for teaching purposes only and only for the students that are registered in CSE4413 and should not be published as a book or in any form of commercial
More informationTutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic
Tutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic Outline 6.1 Test-Driving the Enhanced Inventory Application 6.2 Variables 6.3 Handling the TextChanged
More informationUser-Defined Controls
C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed
More informationTutorial 5 Completing the Inventory Application Introducing Programming
1 Tutorial 5 Completing the Inventory Application Introducing Programming Outline 5.1 Test-Driving the Inventory Application 5.2 Introduction to C# Code 5.3 Inserting an Event Handler 5.4 Performing a
More information19.5 ADO.NET Object Models
Ordering information: Visual Basic.NET How to Program 2/e The Complete Visual Basic.NET Training Course DEITEL TM on InformIT: www.informit.com/deitel Sign up for the DEITEL BUZZ ONLINE newsletter: www.deitel.net/newsletter/subscribeinformit.html.
More informationClasses in C# namespace classtest { public class myclass { public myclass() { } } }
Classes in C# A class is of similar function to our previously used Active X components. The difference between the two is the components are registered with windows and can be shared by different applications,
More informationIDoc based adapterless communication between SAP NetWeaver Application Server (SAP NetWeaver AS) and Microsoft BizTalk Server
Collaboration Technology Support Center Microsoft Collaboration Brief August 2005 IDoc based adapterless communication between SAP NetWeaver Application Server (SAP NetWeaver AS) and Microsoft BizTalk
More informationProfessional ASP.NET Web Services : Asynchronous Programming
Professional ASP.NET Web Services : Asynchronous Programming To wait or not to wait; that is the question! Whether or not to implement asynchronous processing is one of the fundamental issues that a developer
More informationListBox. Class ListBoxTest. Allows users to add and remove items from ListBox Uses event handlers to add to, remove from, and clear list
C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed
More informationUNIVERSITY OF CINCINNATI
UNIVERSITY OF CINCINNATI I, Arunkumar Chandrasekaran Date: November 10, 2005 hereby submit this work as part of the requirements for the degree of: Master of Science in: Industrial Engineering It is entitled:
More informationInheriting Windows Forms with Visual C#.NET
Inheriting Windows Forms with Visual C#.NET Overview In order to understand the power of OOP, consider, for example, form inheritance, a new feature of.net that lets you create a base form that becomes
More informationThe contents of this document are directly taken from the EPiServer SDK. Please see the SDK for further technical information about EPiServer.
Web Services Product version: 4.50 Document version: 1.0 Document creation date: 04-05-2005 Purpose The contents of this document are directly taken from the EPiServer SDK. Please see the SDK for further
More information1. Windows Forms 2. Event-Handling Model 3. Basic Event Handling 4. Control Properties and Layout 5. Labels, TextBoxes and Buttons 6.
C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed
More informationBlank Form. Industrial Programming. Discussion. First Form Code. Lecture 8: C# GUI Development
Blank Form Industrial Programming Lecture 8: C# GUI Development Industrial Programming 1 Industrial Programming 2 First Form Code using System; using System.Drawing; using System.Windows.Forms; public
More informationIn order to create your proxy classes, we have provided a WSDL file. This can be located at the following URL:
Send SMS via SOAP API Introduction You can seamlessly integrate your applications with aql's outbound SMS messaging service via SOAP using our SOAP API. Sending messages via the SOAP gateway WSDL file
More informationCALCULATOR APPLICATION
CALCULATOR APPLICATION Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;
More informationThis is the start of the server code
This is the start of the server code using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Net; using System.Net.Sockets;
More informationTutorial 19 - Microwave Oven Application Building Your Own Classes and Objects
1 Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects Outline 19.1 Test-Driving the Microwave Oven Application 19.2 Designing the Microwave Oven Application 19.3 Adding a New
More informationDatabase Programming in Visual Basic.NET
Database Programming in Visual Basic.NET Basic Discussion of Databases What is a Database What is a DBMS? File/Relation/Table Record/Tuple Field/Attribute Key (Primary, Foreign, Composite) What is Metadata?
More informationLISTING PROGRAM. //Find the maximum and minimum values in the array int maxvalue = integers[0]; //start with first element int minvalue = integers[0];
1 LISTING PROGRAM using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace SortingApplication static class Program / / The main entry point for
More informationSub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0.
Sub To Srt Converter This is the source code of this program. It is made in C# with.net 2.0. form1.css /* * Name: Sub to srt converter * Programmer: Paunoiu Alexandru Dumitru * Date: 5.11.2007 * Description:
More informationCSC 330 Object-Oriented Programming. Encapsulation
CSC 330 Object-Oriented Programming Encapsulation Implementing Data Encapsulation using Properties Use C# properties to provide access to data safely data members should be declared private, with public
More informationProcessing Web Form Output. This chapter deals with information returned by the
5001_Ch08 07/12/01 2.29 pm Page 269 C H A P T E R 8 Processing Web Form Output This chapter deals with information returned by the application or computer to various Web Form controls. This information
More informationInstructions for writing Web Services using Microsoft.NET:
Instructions for writing Web Services using Microsoft.NET: Pre-requisites: Operating System: Microsoft Windows XP Professional / Microsoft Windows 2000 Professional / Microsoft Windows 2003 Server.NET
More informationPS2 Random Walk Simulator
PS2 Random Walk Simulator Windows Forms Global data using Singletons ArrayList for storing objects Serialization to Files XML Timers Animation This is a fairly extensive Problem Set with several new concepts.
More information.NET and DB2 united with IBM DB2.NET Data Provider Objectives :.NET ADO.NET DB2 and ADO.NET DB2 - ADO.NET applications
.NET and DB2 united with IBM DB2.NET Data Provider Objectives :.NET ADO.NET DB2 and ADO.NET DB2 - ADO.NET applications ABIS Training & Consulting 1 DEMO Win Forms client application queries DB2 according
More informationFlag Quiz Application
T U T O R I A L 17 Objectives In this tutorial, you will learn to: Create and initialize arrays. Store information in an array. Refer to individual elements of an array. Sort arrays. Use ComboBoxes to
More informationHow to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample.
How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample. Author: Carlos Kassab Date: July/24/2006 First install BOBS(BaaN Ole Broker Server), you
More informationObject oriented lab /second year / review/lecturer: yasmin maki
1) Examples of method (function): Note: the declaration of any method is : method name ( parameters list ).. Method body.. Access modifier : public,protected, private. Return
More informationHoleShot Motor Sports Web site
HoleShot Motor Sports Web site By Andy C. Jen Submitted to the Faculty of the Information Engineering Technology Program in Partial Fulfillment of the Requirements for the Degree of Bachelor of Science
More informationThe following list is the recommended system requirements for running the code in this book:
What You Need to Use This Book The following list is the recommended system requirements for running the code in this book: Windows 2000 Professional or higher with IIS installed Windows XP Professional
More informationLampiran B. Program pengendali
Lampiran B Program pengendali #pragma once namespace serial using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms;
More informationnamespace Tst_Form { private: /// <summary> /// Required designer variable. /// </summary> System::ComponentModel::Container ^components;
Exercise 9.3 In Form1.h #pragma once #include "Form2.h" Add to the beginning of Form1.h #include #include For srand() s input parameter namespace Tst_Form using namespace System; using
More informationDr.Qadri Hamarsheh. Overview of ASP.NET. Advanced Programming Language (630501) Fall 2011/2012 Lectures Notes # 17. Data Binding.
Advanced Programming Language (630501) Fall 2011/2012 Lectures Notes # 17 Data Binding Outline of the Lecture Code- Behind Handling Events Data Binding (Using Custom Class and ArrayList class) Code-Behind
More informationDevEdit v4.0 Setup Guide (ASP.Net)
DevEdit v4.0 Setup Guide (ASP.Net) http://www.devedit.com Table of Contents Table of Contents...1 Legal Disclaimer...2 Getting Started...3 Web Server Requirements...3 Uploading the Files...3 Setting up
More informationPolymorphism. Polymorphism. CSC 330 Object Oriented Programming. What is Polymorphism? Why polymorphism? Class-Object to Base-Class.
Polymorphism CSC 0 Object Oriented Programming Polymorphism is considered to be a requirement of any true -oriented programming language (OOPL). Reminder: What are the other two essential elements in OOPL?
More informationM Introduction to C# Programming with Microsoft.NET - 5 Day Course
Module 1: Getting Started This module presents the concepts that are central to the Microsoft.NET Framework and platform, and the Microsoft Visual Studio.NET integrated development environment (IDE); describes
More informationConvertor Binar -> Zecimal Rosu Alin, Calculatoare, An2 Mod de Functionare: Am creat un program, in Windows Form Application, care converteste un
Convertor Binar -> Zecimal Rosu Alin, Calculatoare, An2 Mod de Functionare: Am creat un program, in Windows Form Application, care converteste un numar binar, in numar zecimal. Acest program are 4 numericupdown-uri
More informationCase Study Accessing Web Services from J2ME Devices
Case Study Accessing Web Services from J2ME Devices Principal: Students: Dr. M.C.J.D. van Eekelen Ravindra Kali [0436690] Roel Verdult [442259] Radboud University Nijmegen Master of Informatics 2 e semester
More informationOperatii pop si push-stiva
Operatii pop si push-stiva Aplicatia realizata in Microsoft Visual Studio C++ 2010 permite simularea operatiilor de introducere si extragere a elementelor dintr-o structura de tip stiva.pentru aceasta
More informationName: Course:.NET XML Web Services Title: : Unit 4/5 Subject: Web Services Instructor: Bill Buchanan Alistair Lawson.NET
Name: Course:.NET XML Web Services Title: 70-320: Unit 4/5 Subject: Web Services Instructor: Bill Buchanan Alistair Lawson.NET 70-320 UNIT 4/5 WEB SERVICES 3 4.1 Introduction 3 4.2 SOAP (Simple Object
More informationActivating AspxCodeGen 4.0
Activating AspxCodeGen 4.0 The first time you open AspxCodeGen 4 Professional Plus edition you will be presented with an activation form as shown in Figure 1. You will not be shown the activation form
More informationArrays. Arrays: Declaration and Instantiation. Array: An Array of Simple Values
What Are Arrays? CSC 0 Object Oriented Programming Arrays An array is a collection variable Holds multiple values instead of a single value An array can hold values of any type Both objects (reference)
More informationC# and.net (1) cont d
C# and.net (1) cont d Acknowledgements and copyrights: these slides are a result of combination of notes and slides with contributions from: Michael Kiffer, Arthur Bernstein, Philip Lewis, Hanspeter Mφssenbφck,
More informationASP.NET Security. 7/26/2017 EC512 Prof. Skinner 1
ASP.NET Security 7/26/2017 EC512 Prof. Skinner 1 ASP.NET Security Architecture 7/26/2017 EC512 Prof. Skinner 2 Security Types IIS security Not ASP.NET specific Requires Windows accounts (NTFS file system)
More informationif (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient;
More informationThe Microsoft.NET Framework
Microsoft Visual Studio 2005/2008 and the.net Framework The Microsoft.NET Framework The Common Language Runtime Common Language Specification Programming Languages C#, Visual Basic, C++, lots of others
More informationMainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.
APPENDIX 1 TABLE DETAILS Mainly three tables namely Teacher, Student and Class for small database of a school are used. The snapshots of all three tables are shown below. Details of Class table are shown
More information2609 : Introduction to C# Programming with Microsoft.NET
2609 : Introduction to C# Programming with Microsoft.NET Introduction In this five-day instructor-led course, developers learn the fundamental skills that are required to design and develop object-oriented
More informationVisual Studio Windows Form Application #1 Basic Form Properties
Visual Studio Windows Form Application #1 Basic Form Properties Dr. Thomas E. Hicks Computer Science Department Trinity University Purpose 1] The purpose of this tutorial is to show how to create, and
More informationCuyahoga Module Development Guide
Cuyahoga Module Development Guide Table of Contents Introduction...1 Requirements... 1 Setting up the project... 2 The simplest module possible... 3 The module controller... 3 The display user control...
More informationYou can call the project anything you like I will be calling this one project slide show.
C# Tutorial Load all images from a folder Slide Show In this tutorial we will see how to create a C# slide show where you load everything from a single folder and view them through a timer. This exercise
More informationAn array can hold values of any type. The entire collection shares a single name
CSC 330 Object Oriented Programming Arrays What Are Arrays? An array is a collection variable Holds multiple values instead of a single value An array can hold values of any type Both objects (reference)
More informationOverview. Building a Web-Enabled Decision Support System. Integrating DSS in Business Curriculum. Introduction to DatabaseSupport Systems
Excel and C# Overview Introduction to DatabaseSupport Systems Building a Web-Enabled Decision Support System Integrating DSS in Business Curriculum 2 Decision Support Systems (DSS) A decision support system
More informationThe Payroll User Interface: MODEL VIEW PRESENTER
agile.book Page 637 Friday, June 23, 2006 9:34 AM 38 The Payroll User Interface: MODEL VIEW PRESENTER As far as the customer is concerned, the Interface is the product. Jef Raskin Our payroll application
More informationCSIS 1624 CLASS TEST 6
CSIS 1624 CLASS TEST 6 Instructions: Use visual studio 2012/2013 Make sure your work is saved correctly Submit your work as instructed by the demmies. This is an open-book test. You may consult the printed
More informationAvoiding KeyStrokes in Windows Applications using C#
Avoiding KeyStrokes in Windows Applications using C# In keeping with the bcrypt.exe example cited elsewhere on this site, we seek a method of avoiding using the keypad to enter pass words and/or phrases.
More informationExperiment 5 : Creating a Windows application to interface with 7-Segment LED display
Experiment 5 : Creating a Windows application to interface with 7-Segment LED display Objectives : 1) To understand the how Windows Forms in the Windows-based applications. 2) To create a Window Application
More informationStarMail Technical Manual. Efficient Communication with Your Target Group via
StarMail 4.2.0 Technical Manual Efficient Communication with Your Target Group via e-mail StarMail 4.2.0 - Technical Manual - Version 1.0 Copyright 2008 Netstar AB. Netstar AB. Box 3415, 103 68 Stockholm,
More information.NET XML Web Services
.NET XML Web Services Bill Buchanan Date Title Kalani Unit 0: Introduction to.net - Unit 0: Introduction to.net - Unit 1: Creating/Manipulating Datasets Unit 1 Unit 1: Creating/Manipulating Datasets Unit
More informationII. Programming Technologies
II. Programming Technologies II.1 The machine code program Code of algorithm steps + memory addresses: MOV AX,1234h ;0B8h 34h 12h - number (1234h) to AX register MUL WORD PTR [5678h] ;0F7h 26h 78h 56h
More informationUNIT-3. Prepared by R.VINODINI 1
Prepared by R.VINODINI 1 Prepared by R.VINODINI 2 Prepared by R.VINODINI 3 Prepared by R.VINODINI 4 Prepared by R.VINODINI 5 o o o o Prepared by R.VINODINI 6 Prepared by R.VINODINI 7 Prepared by R.VINODINI
More informationVisual Basic/C# Programming (330)
Page 1 of 12 Visual Basic/C# Programming (330) REGIONAL 2017 Production Portion: Program 1: Calendar Analysis (400 points) TOTAL POINTS (400 points) Judge/Graders: Please double check and verify all scores
More informationDAD Lab. 1 Introduc7on to C#
DAD 2017-18 Lab. 1 Introduc7on to C# Summary 1..NET Framework Architecture 2. C# Language Syntax C# vs. Java vs C++ 3. IDE: MS Visual Studio Tools Console and WinForm Applica7ons 1..NET Framework Introduc7on
More informationNORTHPOINTE SUITE WEB SERVICES ARCHITECTURE
NORTHPOINTE SUITE WEB SERVICES ARCHITECTURE Table of Contents LDAP LOGIN 2 APPLICATION LOGIN 4 LIST REFERENCE CODES 9 STORE REFERENCE CODES 14 LIST AGENCIES 18 GET AGENCY ID 23 LIST SECURITY GROUPS 27
More informationProcessing Domain-Specific. Modeling Language. Fabien Latry, Julien Mercadal, and Charles Consel. Phoenix Research Group INRIA / LaBRI
Processing Domain-Specific Modeling Language A Case Study in Telephony Services Fabien Latry, Julien Mercadal, and Charles Consel Phoenix Research Group INRIA / LaBRI http://phoenix.labri.fr GPCE4QoS October
More information3-tier Architecture Step by step Exercises Hans-Petter Halvorsen
https://www.halvorsen.blog 3-tier Architecture Step by step Exercises Hans-Petter Halvorsen Software Architecture 3-Tier: A way to structure your code into logical parts. Different devices or software
More informationSOA SOA SOA SOA SOA SOA SOA SOA SOA SOA SOA SOA SOA SOA
P P CRM - Monolithic - Objects - Component - Interface - . IT. IT loosely-coupled Client : - Reusability - Interoperability - Scalability - Flexibility - Cost Efficiency - Customized SUN BEA IBM - extensible
More informationEvent-based Programming
Window-based programming Roger Crawfis Most modern desktop systems are window-based. What location do I use to set this pixel? Non-window based environment Window based environment Window-based GUI s are
More informationPace University. Web Service Workshop Lab Manual
Pace University Web Service Workshop Lab Manual Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University July 12, 2005 Table of Contents 1 1 Lab objectives... 1 2 Lab design...
More informationFirst start a new Windows Form Application from C# and name it Interest Calculator. We need 3 text boxes. 4 labels. 1 button
Create an Interest Calculator with C# In This tutorial we will create an interest calculator in Visual Studio using C# programming Language. Programming is all about maths now we don t need to know every
More informationIntroduction & Controls. M.Madadyar.
Introduction & Controls M.Madadyar. htt://www.students.madadyar.com ASP.NET Runtime Comilation and Execution default.asx Which language? C# Visual Basic.NET C# comiler Visual Basic.NET comiler JIT comiler
More informationRepresenting Recursive Relationships Using REP++ TreeView
Representing Recursive Relationships Using REP++ TreeView Author(s): R&D Department Publication date: May 4, 2006 Revision date: May 2010 2010 Consyst SQL Inc. All rights reserved. Representing Recursive
More informationTo start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer
C# Tutorial Create a Motivational Quotes Viewer Application in Visual Studio In this tutorial we will create a fun little application for Microsoft Windows using Visual Studio. You can use any version
More informationOGSI.NET UVa Grid Computing Group. OGSI.NET Developer Tutorial
OGSI.NET UVa Grid Computing Group OGSI.NET Developer Tutorial Table of Contents Table of Contents...2 Introduction...3 Writing a Simple Service...4 Simple Math Port Type...4 Simple Math Service and Bindings...7
More informationLISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent() call. //
1. MainForm.cs using System.Collections.Generic; using System.Drawing; LISTING PROGRAM / / Description of MainForm. / public partial class MainForm : Form public MainForm() The InitializeComponent()
More informationMain title goes here EDT Hub API Specification v2.9
Main title goes here EDT Hub API Specification v2.9 Prepared by: Philip Young, PCTI IS2 Folder: Internal\Technical\Products\EDT Date: Monday, 24 September 2007 Revision No: 2.9 (EDT Hub version 800800
More informationThe Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:
This document describes how to create a simple Windows Forms Application using some Open Core Interface functions in C# with Microsoft Visual Studio Express 2013. 1 Preconditions The Open Core Interface
More informationthis.openfiledialog = new System.Windows.Forms.OpenFileDialog(); this.label4 = new System.Windows.Forms.Label(); this.
form.designer.cs namespace final { partial class Form1 { private System.ComponentModel.IContainer components = null; should be disposed; otherwise, false. protected override void Dispose(bool disposing)
More informationForm Adapter Example. DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date :
Form Adapter Example DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date : 2009-06-19 Form_Adapter.doc DRAFT page 1 Table of Contents Creating Form_Adapter.vb... 2 Adding the
More information#pragma comment(lib, "irrklang.lib") #include <windows.h> namespace SuperMetroidCraft {
Downloaded from: justpaste.it/llnu #pragma comment(lib, "irrklang.lib") #include namespace SuperMetroidCraft using namespace System; using namespace System::ComponentModel; using namespace
More informationLISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()
A-1 LISTING PROGRAM Form Mainform /* * Created by SharpDevelop. * User: Roni Anggara * Date: 5/17/2016 * Time: 8:52 PM * * To change this template use Tools Options Coding Edit Standard Headers. */ using
More informationUse the Call Web Service action.
How to Use the Call Web Service action. Background The Call Web Service action is for advanced users and allows the workflow to make a call to a SOAP web service method. This can be used to create/edit/delete
More informationUpgrading Distributed Applications
C2161587x.fm Page 435 Friday, November 16, 2001 9:08 AM Upgrading Distributed Applications Until now we haven t really talked about upgrading large-scale distributed applications. But building these types
More informationMOSS2007 Write your own custom authentication provider (Part 4)
MOSS2007 Write your own custom authentication provider (Part 4) So in the last few posts we have created a member and role provider and configured MOSS2007 to use this for authentication. Now we will create
More informationDeveloping User Controls in EPiServer
Developing User Controls in EPiServer Abstract It is recommended that developers building Web sites based on EPiServer create their own user controls with links to base classes in EPiServer. This white
More informationand event handlers Murach's C# 2012, C6 2013, Mike Murach & Associates, Inc. Slide 1
Chapter 6 How to code methods and event handlers Murach's C# 2012, C6 2013, Mike Murach & Associates, Inc. Slide 1 Objectives Applied 1. Given the specifications for a method, write the method. 2. Give
More information!!!!! AVAILABILITY( Westcon!Web!Services! Developer s!guide! Revision History Document Version. Publication Date
WestconWebServices Developer sguide AVAILABILITY( Revision History Document Version Publication Date Author Record Description 1.0 2/2/2008 Sedat Behar Start 1.1 7/10/2008 Sedat Behar Update with Production
More informationIHS Haystack Web Services Quick Start Guide April 2014
IHS Haystack Web Services Quick Start Guide April 2014 Table of Contents: Overview Methods GetFLISBriefResultsByCAGECodeAndPartNumber GetFLISBriefResultsByPartNumber GetFLISSummaryResultsByMultipleNIINs
More informationGSU Alumni Portal. OPUS Open Portal to University Scholarship. Governors State University. Vemuri Vinusha Chowdary Governors State University
Governors State University OPUS Open Portal to University Scholarship All Capstone Projects Student Capstone Projects Fall 2015 GSU Alumni Portal Vemuri Vinusha Chowdary Governors State University Sairam
More informationUNIT - III BUILDING WINDOWS APPLICATION GENERAL WINDOWS CONTROLS FOR THE WINDOWS APPLICATION
UNIT - III BUILDING WINDOWS APPLICATION GENERAL WINDOWS CONTROLS FOR THE WINDOWS APPLICATION 1 SLNO CONTROL NAME SLNO CONTROL NAME 1. Button 9. PictureBox 2. Checkbox 3. RadioButton 4. Label 5. Textbox
More informationWeb Forms User Security and Administration
Chapter 7 Web Forms User Security and Administration In this chapter: Administering an ASP.NET 2.0 Site...................................... 238 Provider Configuration................................................
More informationUser Filter State. Chapter 11. Overview of User Filter State. The PDSAUserFilterState Class
Chapter 11 User Filter State When users visit a search page (or an add, edit and delete page with a set of search filters above the grid), each user will enter search criteria, drill down on a search result
More informationการสร างเว บเซอร ว สโดยใช Microsoft.NET
การสร างเว บเซอร ว สโดยใช Microsoft.NET อ.ดร. กานดา ร ณนะพงศา ภาคว ชาว ศวกรรมคอมพ วเตอร คณะว ศวกรรมคอมพ วเตอร มหาว ทยาล ยขอนแก น บทน า.NET เป นเคร องม อท เราสามารถน ามาใช ในการสร างและเร ยกเว บเซอร ว สได
More informationINSURER BATCH UPLOAD GUIDE NORTH CAROLINA SURPLUS LINES ASSOCIATION
INSURER BATCH UPLOAD GUIDE NORTH CAROLINA SURPLUS LINES ASSOCIATION TABLE OF CONTENTS 1 Document Metadata... 4 1.1 Authors... 4 1.2 Intended Audience... 4 1.3 Glossary of Terms and Acronyms... 4 1.4 Document
More informationXNA 4.0 RPG Tutorials. Part 11b. Game Editors
XNA 4.0 RPG Tutorials Part 11b Game Editors I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of tutorials on
More informationNotes. IS 651: Distributed Systems 1
Notes Case study grading rubric: http://userpages.umbc.edu/~jianwu/is651/case-study-presentation- Rubric.pdf Each group will grade for other groups presentation No extra assignments besides the ones in
More informationIntroduction to.net. Andrew Cumming, SoC. Introduction to.net. Bill Buchanan, SoC. W.Buchanan (1)
Andrew Cumming, SoC Bill Buchanan, SoC W.Buchanan (1) Course Outline 11-12am 12-1pm: 1-1:45pm 1:45-2pm:, Overview of.net Framework,.NET Components, C#. C# Language Elements Classes, Encapsulation, Object-Orientation,
More information