im not able to update delete create new customer in webpro

Pinakin_Patel
Member Posts: 3
hello every one,
please help me as soon as possible, i create on web application with webservice of NAV 2009, i fatch data of cutomer card successfully but i dont able to update customer data and create new customer.. ](*,)
i write code for fatch data of cutomer card are as under and it is work perfactly..but what about update and create new customer..
protected void Page_Load(object sender, EventArgs e)
{
Customer_Service Service = new Customer_Service();
Service.UseDefaultCredentials = true;
Customer[] Customers = Service.ReadMultiple(null, null, 0);
for (int i = 0; i < Customers.Length; i++)
//ListBox1.Items.Add(Customers.No);
DropDownList1.Items.Add(Customers.No);
}
protected void Button2_Click(object sender, EventArgs e)
{
Customer_Service service = new Customer_Service();
service.UseDefaultCredentials = true;
TextBox1.Text = service.Read(DropDownList1.SelectedItem.Value).Name;
TextBox2.Text = service.Read(DropDownList1.SelectedItem.Value).Address;
TextBox3.Text = service.Read(DropDownList1.SelectedItem.Value).Phone_No;
TextBox4.Text = service.Read(DropDownList1.SelectedItem.Value).City;
}
Now please give me solution as soon as possible... ]
please help me as soon as possible, i create on web application with webservice of NAV 2009, i fatch data of cutomer card successfully but i dont able to update customer data and create new customer.. ](*,)
i write code for fatch data of cutomer card are as under and it is work perfactly..but what about update and create new customer..
protected void Page_Load(object sender, EventArgs e)
{
Customer_Service Service = new Customer_Service();
Service.UseDefaultCredentials = true;
Customer[] Customers = Service.ReadMultiple(null, null, 0);
for (int i = 0; i < Customers.Length; i++)
//ListBox1.Items.Add(Customers.No);
DropDownList1.Items.Add(Customers.No);
}
protected void Button2_Click(object sender, EventArgs e)
{
Customer_Service service = new Customer_Service();
service.UseDefaultCredentials = true;
TextBox1.Text = service.Read(DropDownList1.SelectedItem.Value).Name;
TextBox2.Text = service.Read(DropDownList1.SelectedItem.Value).Address;
TextBox3.Text = service.Read(DropDownList1.SelectedItem.Value).Phone_No;
TextBox4.Text = service.Read(DropDownList1.SelectedItem.Value).City;
}
Now please give me solution as soon as possible... ]
0
Comments
-
Search existing examples how to use the webservices. It will be faster than waiting for answers there. You already should solve this yourself. If you have some specific problem, that something is not working etc. than it is much easier to answer it.
Just open this URL and read the documentation... ;-)0 -
Thank you very much sir,, thanks a lot for this link... with this link i m complited find customer, update customer, delete customer and create new customer....from my webpage with using of webservices....
Thanks again
Regards
Pinakin Patel0 -
You are welcome!
In most cases, the answers are already there... somewhere... ;-)0 -
I think this code will help u .
First You Have to publish Web service in Navision Webservice table and then use this web service in your web application.
For createStreamList_Service stream = new StreamList_Service(); stream.UseDefaultCredentials = true; StreamList newstream = new StreamList(); newstream.Code = txt_code.Text; newstream.Description = Txt_Description.Text; newstream.Description_2 = Txt_Description2.Text; stream.Create(ref newstream);
For UpdateStreamList_Service stream = new StreamList_Service(); stream.UseDefaultCredentials = true; StreamList newstream = new StreamList(); newstream.Code = txt_code.Text; newstream = stream.Read(newstream.Code); newstream.Description = Txt_Description.Text; newstream.Description_2 = Txt_Description2.Text; stream.Update(ref newstream);
Ashish Gupta
Navision Technical Consultant0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions