|
Hi All,
I want to implement MVC in C#.net. I have multiple view and single controller.
I have grid on the form which is docked in MDI Parent form. User want to view same out put in un-docked view. If user perform any action then same effect should appear on the both views.
Thanks,
Syed Sadaqat Hussain
|
|
|
|
|
That's nice. Now, do you have a specific problem, or are you just making notes for future reference on this message board?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
I bet the question will be "how can I do this?"
modified 12-Sep-18 21:01pm.
|
|
|
|
|
My money goes on "can someone give me the code to... (PS ITS URGENT)"
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Unknown Query Engine Error
Failed to open a rowset.
Error in File C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\temp_83afa3e5-684f-4586-88b7-b1c22e9cc7d1 {096D4500-45DC-4A34-9DA9-E80F4AED7546}.rpt:
Unknown Query Engine Error
The above error raised while open an report. DataSet dsRoutecard.xsd file is used as datasource. Tables are filled before opening the report.
Any please help to me.
Thanks in advance!
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
If you're using CrystalReportViewer object to show the report, try wiring CrystalReportViewer.Error and CrystalReportViewer.HandleException events. They should give you more info what goes wrong.
The need to optimize rises from a bad design
|
|
|
|
|
Thanks for you reply. I Tried like this one. but i get the same message.
private void CReportViewer_Error(object source, CrystalDecisions.Windows.Forms.ExceptionEventArgs e)
{
InfoMsgBox(e.Exception.Message);
}
Thanking You.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
public static int GenerateImage(String FilePath, int ImageW, int ImageH, string sToFolder)
{
try
{
int iResult;
if (File.Exists(sToFolder + System.IO.Path.GetFileName(FilePath)))
{
iResult = 0; // File allaready exists to destination path
}
else
{
int ThumbWidth = ImageW;
int ThumbHeight = ImageH;
Bitmap origImg = new Bitmap(FilePath);
// HttpContext.Current.Server.MapPath("filename");
//Declare our New FileName to save the thumbnail as
String newSavePath = sToFolder + System.IO.Path.GetFileName(FilePath);
Bitmap dstImg = new Bitmap(ThumbWidth, ThumbHeight);
dstImg.SetResolution(72, 72);
Graphics g = Graphics.FromImage(dstImg);
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.SmoothingMode = SmoothingMode.HighQuality;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.CompositingQuality = CompositingQuality.HighQuality;
// Resize the original to the thumb width and height
g.DrawImage(origImg, 0, 0, ThumbWidth, ThumbHeight);
g.Dispose();
EncoderParameters encoderParameters = new EncoderParameters(1);
encoderParameters.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Compression, 100); // 80% Compression
dstImg.Save(newSavePath, ImageCodecInfo.GetImageEncoders()[1], encoderParameters); // jpg format
dstImg.Dispose();
origImg.Dispose();
iResult = 1;
}
return iResult;
}
catch (Exception ex)
{
throw (ex);
}
}
I AM USING THIS FUNTION WHEN i run the local it is working fine if i run on server it is giving error any body can help me........ASAP...........
|
|
|
|
|
Are you sure that a new path is being sent to the method? If you attempt to ovewrite the open file you can get this message. If a new path is being set, check that your program has write permissions on it.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Try not disposing of anything, and see if it works. I have had problems closing streams in a similar scenario. If it works, try wrapping the disposable objects in using blocks instead (which strangely seemed to work in my case).
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Member 5565850 wrote: WHEN i run the local it is working fine if i run on server it is giving error
Does the error occur on the Save() call?
I'm going with a permissions issue
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hai all,
I wrote a code to read & write in the Excel 2007 in C#.net 2005.
I made an exe of it to deploy. It works fine in the development environment but fails outside it giving the Error:
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Interop.Excel, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Why this problem occurs? How to solve?
Thnks in advnce,
Praji
|
|
|
|
|
I suspect that other computers either don't have Excel installed all they have other version.
|
|
|
|
|
I copied that .exe to other folder in same machine, it doesn't works? There any solution?
|
|
|
|
|
You must copy all the dlls that are in the same folder as the executable.
|
|
|
|
|
hi.
how can copy all nodes of a treeview in another at once?
i dont want to use foreach methode.
sepel
|
|
|
|
|
foreach (Node ndSource in treeSource.Nodes)
{
Node newNode = new Node();
newNode.Text = ndSource.Text;
-- copy all required properties like the text property above --
ChildNodes(ndSource, newNode);
treeDestination.Nodes.Add(newNode);
}
private void ChildNodes(Node ParentNode, Node newParent)
{
foreach (Node ndChild in ParentNode.Nodes)
{
Node newNode = new Node();
newNode.Text = ndChild.Text;
-- copy all required properties like the text property above --
ChildNodes(ndChild);
newParent.Nodes.Add(newNode);
}
}
|
|
|
|
|
A node can't exist in two treevies at once. Each node has to be cloned first so some sort of loop is inevitable. Two code snippets below. The first does what you want but with a loop. The second moves the nodes rather than copies but no loop required.
if (treeView1.Nodes.Count > 0)
{
TreeNodeCollection treeNodes = treeView1.Nodes;
TreeNode[] nodearray = new TreeNode[treeNodes.Count];
for (int i = 0; i < nodearray.Length; i++)
{
nodearray[i] = (TreeNode)treeNodes[i].Clone();
}
treeView2.Nodes.AddRange(nodearray);
}
if (treeView1.Nodes.Count > 0)
{
TreeNodeCollection treeNodes = treeView1.Nodes;
TreeNode[] nodearray = new TreeNode[treeNodes.Count];
treeNodes.CopyTo(nodearray, 0);
treeView1.Nodes.Clear();
treeView2.Nodes.AddRange(nodearray);
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
but i think to use AddRang function.
sepel
|
|
|
|
|
Hello everyone,
I want to monitor the WCF/web services communication between client and server to serve better debugging purpose.
Any tools? I could use sniffer, but not quite friendly to show SOAP message format.
thanks in advance,
George
|
|
|
|
|
With .NET 2.0 you could use a feature in WSE3 that was tracing SOAP traffic between server and client. Myself, I use a third party program called HttpAnalyzer which served me well.
|
|
|
|
|
Thanks blackjack2150,
1.
To use WSE3, I think it is an SDK, and we need to write code, correct (i.e. not a ready to use tool)?
2.
I made some study for HttpAnalyzer, looks like a sniffer tool for Http traffic, similar to Microsoft Fiddler2?
regards,
George
|
|
|
|
|
Hi there,
I have written a c# application (VS2005) for a windows CE 5.0 device (Psion 8515) with a screen/res
of 6.4", 640 x 480.
I had to make chunky controls on the forms for the tractor drivers to be able to touch screen easaly without using a stylus.
I now need to load the same application on a much smaller Pocket PC (Psion workabout
Display 3.5" Resolution: 240 x 320) without having to redesign all the forms, buttons etc...
The application runs fine on the Workabout but does not automatically resize the forms and controls.
I end up with a scrolling screen.
Never did that before, does anyone have a solution, direction to take?
Very much appreciated
Thanks
Scalpa
|
|
|
|
|
I want to insert an image in the header of the WORD document through C#. The word document initially gets created through code only. When I try to access "oWordApplic.Selection.HeaderFooter", it shows "null". Not sure how to create a HeaderFooter object and insert an image into it.
private Word.ApplicationClass oWordApplic;
oWordApplic = new Word.ApplicationClass();
|
|
|
|
|
try
Section.Headers[WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Fields.Add
Here[^] is a good article on word automation.
"If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be 'meetings'." - Dave Barry
|
|
|
|