Hi im new and very noob at this so far so im new to code talk and building it quickly as i can :). im busy with a project in web and the form im busy with is a Invoice/Quote form. i got it right to populate the dropdown boxes and auto generate invoice number down. i got 2 problems.
1: im not sure how to open the same form up in either invoice or quote. because its a 2 forms in one kinda like a Client form that you open up in add or edit.
2: i have this one drop down box called service, below it is a grid. Select your service, click the add buttom and it goes into the grid, so that you are selecting a list of service. well i populate the service dropdown box, but how i get it to the grid?
can anyone help me with this. Thank you so much
Loading
raven danielPosted May 11, 2011, 5:02 AM
FroglegPosted May 11, 2011, 4:53 AM
Would not you be better off creating two different forms ?
Where is the grid
raven danielPosted May 11, 2011, 4:23 AM
this is the button to add new client.
private void addNewClientToolStripMenuItem_Click(object sender, EventArgs e)
{
frmClient g_Client = new frmClient ("Add");
g_Client .WindowState = FormWindowState.Normal;
g_Client.Show();
}
this is the button to edit client.
private void EditClientToolStripMenuItem_Click(object sender, EventArgs e)
{
frmClient g_Client = new frmClient ("Edit");
g_Client .WindowState = FormWindowState.Normal;
g_Client.Show();
}
-----------------------------------------------------------------------------
Now we are at the Client form.
int m_intCourseID;
public frmClient(string AddEdit)
{
InitializeComponent();
m_strAddEdit = AddEdit;
}
private void frmClient_Load(object sender, EventArgs e)
{if (m_strAddEdit == "Edit")
{
btnSave.Text = "Update";
this.Text = "Update Client";
}
else if (m_strAddEdit == "Add")
{
this.Text == "Add New Client";
}
}-----------------------------------------------------------------------------
im not sure what you call this term of method when you can open a single form in two ways either add or edit.
but this is the windows way of doing it, its not the same when trying it in web for some reason and trying to find the web way is difficult.
FroglegPosted May 11, 2011, 3:41 AM
Can you upload the code you have so we can better understand