|
|
I've taken on a small project, to write a client/purchase/sales register for an antiques/second-hand shop. The client wants a software suite that will answer some unique questions to his business, and having looked round at off the shelf software he decided that he needs a package written just for him. It will only be for his use, and not for eCommerce. That might come later, but it's not definite.
I've written lots of packages like this, in VB6 and for the past five years in C#, but I'm beginning to think that I might step out of my safety zone and try to write it in WPF. However, I have no experience whatsoever in this, and would welcome any advice you can give me.
Thanks in advance,
George
|
|
|
|
|
|
Sorry, should have checked first. Mea Culpa.
|
|
|
|
|
Do you think a (I hope) paying customer should pay for you to sit there and learn something new, especially something with such a steep learning curve?
I hope you're not charging him for this.
|
|
|
|
|
As an honest trader, I'll only bill for what he gets. There's a lot of cowboys out there that don't, And this is in the wop-wops where clients rapidly become friends.
|
|
|
|
|
Windows Form based development is different from doing WPF. I would recommend doing what you are comfortable with. After all, someone else is paying for a software product he needs and not for you learning new things.
|
|
|
|
|
I've taken that into account, I think I'm going to do the project in both, Window Forms and WPF. That way, I'll only bill for the forms development (I can write it in my sleep anyway, there's nothing earth shattering about it).
|
|
|
|
|
I think you can start with using MVVM in the windows form application. That way you do not really need to make much effort to convert it to WPF application. Here[^] is an article to start off with.
|
|
|
|
|
Thanks for the reference, I'll have a good look at it this morning.
|
|
|
|
|
depends on how large and complicated it is.
I would recommend a good book to start from. If you have done Asp.Net you'll feel comfortable reasonably quick (it is more similar to designing web pages than in designing forms).
However if the project is large or could become large, it is probably better to keep with what you know.
|
|
|
|
|
It's not a big project by any stretch, but it's one of those that has the capability of growing. I've written the same kind of thing lots of times before. There's just one (new) bit I'm unsure of, and that's a legal requirement to identify sellers (The New Zealand second hand dealers act is quite rigid on that), but I'm sure I'll find a way to do it.
|
|
|
|
|
surprised i even have to do this still... in any case, does anyone know of a C# routine to convert this?
of course I can do it the hard way, but was hoping there was something i could just pass this to and it spit out the right date for me.
thanks
|
|
|
|
|
First , the program must validate that it is a valid date as per your original format, then can do the necessary conversion, see example:
using System;
using System.Globalization;
public class Program
{
public static void Main()
{
string dateString = "140331";
DateTime result;
if (DateTime.TryParseExact(dateString, "yyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None, out result)){
Console.WriteLine(result.ToString("yyyyMMdd"));
} else {
Console.WriteLine("Data invalid");
}
}
}
|
|
|
|
|
|
Hi All,
After developing the application with oracle client 9.2 on my machine, when I am trying to run the application on server with having Oracle client 10.1, I am not able to run it.
Is it possible to run an application build with 9.2, on server having oracle client 10.1 on it.
Thanks
Rock Star
|
|
|
|
|
It's difficult to say with the scant information you've supplied. How are you connecting to Oracle? What drivers are you using? Are you getting any exceptions?
|
|
|
|
|
Hello,
wanting to display a photo after it is recorded,
an error message is displayed me "L'Exception ArgumentException was not Operated"
DataSet ds = new DataSet();
adpt.Fill(ds, "client");
int c = ds.Tables["client"].Rows.Count;
if (c > 0)
{
Byte[] btpht = new Byte[0];
btpht = (Byte[])(ds.Tables["client"].Rows[c - 1]["photo"]);
MemoryStream phtosssss = new MemoryStream(btpht);
try
{
pictureBox1.Image = Image.FromStream(phtosssss);
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); }
}
Soyons toujours à la disposition des autres
|
|
|
|
|
Put a breakpoint on the line that creates your byte array and check that you have populated it after you step over the row. You're looking for a reasonably large value in there.
|
|
|
|
|
look all that i Did
void prece_dent()
{
if (INDEX != 1)
{
INDEX--;
lblenre.Text = "" + INDEX + " / " + rowCount;
OdbcConnection cnx = new OdbcConnection("DSN=KINGMINDONGO");
cnx.Open();
OdbcDataReader dtr;
OdbcCommand comded = new OdbcCommand("select *from client where code_client=" + @Convert.ToDecimal(code_client.Text));
comded.Connection = cnx;
dtr = comded.ExecuteReader();
for (int i = 0; i < INDEX; i++) dtr.Read();
code_client.Text = dtr.GetInt32(0).ToString();
nom.Text = dtr.GetString(1);
prenom.Text = dtr.GetString(2);
societe.Text = dtr.GetString(3);
date_naissance.Text = dtr.GetDate(4).ToString();
lieu_naissance.Text = dtr.GetString(5);
adresse.Text = dtr.GetString(6);
tel.Text = dtr.GetInt32(7).ToString();
fax.Text = dtr.GetInt32(8).ToString();
e_mail.Text = dtr.GetString(9);
compte_bancaire.Text = dtr.GetInt32(10).ToString();
banque.Text = dtr.GetString(11);
OdbcDataAdapter adpt = new OdbcDataAdapter(comded);
dtr.Close();
DataSet ds = new DataSet("client");
adpt.Fill(ds, "client");
int c = ds.Tables["client"].Rows.Count;
if (c > 0)
{
Byte[] btpht = new Byte[0];
btpht = (Byte[])(ds.Tables["client"].Rows[c - 1]["photo"]);
MemoryStream phtosssss = new MemoryStream(btpht);
pictureBox1.Image = Image.FromStream(phtosssss);
}
|
|
|
|
|
And how many bytes are in your byte array?
|
|
|
|
|
my problem is to recover the recorded image and display it in the picturebox
|
|
|
|
|
Yes, I got that. What I'm trying to get to here is what data is in your memory stream after you have read it from the database? Do you have any bytes there to convert into an image?
|
|
|
|
|
You're not listening. We'll try this again.
How many bytes are in the array before you send it to the MemoryStream?!
If it's zero, your query didn't return any image data, therefore you can't make a Bitmap from it.
|
|
|
|
|
what can i do?? by seeing my codes?
can't you help??
|
|
|
|