|
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
|
|
|
|
|
Use layered approach (tier). In your case three tier approach is suitable: DAL–Data Access Layer, BLL–Business Logic Layer and GUI –Graphical User Interface.
|
|
|
|
|
Dear Fellows,
I have only this question that can some one show me the sample of Inventory Database software in a form of images because I don't seen this software before so I got task its not a project its just a assignment for me so I don't know where to start how this inventory database software looks like how many labels, text boxes, what features are in main menu etc etc so can some one guide me???
Any help or assistance will be appreciated.
thanks
================================================
be happy always and also keep other happy as well...
================================================
|
|
|
|
|
How this software would look depends on what it would need to do.
So you first would need to write down its functional requirements.
If you want some samples of similar software use Google[^] and browse the links given.
0100000101101110011001000111001011101001
|
|
|
|
|
We have already explained to you here[^] that this question is too broad to be answered in these forums. There is no standard Supermarket Software that can be given to you; you need to design it based on the requirements of your Supermarket. If you really do not understand how to design a database then either you are on the wrong study course or in the wrong job.
|
|
|
|
|
Enable or disable controls inside the groupbox based on the checkbox state. If checkbox is unchecked and the groupbox and all controls inside are hidden. For a tri-state checkbox in immediate state, all controls inside are just disabled.
|
|
|
|
|
This is a follow-up question to: [^] posted in the C# Q/A Forum.
Why not post this question in C# Q/A forum, as well ?
"Beauty is in the eye of the beholder, and it may be necessary from time to time to give a stupid or misinformed beholder a black eye." Miss Piggy"
|
|
|
|