|
Check out the following links:
http://www.dotnetperls.com/dictionary
http://www.dotnetperls.com/word-search
|
|
|
|
|
Please make your links into clickable links.
|
|
|
|
|
Thanks it helped
|
|
|
|
|
You already posted this in Q&A; please post in one location only.
|
|
|
|
|
thank you, but can you help?
|
|
|
|
|
Hi, I am working on a C# project in visual studio 2010. I have finished the project and now working on its setup project. I created a setup project and another Installer class project. In custom actions of my setup project I use my Installer class to add a login user to the database. However after coppied the project files to the target machine, when my installer class needs to work en error occurs. It says unable to get installer types in InstallHelper.dll assembly which is created by me. I could not understand why it is happening. One important thing is that, It does not occur on my machine maybe it is because i devolopped the project in my machine and it is windows 7 professional. However in other machines always this error occurs. For example, I tried it in Windows Vista, Windows 7 Professional (32-bit) and also (64-bit) always this error occurs. Can anyone help me in this issue ? What should I do ? Please it is a bit urgent.
|
|
|
|
|
Hi,
As a try you can add the installerclass files with setup project and then publish it.
It's an idea..
Thanks
|
|
|
|
|
Actually I have solved it but in a different way. The problem was a class library project. The output of it is a *.dll file and installer could not find that file. In that installer class I called a windows form to enable to add user while setup. However, when dll file could not find, then instead of it I tried to add an *.exe output as my Installer class. So, instead of class library project I have added a windows form project to my setup project. Since its output is .exe file, then it works great. Now my setup works correctly. If anyone encountered this problem may try to replace class library project with windows form project. It is a lazy solution for my situation. But, still I am wondering what the actual reason to this problem is.
|
|
|
|
|
facing same problem . i will try your solution
|
|
|
|
|
Hi I have a little problem with c # code. I wonder if you can help me because I have tried to solve this problem for several days. I get the error: "No overload for method 'ReserveOrCancelSeat' takes '0 'arguments
Here is the code:
private void ReserveOrCancelSeat(SeatManager.DisplayOptions choice)
{
if (CheckSelectedIndex() == false)
{
MessageBox.Show("a seat must be selected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
// Is reserve selected
if (rbtnReserve.Checked == true)
{
// Validate data
string name = null;
double price = 0.0;
if (ReadAndValidateInput(out name, out price) == true)
{
// Data is ok, reserve seat
if (!m_seatMngr.ReserveSeat(name, price, lbSeats.SelectedIndex))
{
// The seat was already reserved, ask user if we should continue with reservation
if (MessageBox.Show("The seat is already reserved, continue with reservation?", "Seat already reserved", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
// We continue. First cancel seat.
if (!m_seatMngr.CancelSeat(lbSeats.SelectedIndex))
{
// This should not happen, throw exception
throw new Exception("The seat could not be canceled.");
}
// Then we reserve it
if (!m_seatMngr.ReserveSeat(name, price, lbSeats.SelectedIndex))
{
// This should not happen, throw exception
throw new Exception("The seat could not be reserved.");
}
}
}
}
}
}
private void btnOK_Click(object sender, EventArgs e)
{
ReserveOrCancelSeat(); // here comes the error message
}
|
|
|
|
|
you have no choice.
|
|
|
|
|
Yes but it says " The name 'choice' does not exist in the current context
|
|
|
|
|
Funniest thing I've seen on this site for a while. Thanks for the laugh!
It’s not because things are difficult that we do not dare, it’s because we do not dare that things are difficult. ~Seneca
|
|
|
|
|
You have implemented the function ReserveOrCancelSeat to accept one parameter SeatManager.DisplayOptions choice . This means that when you call the function you should supply the needed parameter. Have a look at this tutorial: Functions - C# Tutorial[^].
In your implementation of the ReserveOrCancelSeat function the parameter SeatManager.DisplayOptions choice is not used. So removing the parameter would solve your problem, but you first might want to look into why you are not using it.
Good luck.
0100000101101110011001000111001011101001
|
|
|
|
|
ReserveOrCancelSeat(SeatManager.DisplayOptions choice); gives me 3 errors
1. ) expected
2. ; expected
3. Invalid expression term ')'
|
|
|
|
|
Did you change
private void btnOK_Click(object sender, EventArgs e)
{
ReserveOrCancelSeat();
}
into
private void btnOK_Click(object sender, EventArgs e)
{
ReserveOrCancelSeat(SeatManager.DisplayOptions choice);
} because that is not going to work.
Did you read the tutorial[^]. You really need to understand how functions work.
0100000101101110011001000111001011101001
|
|
|
|
|
Yes i changed it into ReserveOrCancelSeat(SeatManager.DisplayOptions choice);
So whats the solution i have been trying to figure it out for long time. im a beginner
|
|
|
|
|
Reverse the changes you made.
Then change your function implementation from
private void ReserveOrCancelSeat(SeatManager.DisplayOptions choice) into
private void ReserveOrCancelSeat()
If you want to improve your knowledge of functions read the tutorial[^].
0100000101101110011001000111001011101001
|
|
|
|
|
you have to provide us with the members of the SeatManager.DisplayOptions enum to help you choose one of them as a parameter to you function
as example if your SeatManager.DisplayOptionsenum is
<pre lang="C#">
enum SeatManager.DisplayOptionsenum
{
choice1
choice2
choice3
choice4
}
</pre>
you can call your function like this
<pre lang="C#">
private void btnOK_Click(object sender, EventArgs e)
{
ReserveOrCancelSeat( SeatManager.DisplayOptionsenum.choice1); // here comes the error message
}
</pre>
|
|
|
|
|
Thank you that helpt alot!
|
|
|
|
|
Well. I have done a small project.
But the problem is some of my required data is not available across whole project.
I mean, every time I go form to form I need to open the database and fill the same data from the same SqlDataAdapter.
Instead is it possible to keep the data somewhere globally for all the project forms?
With my project I have a class for the queries and tables and wherever I need data in the forms, there I use to call the Subs for filling the table like the below...
Class1.cs
=========
public void MyTableFill()
{
Con.ConnectionString = Con_1;
Con.Open();
SQLDAp = new SqlDataAdapter(MyQry, Con);
SQLDAp.Fill(MyTable);
Con.Close();
}
Form1.cs
========
Class1 MyDatas = new Class1();
Form1_Load()
{
MyDatas.MyTableFill();
}
Form2.cs
========
Class1 AccDatas=new Class1();
Form2_Load()
{
AccDatas.MyTableFill();
}
Thanks
|
|
|
|
|
|
I keep a static class that hold all the lists that support dimension data (typically stuff for comboboxes), every form uses this for static data. When the get accessor is called it checks for content and if there is none it gets the data from the database.
If the app changes the static data then the list is set to null. Next time it is requested the data is refreshed from the database. This does not work well for asynch processing (Silverlight);
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The data access should not be in the UI layer at all. Have a separate class that encapsulates the data access and pass a reference to an instance of it to each form.
|
|
|
|
|
the best way is to create a global class and retrieve information from the database and store it in that class, and when any form needs that data it reads it from the global class
|
|
|
|