FpSpread1.ActiveSheetView.RowCount = 20;
FpSpread1.ActiveSheetView.ColumnCount = 10;
this.FpSpread1.Sheets[0].AllowPage = false;
FpSpread1.Sheets.Count = 1;
FpSpread1.ScrollBarBaseColor = Color.LightSteelBlue;
for (int i = 0; i < FpSpread1.Sheets.Count; i++)
ApplySkin(FpSpread1.Sheets);
FpSpread1.EnableAjaxCall = true;
FpSpread1.ClientAutoCalculation = true;
if (service != null)
{
string workItemId = Request.QueryString["WorkItemId"];
DataSet myds = service.getWorkFormApprovMsgByWorkItemId(workItemId);
if (myds == null)
return;
HiddenworkItemId.Text = workItemId;
//获取表单内容
DataTable mytab1 = myds.Tables[0];
if (mytab1.Rows.Count > 0)
{
FormType.Text = mytab1.Rows[0]["FormTypeName"].ToString(); // model.FormTypeName;
FormListName.Text = mytab1.Rows[0]["FullName"].ToString(); //model.FullName;
FormNo.Text = mytab1.Rows[0]["FormNo"].ToString(); //model.FormNo;
WorkName.Text = mytab1.Rows[0]["FormName"].ToString(); //model.FormName;
Realname.Text = mytab1.Rows[0]["Realname"].ToString(); //model.Realname;
HiddenFormNo.Text = mytab1.Rows[0]["FormNo"].ToString(); //model.FormNo;
HiddenWorkFormId.Text = mytab1.Rows[0]["WorkFormId"].ToString(); //model.WorkFormId.ToString();
string mystr = mytab1.Rows[0]["Contents"].ToString(); //model.Contents;
if (mystr.Substring(0, 1) == "?")
{
mystr = mystr.Substring(1, mystr.Length - 1);
}
MemoryStream ms = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(mystr));
FpSpread1.Sheets[0].Open(ms);
} |