using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using EMIS.ViewModel.CacheManage;
namespace EMIS.ViewModel.TeachingMaterial
{
[Serializable]
public class StockOutView
{
///
/// 出库ID
///
[DisplayName("出库ID")]
public Guid StockOutID { get; set; }
///
/// 出库明细ID
///
[DisplayName("出库明细ID")]
public Guid StockOutDetailID { get; set; }
///
/// 学年学期
///
[Required]
[DisplayName("学年学期")]
public Guid? SchoolyearID { get; set; }
///
/// 学年学期
///
[DisplayName("学年学期")]
[Required]
public string SchoolyearName { get; set; }
///
/// 出库单据号
///
/// [Required]
[DisplayName("出库单据号")]
[Required]
public string StockOutNo { get; set; }
///
/// 书库名称
///
[DisplayName("书库名称")]
public string LibraryName { get; set; }
///
/// 教材信息ID
///
[DisplayName("教材信息ID")]
public Guid TeachingMaterialPoolID { get; set; }
///
/// 教材编号
///
[DisplayName("教材编号")]
public string TeachingMaterialCode { get; set; }
///
/// 教材名称
///
[DisplayName("教材名称")]
public string TeachingMaterialName { get; set; }
///
/// 出版单位ID
///
[DisplayName("出版单位ID")]
public Guid? PublishID { get; set; }
///
/// 出版单位
///
[DisplayName("出版单位")]
public string PublishName { get; set; }
///
/// 供应商ID
///
[DisplayName("供应商ID")]
public Guid? SupplierID { get; set; }
///
/// ISBN
///
[DisplayName("ISBN")]
public string ISBN { get; set; }
///
/// 供应商
///
[DisplayName("供应商")]
public string SupplierName { get; set; }
///
/// 版本时间
///
[DisplayName("版本时间")]
public string PublishTime { get; set; }
///
/// 作者
///
[DisplayName("作者")]
[Required]
public string Author { get; set; }
///
/// 单价
///
[DisplayName("单价")]
public decimal? Price { get; set; }
///
/// 领书数量
///
[DisplayName("领书数量")]
public int GetBookQuantity { get; set; }
///
/// 领书数量
///
[DisplayName("领书数量")]
public int OutNumber { get; set; }
///
/// 数量
///
[DisplayName("数量")]
public int? Quantity { get; set; }
///
/// 折扣率
///
[DisplayName("折扣率")]
[Required]
[RegularExpression(@"[\d]?(\.[\d]{0,2})?", ErrorMessage = "必须填写小数值")]
public decimal? Discount { get; set; }
///
/// 折扣率(四舍五入)
///
public decimal? DiscountStr
{
get
{
if (this.Discount == null)
return 0;
return Math.Round((decimal)Discount, 2);
}
}
///
/// 折合价
///
[DisplayName("折合价")]
public decimal? DiscountPrice { get; set; }
///
/// 折合价(四舍五入)
///
public decimal? DiscountPriceStr
{
get
{
if (this.DiscountPrice == null)
return 0;
return Math.Round((decimal)DiscountPrice, 2);
}
}
///
/// 总价(实洋)
///
[DisplayName("总价(实洋)")]
public decimal? TotalDollar { get; set; }
///
/// 实洋(四舍五入)
///
public decimal? TotalDollarStr
{
get
{
if (this.TotalDollar == null)
return 0;
return Math.Round((decimal)TotalDollar, 2);
}
}
///
/// 码洋
///
[DisplayName("码洋")]
public decimal? TotalPrice { get; set; }
///
/// 码洋(四舍五入)
///
public decimal? TotalPriceStr
{
get
{
if (this.TotalPrice == null)
return 0;
return Math.Round((decimal)TotalPrice, 2);
}
}
///
/// 单据总金额
///
[DisplayName("单据总金额")]
public decimal? StockOutSumMoney { get; set; }
///
/// 领书人
///
[Required]
[DisplayName("领书人")]
public Guid? RecipientUserID { get; set; }
///
/// 领书人
///
[DisplayName("领书人")]
public string RecipientUserName { get; set; }
///
/// 领书人编号
///
[Required]
[DisplayName("领书人编号")]
public string GetBookNo { get; set; }
///
/// 领书日期
///
[DisplayName("领书日期")]
[Required]
public DateTime? StockOutTime { get; set; }
///
/// 出库人
///
[DisplayName("出库人")]
public string StockOutUserName { get; set; }
///
/// 出库类型
///
[DisplayName("出库类型")]
[Required]
public int? StockOutTypeID { get; set; }
///
/// 出库类型
///
[DisplayName("出库类型")]
public string StockOutTypeName { get; set; }
///
/// 出库类型
///
[DisplayName("出库类型")]
public string StockOutTypeNameStr
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StockOutType.ToString())
.Where(x => x.Value == StockOutTypeID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 状态
///
[DisplayName("状态")]
public int? RecordStatus { get; set; }
///
/// 状态
///
[DisplayName("状态")]
public string RecordStatusName { get; set; }
///
/// 出库说明
///
[DisplayName("出库说明")]
public string Desc { get; set; }
}
}