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
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;
using CY.Infrastructure.Query;
using CY.BLL.Sys;
using CY.BLL;
namespace CY.WebForm.Pages.procurement
{
    //吴辉
    //打印库存明细
    public partial class InventoryPrint : BasePage
    {
        OA_InventoryBLL bll_OA_InventoryBLL = null;
 
        public InventoryPrint()
        {
            bll_OA_InventoryBLL = new OA_InventoryBLL();
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindList();
            }
        }
 
        protected void BindList()
        {
            Pagination pa = new Pagination();
            pa.PageIndex = 1;
            pa.PageSize = int.MaxValue;
            string Keyid = Request["Keyid"].ToString2().Trim(',');
            List<OA_Inventory> OA_InventoryList = bll_OA_InventoryBLL.SelectModelListByKeyid(CurrentUser.MemberId, Keyid).ToList();
            List<OA_Inventory> NEW_OA_InventoryList = new List<OA_Inventory>();
            foreach (var item in OA_InventoryList)
            {
                if (item.IsPaper == 1)
                {
                    if (item.SpeceicationName.IndexOf("*") > 0)
                    {
                        int wNum = 0;
                        int hNum = 0;
                        try
                        {
                            wNum = item.SpeceicationName.Split('*')[0].ToInt32() ?? 0;
                            hNum = item.SpeceicationName.Split('*')[1].ToInt32() ?? 0;
                        }
                        catch (Exception ex)
                        {
                            PAGEHandleException(ex);
                        }
                        try
                        {
                            //item.TotalPrice = (item.UnitPrice * item.InventoryCount);
                        }
                        catch (Exception ex)
                        {
                            PAGEHandleException(ex);
                        }
                        try
                        {
                            item.LingShu = item.InventoryCount.ToDouble2() / 500.ToDouble2();
                            item.DunShu = item.InventoryCount.ToDouble2() * (wNum.ToDouble2() * hNum.ToDouble2() / (1000 * 1000).ToDouble2()) * (item.PaperWeightName.ToInt32().ToDouble2() / (1000 * 1000).ToDouble2());
                        }
                        catch (Exception ex)
                        {
                            PAGEHandleException(ex);
                        }
                    }
                }
                NEW_OA_InventoryList.Add(item);
            }
            RepFirmAccountIncomeList.DataSource = NEW_OA_InventoryList;
            RepFirmAccountIncomeList.DataBind();
 
            this.NowPageAllMoney.InnerText = bll_OA_InventoryBLL.SelectModelListByKeyidTotalPrice(CurrentUser.MemberId, Keyid).ToString("0.00")+"元";
        }
    }
}