Hi,
Iam creating Asp ReportViewer to display the Printable Forms.iam doing the customization part so i am saving the report
in my desktop.After modified the report i have to save the modified report in my database.
iam using the following code it saved the before changing .After save the report it does not update my database.
2.How to Create OpenFIleDialog dynamically in aspx.cs Page?
Iam creating Asp ReportViewer to display the Printable Forms.iam doing the customization part so i am saving the report
in my desktop.After modified the report i have to save the modified report in my database.
iam using the following code it saved the before changing .After save the report it does not update my database.
2.How to Create OpenFIleDialog dynamically in aspx.cs Page?
OpenFileDialog openFileDialog1 = new OpenFileDialog();
if (openFileDialog1.ShowDialog() == true)
{
//openFileDialog1.InitialDirectory = "c:\\";
openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
// openFileDialog1.FilterIndex = 2;
// openFileDialog1.RestoreDirectory = true;
// myStream = openFileDialog1.File.OpenRead();
//openFileDialog1.ShowDialog();
System.IO.Stream myStream = openFileDialog1.File.OpenRead();
using (System.IO.StreamReader reader = new System.IO.StreamReader(myStream))
{
// Read the first line from the file and write it the textbox.
tbResults.Text = reader.ReadLine();
}
myStream.Close();
}
BizFramework.Web.Model.PrintableLayout _printableLayout = new PrintableLayout();
// _printableLayout.PrintableLayoutID = 90;
_printableLayout.DocumentName = "Invoice";
_printableLayout.SerializedData = tbResults.Text;
_printableLayout.CreatedBy = "BAOwner";
_printableLayout.CreatedDateTime = System.DateTime.Now;
_printableLayout.ModifiedBy = "BAOwner";
_printableLayout.ModifiedDateTime = System.DateTime.Now;
dcBusinessAccountingContext.PrintableLayouts.Add(_printableLayout);
dcBusinessAccountingContext.SubmitChanges();