|
Or...
dataset.Tables["TableName"].DeafultView.RowFilter = "Column1 = 'hello'";
Mazy
No sig. available now.
|
|
|
|
|
Thanks a lot for both of You!!!
It works
|
|
|
|
|
Hello every body and Happy New Year
I am intended to develop a software (windows application with C#) that can coonnect to the internet. In my software i want to restriction on site access and file download. I want to prevent some users to access certain sites or downlaod certain files.
I searched alote but with no benifits or my searh was not strong. I found somethings but some are web applications and the other are methods or classes stands alone, i could not combine them (
if someone can help me?
Thak you ![Rose | [Rose]](https://codeproject.global.ssl.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|
|
|
Can any one tell me how i can make a rounded form, also ineed aqua buttons on rounded shapes
|
|
|
|
|
Could try FormShaper and SkinButton from SpringSys.
Their site is http://www.springsys.com
|
|
|
|
|
|
Hi all and happy christmas and New year...
I am developing a c# windows form application in which I need to persist data, that is save data. I want to know what my choices are in this other than using SQL SERVER 2000, which i am using now but I do not want to have my users deploy SQL server on their machines so I wanna change my storage scheme.
What are my choices?
any links would be appreciated.
If I have classes for my Objects, How can I use those classes to store my data on disk. What interfaces should i inherit and implement
what if I want to do my own Indexes on data, say using HAsh tables or B-TREES
THANKS FOR ANY HELP
----------------
Mohsen from IRAN
|
|
|
|
|
If you want your application to work only on desktop and not in a network,MS ACCESS is very good,other databases need somethings to install on user machines like SQLServer. You can import your tables and datas from SQL into ACCESS with IMPORT AND EXPORT DATA WIZARD. Access only have one file so it is easy to back up from it or move it from different machines.
Mazy
No sig. available now.
|
|
|
|
|
thanks for the reply
now, what are my options if I do not wanna use access, or any database for that matter. also take into account that I need to store Persian scripts, ie unicode
Thanks again
Mohsen from Iran
|
|
|
|
|
Look into serialization in .NET, either using the System.Runtime.Serialization namespace elements, or the System.Xml.Serialization namespace elements. The first is true serialization and can handle cirucular references, as well as be easily controlled by implementing ISerializable . All that is required to serialize a Type is attribute it with the SerializableAttribute (put [Serializable] on the class definition). See the .NET Framework SDK documentation for more details, or search this site for plenty of examples (or google). If a Type isn't serializable and you can't / don't want to extend it and attribute it / customize serialization, you can use an ISerializationSurrogate to serialization the Type. You can also fix-up data after serialization is completely by having your object implement IDeserializationCallback . You can serializate to XML (SOAP) or binary with the default formatters. More might exist, or you can (though not recommended, especially without knowing the internals of serialization) implement your own formatter.
XML Serialization, in contrast, using simple attributes and serialization to XML the way you define, unlike SOAP serialization above that would be pretty much unreadable to most people. XML serialization is limited however. You're not technically supposed to be able to control it as much, but you can implement the undocumented IXmlSerializable interface to serialization Types without XML Serialization attributes. This can serialize "prettier" documents, but doesn't have near the capabilities (like handling cirucular references).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi
I have a code which prints to the printer using the PrintDocument & PrintPreviewDialog classes.
I need to specify at run time which paper size I want to use: A4, Letter, A3 etc. These are not custome sizes but rather standard sizes, listed in the PaperKind enum.
How can I force a certain paper size at run time? The PaperSize.Kind property is read only.
I tried using the PageSetupDialog too, hoping that I could simply pass it the requierd page size without having to display the dialog, but could not make it work.
thanks
|
|
|
|
|
Again, as I recommended before - and as MSDN recommends - enumerate the PrintDocument.PrinterSettings.PaperSizes (one the PrintDocument.PrinterSettings.PrinterName is set to the desired printer). If you look at the documentation for PrintDocument , the best place to set the PaperSize is in the handler for the PrintDocument.QueryPageSettings event, which occurs before each PrintDocument.PrintPage event:
private PaperSize paperSize;
private PaperSize GetPaperSize(PrinterSettings printer, PaperKind kind)
{
if (printer == null) throw new ArgumentNullException("printer");
if (this.paperSize == null)
{
foreach (PaperSize size in printer.PaperSizes
{
if (size.Kind == kind)
{
this.paperSize = size;
return this.paperSize;
}
}
}
else return this.paperSize;
throw new ArgumentException("The requested paper size is not supported " +
"by this printer.", "kind");
}
private void printDocument_QueryPageSettings(object sender,
QueryPageSettingsEventHandler e)
{
try
{
e.PageSettings.PaperSize =
this.GetPaperSize(e.PageSettings.PrinterSettings, PaperKind.A3);
}
catch (Exception ex)
{
MessageBox.Show(string.Format("Could not print the document: {0}",
ex.Message), "Print Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
e.Cancel = true;
}
} This should work; if not, read the documentation for PrintDocument , PageSettings , and PrinterSettings .
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
|
Hello
I ned create a form dynamically from an XML document, the xml file must contain the control type, the variable name asociated to this control, ..., i.e.
<Parameter>
<Param name="Age">
<ControlType>Editbox</ControlType>
<Desc>Client age</Desc>
<Type>Integer</Type>
<Min>21</Min>
<Max>40</Max>
<Value>25</Value>
</Param>
</Parameter>
Please help me
|
|
|
|
|
|
An example here[^]. I think it's written with VB.NET, but that shouldn't be a problem.
RSS feed
|
|
|
|
|
Hello
I ned create a form dynamically from an XML document, the xml file must contain the control type, the variable name asociated to this control, ..., i.e.
<parameter>
<param name="Age" />
<controltype>Editbox
<desc>Client age
<type>Integer
<min>21
<max>40
<value>25
Please help me
|
|
|
|
|
I have a number with a decimal place and I need to round it does anyone know how?
|
|
|
|
|
Decimal.Round()
Mazy
No sig. available now.
|
|
|
|
|
|
I have the next code:
.
.
StreamReader inp = new StreamReader(@"c:\inp.txt");
Tx1.Text = inp.ReadLine();
inp.Close();
.
.
inp.txt contains "¡¡¿¿Test??!!"
and after reading line, Tx1 has = "Test??!!"
The ¡ and ¿ were ignored!! The same thing occurs with ñ, á, etc.
What is happenning?
Best regards
|
|
|
|
|
I guess the problem is come from Unicode Encding. Use other cunstructors of StreamReader which you can specify Encoding type in them.
Mazy
No sig. available now.
|
|
|
|
|
I made:
StreamReader inp = new StreamReader(@"c:\inp.txt",System.Text.Encoding.UTF7);
Tx1.Text = inp.ReadLine();
Inp.Close();
and it worked. Thanks.
However, it is the firts time I experienced this kind of problem. I live in South America. Now, ¿should I change all my thousands of programs to include this encoding parameter? or is this possible to change it any kind of global parameter?
Thanks for your help
|
|
|
|
|
Rostrox wrote:
However, it is the firts time I experienced this kind of problem. I live in South America. Now, ¿should I change all my thousands of programs to include this encoding parameter?
As far as your programs wants to work with Unicode world ,I think you should apply these change to them.
Mazy
No sig. available now.
|
|
|
|