using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.Model;
|
using CY.BLL.OA;
|
using CY.Infrastructure.Common;
|
namespace CY.WebForm.Pages.procurement
|
{
|
public partial class SureOutOfStorage : BasePage
|
{
|
OA_ProcurementBLL _OA_ProcurementBLL = null;
|
OA_GoodsInfo goodsInfo = null;
|
OA_GoodsInfoBLL _OA_GoodsInfoBLL = null;
|
OA_OutOfStorageBLL _OA_OutOfStorageBLL = null;
|
OA_InventoryBLL _OA_InventoryBLL = null;
|
public SureOutOfStorage()
|
{
|
_OA_InventoryBLL = new OA_InventoryBLL();
|
_OA_OutOfStorageBLL = new OA_OutOfStorageBLL();
|
_OA_GoodsInfoBLL = new OA_GoodsInfoBLL();
|
_OA_ProcurementBLL = new OA_ProcurementBLL();
|
goodsInfo = new OA_GoodsInfo();
|
|
}
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
if (!IsPostBack)
|
{
|
InitialData();
|
}
|
}
|
|
protected void InitialData()
|
{
|
|
OA_OutOfStorage model = _OA_OutOfStorageBLL.GetModelInfo(Request["Keyid"].ToInt32());
|
if (model != null)
|
{
|
this.spanCage.InnerText = model.WarehouseName;
|
spanTime.InnerText = model.LastUpdateTime.ToString();
|
spanBrandName.InnerText = model.BrandName;
|
spanGoodsName.InnerText = model.GoodsName;
|
spanOperator.InnerText = model.Operator;
|
spanQuantity.InnerText = model.Quantity.ToString();
|
spanSpecificationName.InnerText = model.SpeceicationName;
|
//spanSuppliers.InnerText = model.SuppliersName;
|
spanGoodsType.InnerText = model.CommodityName;
|
if (model.PaperWeightName != "")
|
{
|
this.TrPaperWeight.Visible = true;
|
this.spanPaperWeight.InnerText = model.PaperWeightName;
|
}
|
else
|
{
|
this.TrPaperWeight.Visible = false;
|
}
|
}
|
|
|
}
|
|
protected void sureOut_Click(object sender, EventArgs e)
|
{
|
OA_OutOfStorage model = _OA_OutOfStorageBLL.GetModelByKeyid(Request["Keyid"].ToInt32());
|
OA_Inventory Inventory = new OA_Inventory();
|
Inventory.BrandId = model.BrandId;
|
Inventory.FirmId = model.FirmId;
|
Inventory.GoodsId = model.GoodsId;
|
Inventory.LastUpdateTime = DateTime.Now;
|
Inventory.WarehouseId = model.WarehouseId;
|
Inventory.SpecificationId = model.SpecificationId;
|
Inventory.PaperWeightId = model.PaperWeightId;
|
|
if (_OA_OutOfStorageBLL.GoodsOutofStorage(Inventory, model))
|
{
|
JavaScript.RefreshDIVOpener(this);
|
}
|
else
|
{
|
JavaScript.MessageBox("出库失败", this);
|
}
|
}
|
|
}
|
}
|