2
schangxiang@126.com
2024-08-16 b47c50a2a514def7374b32d7194b2c599cba5625
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
using iWareCommon.Common.Entity;
using iWareDataCore.BASE.Entity;
using iWareDataCore.BASE.Service;
using iWareWms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace FineUIPro.iWareWms.View.SL.PlaceMaterial
{
    public partial class PlaceMaterialDetail : PageBase
    {
        protected override void Save(out string msg)
        {
            if (!string.IsNullOrEmpty(tbPlacceNo.Text.Trim()) && !string.IsNullOrEmpty(tbMaterialNo.Text.Trim()))
            {
                PlaceMaterialService.GetInstance().SaveInfo(tbPlacceNo.Text,tbMaterialNo.Text, out msg);
            }
            else 
            {
                msg = "库位编号和物料编号不能为空!";
            }
           
        }
 
        //protected override void Update(out string msg)
        //{
 
        //    var type = GetPlaceType();
        //    type.Id = Convert.ToInt32(Request.QueryString["Id"]);
        //    PlaceMaterialService.GetInstance().Update(type, out msg);
 
        //}
 
        //private PlaceMaterialEntity GetPlaceType()
        //{
        //    return new PlaceMaterialEntity
        //    {
               
               
        //    };
        //}
 
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request.QueryString["IsEdit"]))
                {
                    string msg;
                    var pm = PlaceMaterialViewService.GetInstance().QueryByParam(new QueryParam { Filter = new Dictionary<string, object> { { "Id", Request.QueryString["Id"] } } }, out msg);
 
                    if (!string.IsNullOrEmpty(msg))
                    {
 
                        return;
 
                    }
 
                    tbPlacceNo.Text = pm.Count > 0 ? pm[0].PlaceCode : "";
                    tbMaterialNo.Text = pm.Count > 0 ? pm[0].MaterialCode : "";
 
                }
 
            }
        }
    }
}