username@email.com
2025-05-12 ae6e40362a745caef9ead36f81f38313fb8c2c66
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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);
            }
        }
 
    }
}