|
Hi,
I have created a window application. I have to provide security to it. I have to provide a login form with username and password. The username and password are present in the database. When i click the login button it should compare the username and password entered in the form with that in database and give access to the Window application that i first created. How to do it.
Please help
Nitin Raj Bidkikar
|
|
|
|
|
Hi,
add a form to your project. Add two textboxes to the form. Add a button to the form. Hook up the button's onclick event handler to retrieve data from the database and compare this with the data in the textboxes.
Best,
Morten
|
|
|
|
|
Hi,
I am creating Excel sheets using Excel Automation library. I want to change 'Negative Number' format for 'Currency' category. Please help, if you know how to do it!
Thanks!
jayasshc
|
|
|
|
|
Hi,
You might required to reach the required cells/range of cells to format the cells.
Excel.Application excelApp = new Excel.ApplicationClass();<br />
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(File_Path,<br />
0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",<br />
true, false, 0, true, false, false);<br />
Excel.Sheets excelSheets = excelWorkbook.Worksheets;<br />
Excel.Worksheet excelWorksheet = (Excel.Worksheet)excelSheets.get_Item(fileName);<br />
Excel.Range excelCells;<br />
<br />
excelCells = (Excel.Range)excelWorksheet.get_Range("A1", "G1");<br />
excelCells.Select();<br />
The above example code will select a range of cells from A1 (column name) to G1 (column name). Now you have range of required cells to apply any specific format.
Here let me explian some formating tips interms of Font style and name.
excelCells.WrapText=true;<br />
excelCells.HorizontalAlignment=Excel.Constants.xlCenter;<br />
excelCells.Borders.LineStyle=Excel.Constants.xlSolid;<br />
excelCells.Font.Bold = true;<br />
excelCells.Font.Size = 9;<br />
excelCells.Font.Name = "Verdana";
If the post/article served your purpose then, please assist me in keeping it up by donating a small amount of money to my Paypal account. Email: sreejithssnair@hotmail.com
|
|
|
|
|
Hi,
I want to give Currency Format for Negative Numbers, do you have any code snippet for that?
Thanks a LOT!
jayasshc
|
|
|
|
|
Hi,
In line with the last post, you can use this line of code to retrieve the value from a specified cell and use string format.
excelCells = (Excel.Range)excelWorksheet.get_Range("A1",Type.Missing); <br />
excelCells.Value2 = "File Name";
If the post/article served your purpose then, please assist me in keeping it up by donating a small amount of money to my Paypal account. Email: sreejithssnair@hotmail.com
|
|
|
|
|
I want to connect to a database and retrieve and insert data which is in another server.which means the database is not in our server.
it may be in another server globally remote.
this is about an asp web application.
please reply me as soon as possible
dayya
gayan
|
|
|
|
|
One solution of this problem is create a web service and communicating with SOAP.
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
I'm a beginner to .net.
can you please explain how to do that
gayan
|
|
|
|
|
Are yo trying to connect to it from the DB itself? As in from one DB to another that's on a different server? If so then you more appropriately it should be posted in the SQL forums.
If you're doing this from C# then, unless its on a different vlan, then you need a web service (definition: Clickety[^]). If its on the same lan (read network) then you need to be more specific in specifying your connection string by specifying the server name or the IP address (more on that here: Clickety 2[^])
Web Services are not .Net specific, so don't blame your lack of understanding on .Net. There are many articles here that explain Web Services and give you examples. Here, I'll do your lazy work for you: (Clickety 3[^])
You also might want to try the ultimate answer tool. I mean this Clickety 4[^] rather than anything else.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
Please search for creating web services in .net
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
There are two options of doing that.
1. You can access it via our normal ADO.Net by creating the connection to that server and doing what you want on that server.
2. If your database server is MS SQL Server then you can create what is called a linked server... in this case you have to connect to you own server and fire select and insert queries on the remote server.
Hope this helps..
Maharishi
Nothing is Impossible. Even impossible spells "i m possible"
|
|
|
|
|
Hi, i have a requirement of online exam. Just all the question and answers are in Database and retriving them and showing on the webpage.
Suppose if the question contains a code snippent, how to store it in database and how to show the same format in webpage?
Ex: How to store the below code in database as it is?
public static void main()
{
MessageBox.show("code snippent");
}
|
|
|
|
|
you have to append new line (\n) character in your string
|
|
|
|
|
yes, it is correct to store data using "/n".
But, suppose user posting a codesnippent in discussion forum like(Ex: posting message with code snippent in codeproject). User types message in textarea and submit the post. When i am reading the whole data will get in one string. How can i separate it for new line?
Ex: string strmsg = txtArea.text.Tostring();
now the strmsg contains whole text. How can split the strmsg for newline. How i know where the new line occurs
|
|
|
|
|
hi,
My aim is to print the form n have code for that .....
...my problems
1. How to make the form of A4 size
2. Is there any proc to print the form ...zooming a form can solve this ........prob ?
if any is having any clue abt this then plz let me know..
regards
sindhu tiwari
always innovative
|
|
|
|
|
|
sir ... i would like to tell the whole scenario behind this problem
i have developed a software in which the user will drag and drop labels and picture boxes then bind to a database.. now whenever the print button is clicked the form gets printed(""" i can save the form as a picture n can print it directly""") my problem is that i cant create a form of A4 size so how to make the form size to a4 so that the printing can be done ...i strongly feel that u will help me ...n i hope that the above given info gives u a glimpse of what i wanna do
regards
sindhu tiwari
its me sid
|
|
|
|
|
|
Hi,
I presume that, you will get more response if you communicate your query precisely along with complete sentence.
If the post/article served your purpose then, please assist me in keeping it up by donating a small amount of money to my Paypal account. Email: sreejithssnair@hotmail.com
|
|
|
|
|
Hi,
I had problem with windows service and crystal report ,
I need to invoke a crystal report with windows service ,
pls give example with these two.
Thanks n Advance
|
|
|
|
|
Hi,
Might help this link to you.
http://www.arunmicrosystems.netfirms.com/CrystalReports.html
Thank you.
"Good Thing Goes With Good People..."
|
|
|
|
|
hi guys
i have a class named abc_voucher and another class
derived from abc_voucher named def_voucher,
but in my application i have a function and its return type is
generic list of abc_voucher and i am returning from this function the generic list
of class def_voucher which is derived from abc_voucher , but it gives an comlite time error ,,
though my return object is derived from the type which i am returning in function's signature ,
why is that ?
thanks in advance
hello
|
|
|
|
|
ghumman63 wrote: comlite time error
What is this??
ghumman63 wrote: but in my application i have a function and its return type is generic list of abc_voucher and i am returning from this function the generic list of class def_voucher which is derived from abc_voucher , but it gives an comlite time error
Are you extracting the def_voucher list from the list that you retrieved that has the abc_voucher list? Is that what you're doing?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
no i am not extracting
def_voucher is derived from abc_voucher , but it gives compile time error
public function abc as list(of abc_voucher)
dim list as new list(of def)voucher)
'
function body
'
return list
end function
hello
|
|
|
|