|
|
led mike wrote: And incorrectly answered yet again
No, not incorrect, maybe different!
Or tell me whats incorrect at this link:
http://www.codeproject.com/dotnet/passingvaluesbetweenforms.asp[^]
led mike wrote: Model-View-Controller Design Pattern[^]
Is a nice keyword if you whant to impress somebody, but would be much more interesting with a small code example, which answers the question!
I'm looking forward to your answer, as I also have no experience with MVC Design Pattern.
All the best,
Martin
|
|
|
|
|
Martin# wrote: Is a nice keyword if you whant to impress somebody
In my experience the MVC pattern has never impressed anyone. However it does solve many technical problems that are common to design by adhering to fundamental practices of software design discipline. Of course one of them is the question that started this thread which is, as you pointed out, very "common"... get the idea?
Martin# wrote: I'm looking forward to your answer
As you might guess I did not invent the MVC pattern nor am I an expert, therefore I follow the advice of the experts, that's why they are called "experts".
Martin# wrote: I also have no experience with MVC Design Pattern.
What about Software Design Patterns? In either case if you are serious about your career I suggest you get experience ASAP.
Martin# wrote: but would be much more interesting with a small code example
You mean like this[^]
Keep in mind that Article is just one example of a specific implementation of the MVC pattern. Another, more complex, would be the Framework provided at Microsofts Patterns and Practices[^] site.
led mike
|
|
|
|
|
Hello,
I hope you don't feel that I'm kind of rude with my statements.
I just wanted to point out that, specialy for a beginner who has a problem at his low level application, it's not a big help to point him to this.
led mike wrote: What about Software Design Patterns? In either case if you are serious about your career I suggest you get experience ASAP.
I do agree, and you made me curious about that.
led mike wrote: You mean like this[^]
I had a short watch, and have to say that it's not much diverent then the article of Colin Angus Mackay, as he also explains the usage of delegates.
led mike wrote: Keep in mind that Article is just one example of a specific implementation of the MVC pattern. Another, more complex, would be the Framework provided at Microsofts Patterns and Practices[^] site.
Thank you for that interensting link.
All the best,
Martin
|
|
|
|
|
Martin# wrote: I hope you don't feel that I'm kind of rude with my statements.
Nope.
Martin# wrote: Thank you for that interensting link.
your welcome and CP has a Design and Architecture forum should you have more questions on the subject.
led mike
|
|
|
|
|
hi,
how do I filter column for a DataGridView?
I've loaded the data like this:
DataGridView.DataSource = ExampleSource;
DataGridView.DataBind();
the Data is shown correctly in the Grid, but there are
to many of them. So i'd like ti filter them.
Where must be a way to make specific Columns invisible.
I've used foreach like this:
foreach (DataGridColumn column in DataGridView.Columns)
{
...
}
but he does go through the foreach-loop.
also i haven't managed how to delete the specific column
by searching it with a string.
i'll be grateful for any help
PS: Sry about my bad english...
|
|
|
|
|
hi,
i have created the form and placed the contextmenustrip on it,
and enterd some values like copy,cut.
And i called that when user clicks the MouseRight Button
it is displaying.
But at always at the Top of the window.
How can I place it where ever user clciks.
Pls help me
With Regards
Prasad
|
|
|
|
|
Hello,
The ContextMenu property is a member of System.Windows.Forms.Control.
So if you set the property correct, you don't have to care about the position of the menu.
System.Windows.Forms.ContextMenu contextMenu1 = new System.Windows.Forms.ContextMenu();
System.Windows.Forms.MenuItem.MenuItemCollection mic = new System.Windows.Forms.Menu.MenuItemCollection(contextMenu1);
mic.Add("test1");
mic.Add("test2");
button1.ContextMenu = contextMenu1;
All the best,
Martin
|
|
|
|
|
thank you
with Regards
prasad
|
|
|
|
|
could not understand the coding please send me with windows application for clear understand
|
|
|
|
|
could not understand the coding please send me with windows application for clear understand benharcharles@gmail.com
|
|
|
|
|
hi,
i am creating a editor in RichtextBox using C#
can any one help me in creating a popup menu.
Thank you
|
|
|
|
|
Why creating ?
Just use context menu. Take a new context menu, than set context menu in richTextBox to that new context menu.
|
|
|
|
|
hi,
Thank you
With Regards
Prasad
|
|
|
|
|
hi!!
i had been refering to article 'passing values betn forms'.
I tried from it, but still i cant pass my variable from form1 to form2.
I m getting error on passing my variable to the other form's variable.
i have used the object approach from that article :
http://www.codeproject.com/useritems/pass_data_between_forms.asp
Objects of forms are created properly.
This i have written in form1 :
p = ((form1)log).n;
// log is object of form2.
//variable 'n' i have to bring from form2,which contains a date from query fired.
but i m getting error :
'Object reference not set to an instance of an object.'
It would be v.nice if u could help on it.
Thanx.
-- modified at 6:22 Wednesday 21st February, 2007
|
|
|
|
|
best way is write query on that form for getting date from database.
the code i sent is correct but this i checked on vb.net.
if possible i will send code again.bye..
|
|
|
|
|
If u have time, till 2mrw eve. whenever u have time, just try it, i have done this:
This is in FORM1 :
public partial class detail_form : Form
{
public DateTime n;
....... ( ... this means other not related coding is done here.)
}
private void button1_Click(object sender, EventArgs e)
{
conn.Open();
string strQury = "";
strQury = "insert into dashboarddealerlogin (logoutdatetime) values '(" + DateTime.Now + ")'";
SqlCommand cm = new SqlCommand(strQury, conn);
n = Convert.ToDateTime(cm.ExecuteScalar());
conn.close();
}
In FORM2 :
public partial class login : Form
{
DateTime p;
.........
}
private void login1_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand();
conn.Open();
cmd.Connection = conn;
......
p = ((detail_form)log).n;
.........
}
I have to use this 'p' in FORM2 function :
public void funEntrylogin(int strlogid, int strdashid, string strname, string strpwd, DateTime logindate, DateTime logoutdate)
in place of 'logoutdate'.
This is my full code.
Plz chek n try it wen u have time,i'll wait.
Thanx Nekshan.
|
|
|
|
|
|
i m gng now i'll chek 2mrw.
thanx.
Sorry for disturbing you soo much.
Nekshan.
|
|
|
|
|
|
yes i did, But i m getting errors and its still not working.
Still trying.
|
|
|
|
|
Why do you keep creating new threads about the same question all the time?
I have already explained exactly why your code is not working. I have also told you before that I already have explained why your code is not working.
Would you please read my reply before creating any more threads about this?
---
single minded; short sighted; long gone;
|
|
|
|
|
' i don't know which form is execute first
' what u do temperory
' first the form which is execute first write , first insert the values in database by using insert into tablename .... like wise.
' the information which u have only send in that function and leave it blank other field right. eg. insert into user (userid,password) values('viru_dram','hello')
' then in other form update the inserted value in database using eg.update tablename set timeout = system.datetime.now where userid='viru_dream' ....
'get it?. i will send u solution withing 2 days ok.bye.
|
|
|
|
|
Happy B'day!!
Form2 is execute first,its a login form.
After 'login' a 'grid form' opens,it has a logout button, on logout that datetime value must go in a table.
Thanx.
Take care
Enjoy d day!!
nekshan.
|
|
|
|
|
Hi,
I was wondering how to access a method in a form from another form. I know that this implies using the 'static' modifier, however, this seems to be very troublesome.
I was thinking there should be a way to access the instance of a form at realtime to use one of it's public methods.. (The form of which the method I want to call happens to be the main form of the application) Does anyone know how to do this? I'm stuck
Actually I was considering using the Observer Pattern for solving this problem, however I expect there should be a much more straight-forward solution..?
With kind regards,
Johan Vandewalle
-- modified at 6:06 Wednesday 21st February, 2007
|
|
|
|