Upload to server
uploading
This commit is contained in:
51
omegapro/Omega/Forms/frmViewOpenXMLContent.cs
Normal file
51
omegapro/Omega/Forms/frmViewOpenXMLContent.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
namespace Omega.Forms
|
||||
{
|
||||
public partial class frmViewOpenXMLContent : Omega.BasicForms.frmCommon
|
||||
{
|
||||
public DevExpress.XtraGrid.Views.Grid.GridView View { get; set; }
|
||||
public DevExpress.XtraGrid.Columns.GridColumn Column { get; set; }
|
||||
public frmViewOpenXMLContent()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public override void LoadData()
|
||||
|
||||
{
|
||||
try
|
||||
{
|
||||
string St = View.GetFocusedRowCellValue(Column).ToString();
|
||||
richEditControl.OpenXmlBytes = Convert.FromBase64String(St);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveandClose_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
||||
{
|
||||
String SaveValue = Convert.ToBase64String(richEditControl.OpenXmlBytes);
|
||||
View.SetFocusedRowCellValue(Column, SaveValue);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void Opem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
||||
{
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string filename = openFileDialog.FileName;
|
||||
byte[] buff = File.ReadAllBytes(filename);
|
||||
this.richEditControl.OpenXmlBytes = buff;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user