|
|
You may want to look into the Memento Design Pattern as this design is exactly for the Do/Undo/Redo ability.
|
|
|
|
|
I am using Crystal Report XI for reporting. So I want to combine or integrate my own SQL queries to Crystal report. How van I make this? For Example :
My sql query is below;
"SELECT NAME,SURNAME,AGE,STR(SALARY/100,9,2) AS SALARY FROM EMPLOYEE WHERE SALARY>500 "
so I want to integrate this sql query with Crystal Report and design these (NAME,SURNAME ...) in my report designer.
For your help thank you very much.
This is my sign
|
|
|
|
|
you can get the date into a dateset, then send dateset to Crystal
|
|
|
|
|
I've create a user control for a network connection. It is basically an empty control that changes the background image based on the connection status (connected, disconnect, unknown). Right now, I only have an IPAddress property, but plan on adding several other properties in the near future.
What I am trying to do is tie an Options dialog box into the double-click event on the control. So I've got a usercontrol class UserControl and a form class UserControlOptions. There is a private field UserControlOptions declared in UserControl. How do I use the textboxes, checkboxes, etc. on the UserControlOptions form to edit to the properties of UserControl?
My initial thought was to send the UserControl as a parameter to the UserControlOptions constructor. Copy this to a UserControl field declared in UserControlOptions and populate the controls in the form with the properties. Then create a custom EventArgs that would be passed by an event fired when the save button was clicked. Something about the circular nature of UserControl->UserControlOptions->UserControl told me there should be a better way of doing this.
Thanks for any help.
BS
|
|
|
|
|
Hi,
here a rough plan of what I would do:
1. Design the options form with everything you need.
2. Place Save/Ok and Cancel button on the form and set their DialogResult properties.
3. Set CancelButton and OkButton properties of the options form to your both buttons.
4. Add a property of type UserControlOptions with both getter and setter which either fills the contained controls from the given values (getter) or creates a new instance with the respective values and returns it (setter).
5. in the double click event handler of your user control add the following:
MyOptionsForm optionsForm = new MyOptionsForm();
optionsForm.Options = _myOptionsField;
if (optionsForm.ShowDialog() == DialogResult.Ok) {
_myOptionsField = optionsForm.Options;
}
Beside the fact that this way the dialog behaviour of .Net is used also no reference (except a temporary local variable) is needed.
|
|
|
|
|
I would like to know how .Net , when creating a Web Service, creates those SOAP classes and comunicates with a SOAP client because i can't see them anywhere on the computer,those classes like in JAX -RPC (ties and stubs i think) , and when sending a mesage it must create that SOAP message ,does everything happend when executing the exe file?
If someone knows a good article about this on the internet or something short because i must know this until monday in the morning ,
Thanks!
|
|
|
|
|
.NET creates a proxy class for your webservice. Everything that needs to be done to create and read SOAP messages is done in the .NET framework.
You can checkout the proxy by adding a web reference in visual studio and expand the web reference node.
WM.
What about weapons of mass-construction?
|
|
|
|
|
Do u know how to code for the device management in c#.net
|
|
|
|
|
That depends on what you mean by "device management".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi;
I was wondering if there is any software package that could provide team programming for .net (C#)?
I mean if I and my brother want to work on a single project but two different stations(PCs) then what do we do?
Something like the starteam for java ...
I'll be very glad if someone answers A.S.A.P
Thanks
Hadi
|
|
|
|
|
hi
try to use MicroSoft Source Safe Tool
Tamimi - Code
|
|
|
|
|
You can look into NAnt to automate the buildprocess, or use an MSBuild environment to compile the app.
Combine this with some sort of versioning system like SVN, CVS or sourcesafe and you're off to a good start.
WM.
What about weapons of mass-construction?
|
|
|
|
|
Visual Studio Team System.
- It's easier to make than to correct a mistake.
|
|
|
|
|
Starteam works in Visual Studio too!
|
|
|
|
|
I was able to encrypt and decrypt the password with no problem at all. However, I needed to encrypt and decrypt the username also. When I copied my encrypt/decrypt password methods to encrypt/decrypt username...I can't decrypt the username anymore. The last 6 characters are correctly decrypted..but the first few characters are not.. Please help! I'm stuck with this!
Here's the code:
private string GetDecryptedUsername()
{
string strReturn = "";
try
{
Decryptor dec = new Decryptor(algorithm);
dec.IV = Convert.FromBase64String(enc_setting.IV);
byte[] key = Convert.FromBase64String(enc_setting.EncryptKey);
byte[] plainText = dec.Decrypt(Convert.FromBase64String(enc_setting.Username),key );
strReturn = ASCIIEncoding.ASCII.GetString(plainText);
}
catch(Exception ex)
{
throw ex;
}
return strReturn;
}
private string GetDecryptedPassword()
{
string strReturn = "";
try
{
Decryptor dec = new Decryptor(algorithm);
dec.IV = Convert.FromBase64String(enc_setting.IV);
byte[] key = Convert.FromBase64String(enc_setting.EncryptKey);
byte[] plainText = dec.Decrypt(Convert.FromBase64String(enc_setting.Password), key);
strReturn = Encoding.ASCII.GetString(plainText);
}
catch(Exception ex)
{
throw ex;
}
return strReturn;
}
//----working----
private void GenerateEncryptedUsername(ref Setting settingU)
{
try
{
Encryptor enc = new Encryptor(algorithm);
byte[] plainText = Encoding.ASCII.GetBytes(settingU.Username);
byte[] key = Convert.FromBase64String(settingU.EncryptKey);
byte[] cipherText = enc.Encrypt(plainText, key);
settingU.IV = Convert.ToBase64String(enc.IV);
settingU.Username = Convert.ToBase64String(cipherText);
}
catch(Exception ex)
{
throw ex;
}
}
private void GenerateEncryptedPassword(ref Setting setting)
{
try
{
Encryptor enc = new Encryptor(algorithm);
byte[] plainText = Encoding.ASCII.GetBytes(setting.Password);
byte[] key = Convert.FromBase64String(setting.EncryptKey);
byte[] cipherText = enc.Encrypt(plainText, key);
setting.IV = Convert.ToBase64String(enc.IV);
setting.Password = Convert.ToBase64String(cipherText);
}
catch(Exception ex)
{
throw ex;
}
}
Thanks much,
wo1noreen
|
|
|
|
|
i wanna read data form excel and show it into dataView in .net 2005.
please help me?
|
|
|
|
|
This article[^] might help you. Its about DataGrid and not DataGridViews but usage should be the same.
|
|
|
|
|
I want to Design Hierachy Model tab Control in C#.NET. Anybody can help me PLEASE.....................
Anybody can Help me please.............................................
Haridas.R
harisofttech@hotmail.com
"Achievement is not a destination, its a journey "
|
|
|
|
|
I tried every piece of code possible. The latest is:
comboSelect1.DataBindings.Add("DisplayMember", dsDenumiri1.Tables["Denumiri"], "Statie_Nume");
comboSelect2.DataBindings.Add("DisplayMember", dsDenumiri2.Tables["Denumiri"], "Statie_Nume");
comboSelect1.DataBindings.Add("ValueMember", dsDenumiri1.Tables["Denumiri"], "StatieID");
comboSelect2.DataBindings.Add("ValueMember", dsDenumiri2.Tables["Denumiri"], "StatieID");
but i just can't bind these 2 comboboxes to the datasets!
the error is the same:
An unhandled exception of type 'System.ArgumentException' occurred in system.dll
Additional information: Could not bind to the new display member.
Please Help me!!
rzvme
|
|
|
|
|
Hi
First you shouldn't add two bindings to the same cotrol.
Second for the combo you have the list datasource which is the datatable in your case and which uses DisplayMember and ValueMember and also you have the current record which you want to edit.
You should try to use only one binding on "StatieID" and when the combo value is changed change the name. ALso you should check that the datasource set on the combo contains the two columns ("Statie_Nume", "StatieID")
damianbc
|
|
|
|
|
what are the methods of DataGrid Class?
|
|
|
|
|
Alamzeb khan wrote: what are the methods of DataGrid Class?
A lot of the questions you are asking here are ones you should be able to find out by searching
http://msdn.microsoft.com/library (or http://msdn2.microsoft.com is more direct)
or, if you have Visual Studio, the online help.
In general the best way to get your questions answered here is to try something first and then ask when you get stuck.
Kevin
|
|
|
|
|
hi
i want to know, may I set the opacity for a usercontrol? if yes how?!
thanks
Salmani
|
|
|
|
|
how to display collection of video continusly .
i used component that in .net (COM component)
Amal
|
|
|
|