|
I will try thank you, thank you
modified 2-Mar-12 15:37pm.
|
|
|
|
|
fyi: SautinSoft RTF=>HTML full version which can handle > 30k words is a US $239 component, on SautinSoft's web-site.
Has the OP searched here on CP for RTF to HTML conversion ? On StackOverFlow, on Google, for other free controls ?
best, Bill
"Every two days we create as much information as we did from the dawn of civilization up until 2003". Eric Schmidt of Google.
|
|
|
|
|
|
I am currently developing uen WPF application I want to work with EFW, and I want to use the MVC architecture, I start with a small test, but it did not work .. I added a library or j 'I've added a WindowsForms want and when I add the time that reference to my project and I tried to post the form when click on the button help me please
|
|
|
|
|
WPF has its own forum here[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
As Richard said there is another forum for WPF. However, most WPF implementations use the MVP MVVM pattern rather than the MVC pattern. They are similar and related but diffent. MVC is more widely used in web applications.
Failure is not an option; it's the default selection.
modified 2-Mar-12 11:53am.
|
|
|
|
|
Strictly speaking, most use MVVM which is akin to MVPP.
|
|
|
|
|
Absolutely correct and I was thinking that but typed MVP. A serious senior moment on Friday morning.
Failure is not an option; it's the default selection.
|
|
|
|
|
Please. When you post, pick one forum and stick with it. Don't cross post.
|
|
|
|
|
|
$Exception {"Column 'Lab_SNo' does not belong to table LabBill."} System.Exception {System.ArgumentException}
What’s wrong in this code? While clicking the button the above exception is raised. Any help me to this problem.
public partial class Lab_frmLabBilling : System.Web.UI.Page
{
DataSet dsBill = new DataSet();
DataTable dtBill = new DataTable("LabBill");
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!Page.IsPostBack)
{
InitializeDS();
}
}
catch (Exception ex)
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "HMS", ex.Message, false);
}
}
private void InitializeDS()
{
try
{
DataColumn dCol1 = new DataColumn("Lab_SNo",typeof(int));
DataColumn dCol2 = new DataColumn("pk_lab_bill_id",typeof(int));
DataColumn dCol3 = new DataColumn("GroupId",typeof(int));
DataColumn dCol4 = new DataColumn("TestId",typeof(int));
DataColumn dCol5 = new DataColumn("Lab_Test", typeof(string));
DataColumn dCol6 = new DataColumn("Lab_Test_Cost", typeof(float));
dtBill.Columns.Add(dCol1);
dtBill.Columns.Add(dCol2);
dtBill.Columns.Add(dCol3);
dtBill.Columns.Add(dCol4);
dtBill.Columns.Add(dCol5);
dtBill.Columns.Add(dCol6);
dsBill.Tables.Add(dtBill);
}
catch (Exception ex)
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "HMS", ex.Message, false);
}
}
protected void btnGInsert_Click(object sender, EventArgs e)
{
try
{
if (txtGroupName.Text == string.Empty)
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "HMS", "Please Enter Group Name", false);
return;
}
int iCount;
iCount = dtBill.Columns.Count;
iCount = dtBill.Rows.Count;
iCount++;
DataRow drBill;
drBill = dtBill.NewRow();
drBill["Lab_SNo"] = iCount;
drBill["pk_lab_bill_id"] = iCount;
drBill["GroupId"] = int.Parse(Session["LabGroupId"].ToString());
drBill["TestId"] = 0;
drBill["Lab_Test"] = txtGroupName.Text;
drBill["Lab_Test_Cost"] = float.Parse(Session["TestCost"].ToString());
dtBill.Rows.Add(drBill);
dsBill.AcceptChanges();
grdLabBill.DataSource = dsBill;
grdLabBill.DataBind();
txtGroupName.Text = "";
Session["GroupId"] = 0;
}
catch (Exception ex)
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "HMS", ex.Message, false);
}
}
}
Thanks in Advance!
Murali.M
Have A Nice Day!
Murali.M
Blog
modified 2-Mar-12 3:14am.
|
|
|
|
|
Did you debug? It might help if you indicate the faulty line.
(PS: edit your post to highlight the line instead of replying to me. )
[EDIT]Please also put your code between code tags. (select code and press the code button)[/EDIT]
V.
|
|
|
|
|
I think the problem resides where you check the !Page.IsPostBack. When you press a button that runs on the server, the page will go into the Page_Load first and then in the event handler of the button. The state is NOT saved between postbacks so this means that the datatables do not exist yet.
You could or recreate the table on each postback or save the information in a session object and take it out. Like this:
if(!Page.IsPostBack){
}
else{
}
You might want to read up on the Asp.Net Page Life Cycle (see google). That will clarify things.
hope this helps.
V.
|
|
|
|
|
Hi,
When you are calling the page for first time, the DataTable schema are getting initialized.
When you click on button, you are skipping the datatable initialization by putting it into
condition called !Page.IsPostBack. Better you keep the initialized table object in session and during post back access it from session object.
|
|
|
|
|
Well, to start with. If you need datatable in as a member variable then on each postback it will be recreated(no state saved).
So you will be needing a session or cache object to store the table's state.
Have datatable created first time and then push the table in a session/cache object.
on further postbacks first get the value from session/cache and then you are good to go. (do it in form_load as the other events will be fired after that)
|
|
|
|
|
How can the program know the application has ended in comman line console started by System.ServiceProcess.Process.Start("cmd.exe")?
The c# code is as follows:
using System.ServiceProcess;
Process proc = new Process();
proc.StartInfo.FileName = "cmd.exe";
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = true;
proc.Start();
proc.StandardInput.WriteLine("application.exe");
I appreciate your help.
Sheng
|
|
|
|
|
It can't. It's an indpendent process that doesn't get any information about how or who launched it.
The only way I know of, and probably going to be the easiest, is to write the launched application to take a command line parameter that is passed to it by the launching app.
Whoops. Just went back and reread the question. Since CMD was the app you launched, it doesn't return until the user types EXIT in the CMD window.
If you want to launch application.exe, you can just launch that instead. If you need results from it, you can redirect the StandardIn and StandardOut streams to handlers in your code so you can interact with it.
|
|
|
|
|
Dave:
Thanks! Your answer at least saves me time to make further futile effort.
Could you please elaborate your suggested solution because I am unfamiliar with it? I appreciate your help.
Sheng
|
|
|
|
|
What?? The solution is to run the application.exe instead of launching cmd.exe.
|
|
|
|
|
Do you mean something like this?
if ( Interactive )
{
pr.WaitForExit() ;
}
else
{
while ( !pr.HasExited )
{
this.DoPutOutput ( pr.StandardOutput.ReadLine() ) ;
}
this.DoPutOutput ( pr.StandardOutput.ReadToEnd() ) ;
}
result = pr.ExitCode ;
|
|
|
|
|
pr.WaitForExit() is waiting for cmd.exe to end, not waiting for the application.exe which is run from command line (cmd.exe). application.exe is started from cmd.exe, but runs in a seperate process.
Sheng
|
|
|
|
|
If you start cmd with the arguments /C application.exe , then the cmd process itself will run your app then exit, so you can wait on your proc (cmd) to terminate.
Open a command prompt and enter cmd /? to see other options.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
|
Why don't you do
proc.StartInfo.FileName = "application.exe";
...
proc.Start();
proc.WaitForExit();
int hResult = proc.ExitCode;
|
|
|
|