Click here to Skip to main content
16,020,518 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to get textbox text lines count? Pin
K030629-Jun-09 2:08
K030629-Jun-09 2:08 
AnswerRe: How to get textbox text lines count? Pin
dan!sh 29-Jun-09 2:50
professional dan!sh 29-Jun-09 2:50 
AnswerRe: How to get textbox text lines count? Pin
Henry Minute29-Jun-09 6:03
Henry Minute29-Jun-09 6:03 
Questionhow to use windows service in another project? Pin
Narendra Reddy Vajrala29-Jun-09 1:27
Narendra Reddy Vajrala29-Jun-09 1:27 
AnswerRe: how to use windows service in another project? Pin
himanshu256129-Jun-09 1:50
himanshu256129-Jun-09 1:50 
GeneralRe: how to use windows service in another project? Pin
Narendra Reddy Vajrala29-Jun-09 2:03
Narendra Reddy Vajrala29-Jun-09 2:03 
GeneralRe: how to use windows service in another project? [modified] Pin
himanshu256129-Jun-09 2:13
himanshu256129-Jun-09 2:13 
GeneralRe: how to use windows service in another project? [modified] Pin
Narendra Reddy Vajrala29-Jun-09 2:27
Narendra Reddy Vajrala29-Jun-09 2:27 
what am trying to do is

i want to insert records into a sqlTable for that i created a method with 4 arguments in windows services class.
inside that method i wrote code to insert those 4 arguments.
i installed this windows service.

from another project i want to call this method
To insert records from a form i called that service like this

WindowsService1.Service1 winService = new WindowsService1.Service1();<br />
            winService.insertValues(txtcustId.Text, txtcustName.Text, txtcustPhone.Text, txtcustAddress.Text);


here insertValues is my method inside windows service, where i wrote insert statement.


is this correct way?

when i tried to build it is giving below error
<br />
Error 2 The type 'System.ServiceProcess.ServiceBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. C:\Inetpub\wwwroot\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs 451 13 WindowsFormsApplication1<br />


modified on Monday, June 29, 2009 8:37 AM

GeneralRe: how to use windows service in another project? Pin
himanshu256129-Jun-09 2:36
himanshu256129-Jun-09 2:36 
GeneralRe: Please check this code Pin
Narendra Reddy Vajrala29-Jun-09 2:52
Narendra Reddy Vajrala29-Jun-09 2:52 
GeneralRe: Please check this code Pin
himanshu256129-Jun-09 3:04
himanshu256129-Jun-09 3:04 
GeneralRe: Please check this code Pin
Narendra Reddy Vajrala29-Jun-09 3:11
Narendra Reddy Vajrala29-Jun-09 3:11 
GeneralRe: Please check this code Pin
himanshu256129-Jun-09 3:15
himanshu256129-Jun-09 3:15 
GeneralRe: how to use windows service in another project? Pin
himanshu256129-Jun-09 2:47
himanshu256129-Jun-09 2:47 
GeneralRe: how to use windows service in another project? Pin
Narendra Reddy Vajrala29-Jun-09 2:53
Narendra Reddy Vajrala29-Jun-09 2:53 
GeneralRe: how to use windows service in another project? Pin
J4amieC29-Jun-09 3:00
J4amieC29-Jun-09 3:00 
GeneralRe: how to use windows service in another project? Pin
Narendra Reddy Vajrala29-Jun-09 3:05
Narendra Reddy Vajrala29-Jun-09 3:05 
GeneralRe: how to use windows service in another project? Pin
himanshu256129-Jun-09 3:09
himanshu256129-Jun-09 3:09 
GeneralRe: how to use windows service in another project? Pin
J4amieC29-Jun-09 4:21
J4amieC29-Jun-09 4:21 
GeneralRe: how to use windows service in another project? Pin
Vikram A Punathambekar29-Jun-09 5:35
Vikram A Punathambekar29-Jun-09 5:35 
GeneralRe: how to use windows service in another project? Pin
J4amieC29-Jun-09 5:46
J4amieC29-Jun-09 5:46 
AnswerRe: how to use windows service in another project? Pin
Vikram A Punathambekar29-Jun-09 3:07
Vikram A Punathambekar29-Jun-09 3:07 
Generalcan you please check this code? Pin
Narendra Reddy Vajrala29-Jun-09 3:14
Narendra Reddy Vajrala29-Jun-09 3:14 
GeneralRe: can you please check this code? Pin
J4amieC29-Jun-09 4:20
J4amieC29-Jun-09 4:20 
Questioncreating excel workbooks from a given template in a particular folder Pin
Krishna Aditya29-Jun-09 1:07
Krishna Aditya29-Jun-09 1:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.