using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Container.Viewmodel
{
///
/// 表单数据项
///
public class FormItemModel
{
///
/// 表单键,request["key"]
///
public string Key { set; get; }
///
/// 表单值,上传文件时忽略,request["key"].value
///
public string Value { set; get; }
///
/// 是否是文件
///
public bool IsFile
{
get
{
if (FileContent == null || FileContent.Length == 0)
return false;
if (FileContent != null && FileContent.Length > 0 && string.IsNullOrWhiteSpace(FileName))
throw new Exception("上传文件时 FileName 属性值不能为空");
return true;
}
}
///
/// 上传的文件名
///
public string FileName { set; get; }
///
/// 上传的文件名
///
public string voiceCode { set; get; }
///
/// 上传的文件名
///
public string mallCode { set; get; }
///
/// 上传的文件内容
///
public Stream FileContent { set; get; }
}
}