|
Thank you for your help man!!!! But this times not only coding is a problem but having a nice documentation is a must! We are evaluated as follows
-65% Documentation
-20% Coding/Implementation
-15% Defense
So if we have a nice documentation I hope it will be easy to do the implementation. By the way if you or any body has an idea of Service Oriented Architecture (SOA) ... it would be nice to hear.
By the way if you have any contact would you please let me know so that I will contact you.
Thank you.
|
|
|
|
|
I'm glad to see that some schools still considwer documentation to be important. An awful lot of major software companies have lost sight of that fact. Well documented requirements lead to well documented functional descriptions which, if properly segmented and divided into small blocks, lead to easily coded chunks.
If this is a team effort, I strongly recommend an Interface Control Document which none of you may change without everyone agreeing to the change. In it you will describe in detail every public variable and type, every function, and whose responsibility it is to implement each. That way there are no surprises because A wrote an integer function which B called expecting a real result... That one document will save your ass. I use one even for my own tiny projects, simply because I have so little time to work on them that when I set the project down for 2 months because I got busy at work, when I get back to it I've forgotten what I was doing where. A review of my ICD tells me where I left off and what to do next.
As for contact info, click the email link below, instead of the reply link.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Find a popular application, and try to duplicate it.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Aaah, college. Back when I was there, one of the other teams was trying to write a competitor for Windows 3.0.
|
|
|
|
|
PIEBALDconsult wrote: competitor for Windows 3.0.
Etch-a-Sketch?
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
hi,
i want to add a method to dll which could return a value.hw can i do that?
|
|
|
|
|
Do you have the source code to the dll? Is it a .NET assembly?
I think we all need more info from your side to be able to help..
|
|
|
|
|
yes i have the source code nw i want to add a function which should return a string.Also i want to call the function outside dll.hw to do that?
|
|
|
|
|
If you have the source code, you edit one of the classes (or add a new one) and create a method that does this. This is pretty basic stuff.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Member 590310 wrote: i want to add a method to dll which could return a value.hw can i do that?
In DLL:-
namespace my
{
class ABC
{
private int _intValue=10;
public int ReturnValue()
{
return _intValue;
}
}
In your Executable:- First add reference of DLL , then following code will
suffix
my.ABC oABC = new my.ABC();
Console.WriteLine(oABC.ReturnValue());
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
0k thats fine but i dnt want to add dll reference instead i want to load it on runtime like that.
Assembly a = Assembly.LoadFrom(Application.StartupPath + @"\"+strLangName+".dll");
then hw to call its function?
|
|
|
|
|
|
as calla suggested, bellow is the simple way to do it.
string asseblyId = @"NewAssembly,Version=1.0.0.0,Culture=neutral,PublicKeyToken=531174506d670b8c";
ObjectHandle Handle=Activator.CreateInstance(asseblyId, "NewAssembly.ClassName");
object obj = Handle.Unwrap();
object[] parm = new object[] { 2, 4 };
object[] parm1 = new object[] { "Hello" };
Type t = obj.GetType();
t.InvokeMember("DoIt", BindingFlags.Public | BindingFlags.NonPublic|BindingFlags.InvokeMethod|BindingFlags.Instance ,null , obj ,null);
int i=(int)t.InvokeMember("Add", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.InvokeMethod | BindingFlags.Instance, null, obj,parm);
Console.WriteLine(i);
t.InvokeMember("Name", BindingFlags.Public | BindingFlags.SetProperty|BindingFlags.Instance , null, obj, parm1);
string strname=(string)t.InvokeMember("Name", BindingFlags.Public|BindingFlags.GetProperty| BindingFlags.Instance, null, obj, null);
Console.WriteLine(strname);
and bellow is the methods for class in dll
public class Employee
{
public string _name;
public int _age;
public string _address;
public string _id;
public Employee()
{
}
public string Name
{
get
{
return this._name;
}
set
{
this._name = value;
}
}
public int Age
{
get
{
return this._age;
}
set
{
this._age = value;
}
}
public string ID
{
get
{
return this._id;
}
set {
this._id = value;
}
}
public int Add(int i, int j)
{
return i + j;
}
public void DoIt()
{
Console.WriteLine("Welcome from DO it");
}
public override string ToString()
{
return String.Format("ID :{0} Name:={1} Age{2}", this._id, this._name, this._age);
}
}
hope this helps!
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Good to see developer from Afghanistan... welcome brother!
|
|
|
|
|
How to get the List of groups in active directory and check its Enabled or not
|
|
|
|
|
What do you mean by enabled? Do you want to know if a user is a member of a particular group? Or do you want to know if the group exists in AD? If you want to check membership, have a look at the WindowsPrincipal[^] class. If you want more general control of AD, then you should use Active Directory Components[^]
|
|
|
|
|
Hi,
I need help please on the following issue. I have got a combo box on the form and I am trying to show the member of the access data field collumn called 'user'. When i run the program, I can't see any thing in the combobox. I don't know what I am doing wrong here. Here are my codes.
Thanks in advance.
<br />
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
OleDbConnection conn = new OleDbConnection((@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\riad\c#\test\test.mdb"));<br />
conn.Open();<br />
OleDbCommand cmd = new OleDbCommand();<br />
cmd.Connection = conn;<br />
OleDbDataAdapter adp = new OleDbDataAdapter("SELECT * FROM test",conn);<br />
DataSet ds = new DataSet();<br />
adp.Fill(ds);<br />
comboBox1.DataSource = ds.Tables[0].DefaultView;<br />
comboBox1.DisplayMember = "user";<br />
comboBox1.ValueMember = "user";<br />
<br />
cmd.ExecuteNonQuery();<br />
<br />
conn.Close();<br />
<br />
<br />
}<br />
|
|
|
|
|
Hi,
welcome to CodeProject.
You have a chicken-and-egg problem here: you are populating the ComboBox inside its SelectedIndexChanged handler, however without any content, the index can't change. You probably want to populate the CB only once, maybe in the Form.Load handler; and not in the SelectedIndexChanged handler: if it takes 1 second to execute, the user would have a hard time scrolling through the CB list.
PS: next time please choose an informative subject line, and put your code snippet in PRE tags (not CODE tags) to get better readability.
Cheers
|
|
|
|
|
I dont want to have to type this out every time I want to connect to the database. Can I put this in a class or something?
What would be the best way to do this so I can call myConnection from anywhere inside my application?
SqlConnection myConnection = new SqlConnection("user id=username;" +
"password=password;server=serverurl;" +
"Trusted_Connection=yes;" +
"database=database; " +
"connection timeout=30");
Thanks in advanced as I am pretty much learning.
|
|
|
|
|
Write a class that encapsulates it, like my DatabaseAccessor[^].
Then create a Data Access Layer that your application can use.
Furthermore: Your application shouldn't know what database is in use. You should not find yourself instantiating Connections, Commands, etc. in your application at all.
modified on Sunday, May 2, 2010 4:04 PM
|
|
|
|
|
A fairly common way to do this is to store the connection string in a static class. Here's a sample that might give you an idea of what I mean:
public static class Settings
{
private static string _connectionString = string.Empty;
public static string ConnectionString
{
get
{
if (string.IsNullOrEmpty(_connectionString))
_connectionString = ConfigurationManager.ConnectionStrings["connection_string_stored_in_config_file"].COnnectionString;
return _connectionString;
}
}
} This supposes that you put the connection string in a configuration file rather than hard coding in your application. Then, in any place you want to call it, you would use it like:
using (SqlConnection myConnection = new SqlConnection(Settings.ConnectionString))
{
} BTW - you should always look at trying to wrap disposable classes in a using block; hence the wrap around the SqlConnection .
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
modified on Monday, May 3, 2010 8:33 AM
|
|
|
|
|
And when you have several different connection strings? And various database engines to use? And desire database agnosticism?
|
|
|
|
|
I wouldn't be tackling this as a beginner. I'd also use something like nhibernate.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Pete O'Hanlon wrote: wouldn't be tackling this as a beginner
Why not? I did. Well, an ADO.net beginner anyway, with ten years experience with embedded SQL and scars from ODBC.
|
|
|
|
|
Yeah, but you've got the yellow diamond.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|