|
Hi
I need a few help to make a correct mapping from my dataAdaptater to my dataSet:
SqlConnection conn = new SqlConnection("Data Source=localhost;Initial Catalog=JWDTA016;Integrated Security=True");
DataAdaptater.SelectCommand = new SqlCommand(QueryString, conn);
DataTableMapping mapping = DataAdaptater.TableMappings.Add("Table", "dt");
mapping.ColumnMappings.Add("IXROOT", "Client root");
mapping.ColumnMappings.Add("IXADID", "Addres id");
mapping.ColumnMappings.Add("IXPATH", "PDF Path");
mapping.ColumnMappings.Add("IXID", "Document id");
mapping.ColumnMappings.Add("IXESEQ", "Extraction sequence");
mapping.ColumnMappings.Add("ISSTAT", "Status");
mapping.ColumnMappings.Add("DIFREQ", "Sending frequence");
mapping.ColumnMappings.Add("IXPID", "Production id");
DataAdaptater.Fill(dt);
Ultragrid.DataSource = dataGridData.Tables[0].DefaultView;
Ultragrid.DataBind();
If somebody has an idea or see some wrong in my thought process...
regards
|
|
|
|
|
|
|
Hi
please help me for windows mobile application...
I am using stylesheet on an xml file and load this xml file into PDA application made in C#(.net 2.0 compact framework) in webbrowser control.
Now I want to save this xml file with changed node value with same or diffent file name.
Javascript for document.write is not working in PDA.
WebBrowser control does not have Document property.
So How I can solve this issue.
Regards,
Pankaj Kumar
modified on Wednesday, April 15, 2009 8:11 AM
|
|
|
|
|
I'm creating xml from dataset using
ds.writexml("1.xml");
this line...
I want xml according to my DTD format.. How is it possible in c#
pls help me...
Thankyou....
R RajaGuru
|
|
|
|
|
I don't believe C# supports DTD files. Even if it did, it's certain the dataset class does not know how to mangle the data it has to try to fit to a DTD. You're out of luck. You can validate XML against a schema in C#, but you can't give C# a schema and some XML and expect it to reformat it for you. Your best bet is to look at the XML that comes out of your dataset, and write an xslt sheet that modifies it to fit your schema.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi,
I have applying MVC pattern in windows forms application, but I got a problem that I am not clearly understand the usage of controller, for the application, I created a controller and fill in lots of functions to control different area of object, now, it became the "god controller"(same as god class with ~150 methods), but it doesn't contain business logic, it just perform the object creation, object flow between DAO and notify events for UI display in about five set of domain in an enterprise.
Could anyone provide some guideline / hints to help for clearly understand the responsibility of controller?
Thanks.
|
|
|
|
|
Model-Having Database codes.insert,retrieve data from database
Controller- Get Values from view give it to Model & Get Data from Model Give it to View
View - Display value and request controller...
R RajaGuru
|
|
|
|
|
Some of that is already applied but the controller is too large, I think it contains a lot of "Get Data from Model and Give it to View" code in the controller.
e.g.
for payment, the view should load all PaymentMethod, all Branch and all division for user selection and bound the Payment object with Payment details, so the controller for this case contain GetAllPaymentMethod(), GetAllBranch(), GetAllDivision() for user selection
Some of other part of the application contain more then three GetXXX() so it become too large, so I want to clarify about it.
1. Should controller handle object creation method? I have already separated a Factory Class for object creation, but should view directly call the factory or call the controller to create object from factory?
2. Should controller handle GetAllXXX() method for user selection? or let view call it directly?
3. Should controller handle flow between object and DAO? e.g. Update(Payment obj) { PaymentDao.Update(obj);}
4. Should controller provide interface for domain model method? e.g. ShipOrder(Order obj) { order.Ship(); orderDao.Update(order);}
Thanks
|
|
|
|
|
Hi,
I have a document that gets printed to a label printer via the PrintDocument class.
(Partial listing)
PrintDocument pd = new PrintDocument();
pd.DocumentName = "My document";
pd.PrintController = new StandardPrintController();
pd.BeginPrint += new PrintEventHandler(OnBeginPrint);
pd.PrintPage += new PrintPageEventHandler(onPrintPage);
pd.EndPrint += new PrintEventHandler(OnEndPrint);
pd.Print();
pd.Dispose();
My question:
Is there any method within the PrintDocument class that can reverse the printing for me. As I am sending to a label printer, it is important that the bottom of the label is presented first as it comes out of the printer.
-Regards,
David Bailey.
|
|
|
|
|
When you're printing, are you just using a Graphics object?
If so, then you can set the Graphics.Transform to be rotated by 180 degrees
|
|
|
|
|
Hi benjymous and thanks for your reply.
I have in my possession Charles Petzold's "Programming Microsoft Windows with C#" and did try a few things such as RotateTransform(180f) etc. Only some of the output swiveled like it should. Your comment at least helped me to work out why...
I am MOSTLY using a Graphics object to draw with. But I am also using a GetHdc() of that graphics object to draw some rich text via use of the RichTextBox. This output is remaining steadfast.
So is there anyway to rotate the output of a PrintDocument? Should I be using something else? Or will I have to rotate every individual element that I am trying to print?
Any help, suggestion or clue will be greatly received.
- David.
|
|
|
|
|
If you're stuck with the HDC stuff, you could just drawing everything to a bitmap first, then draw that bitmap to your final printer graphics object with the transform set.
|
|
|
|
|
How can i export .png images to an Excel sheet, is it possible only through some tools or can i do it with C#
|
|
|
|
|
What do you mean by 'code behind' ? This is not the ASP.NET forum. I assume it can be done with the Microsoft tools for Office, which expose Office to .NET code.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Is there any way to export Images to Excel using C#?
Could you please explain
|
|
|
|
|
Holy Moly. Did you read my reply ? What have you done to try to find the answer ? Have you searched the web ?
Funny how I search with google and find a ton of answers in seconds.
This[^] too hard for you ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I want to created setup for C# windows application which should also install .net runtime incase not already installed of the users machine
Please adivce any url / links
Thanks in advance
|
|
|
|
|
ptr_Electron wrote: I want to created setup for C# windows application which should also install .net runtime incase not already installed of the users machine
While creating the setup,
1. In Solution Explorer > Right Click on Setup Project
2. Click on Properties
3. Property Page will come > Click on Prerequisites
4. Selcet the .NET Framework and also select the download or install option for that framework.
Hope this will help you
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
|
Google broken where you live ? Most setup packages support this.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
C# newb here. I've gone down the rabbit hole trying to find the answer myself, so I am asking here.
In my windows form, I want to prompt the user to enter an IP address. I made a popup dialog with a MaskedTextBox (mask was 990.990.990.990). This worked, but it required the user to fill in every character (even if he just had to press the arrow key or spacebar, that is kind of annoying).
I tried other masks (like 099.099.099.099), but nothing makes that annoyance go away.
So I decided to make 4 separate text boxes. This adds the ability to easily tab to the next octet, but it takes away the nice Copy/Paste ability to dump in an IP from the clipboard.
So I started looking for some kind of OnPaste event that I could handle and have it disburse pasted addresses automagically. There doesn't appear to be such an event.
I found several explanations of how to intercept Ctrl-V or Shift-Ins key combinations, but that is an incomplete solution; I want to catch all possible paste methods.
I was thinking about overriding the IsInputKey method somehow, but I don't know how to do that without creating a custom control (which just seems like massive overkill to me).
In Java, I could override the method at instantiation like so:
this.maskedTextBox1 = new System.Windows.Forms.MaskedTextBox() {
protected override bool IsInputKey(Keys AKeyData) {...}
};
But that doesn't seem to work in C#.
So what's the best way to accomplish what I want to do?
My other signature is a Porche.
|
|
|
|
|
You can still override functionality, you just need to do it as its own inherited class, rather than inline at instantiation.
|
|
|
|
|
Some of these[^] may interest you.
|
|
|
|
|
I appreciate the thought.
I already saw a couple of those, but I was hoping to avoid adding custom controls into my code.
Especially since it should be such a small change, dangit! Why does MS torment me so?
My other signature is a Porche.
|
|
|
|