/// <summary> /// 单据类型 /// </summary> private void BindStorageType() { var dicStorageType = new Dictionary <int, string>(); dicStorageType.Add((int)StorageRecordType.BorrowIn, EnumAttribute.GetKeyName((StorageRecordType.BorrowIn))); dicStorageType.Add((int)StorageRecordType.SellReturnIn, EnumAttribute.GetKeyName((StorageRecordType.SellReturnIn))); dicStorageType.Add((int)StorageRecordType.BuyStockIn, EnumAttribute.GetKeyName((StorageRecordType.BuyStockIn))); dicStorageType.Add((int)StorageRecordType.LendIn, EnumAttribute.GetKeyName((StorageRecordType.LendIn))); DDL_StorageType.DataSource = dicStorageType; DDL_StorageType.DataTextField = "Value"; DDL_StorageType.DataValueField = "Key"; DDL_StorageType.DataBind(); DDL_StorageType.Items.Insert(0, new ListItem("", "")); }
/// <summary> /// 单据类型 /// </summary> private void BindStorageType() { var dicStorageType = new Dictionary <int, string> { { (int)StorageRecordType.LendOut, EnumAttribute.GetKeyName((StorageRecordType.LendOut)) }, { (int)StorageRecordType.AfterSaleOut, EnumAttribute.GetKeyName((StorageRecordType.AfterSaleOut)) }, { (int)StorageRecordType.BuyStockOut, EnumAttribute.GetKeyName((StorageRecordType.BuyStockOut)) }, { (int)StorageRecordType.SellStockOut, EnumAttribute.GetKeyName((StorageRecordType.SellStockOut)) }, { (int)StorageRecordType.BorrowOut, EnumAttribute.GetKeyName((StorageRecordType.BorrowOut)) }, { (int)StorageRecordType.InnerPurchase, EnumAttribute.GetKeyName((StorageRecordType.InnerPurchase)) } }; DDL_StorageType.DataSource = dicStorageType; DDL_StorageType.DataTextField = "Value"; DDL_StorageType.DataValueField = "Key"; DDL_StorageType.DataBind(); DDL_StorageType.Items.Insert(0, new ListItem("", "")); }