schangxiang@126.com
2025-09-17 c9c91ad3e3ac218d81c86809c93a35622b51a686
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
using System;
using System.Collections.Generic;
using iWareDataCore.DEV.Service;
using iWareDataCore.DEV.Entity;
using iWareCommon.Common.Entity;
using iWareWms;
using FineUIPro;
 
 
 
namespace iWareWms.View.DEV.EquipmentType
{
    public partial class EquipmentTypeDetail : PageBase
    {
        protected override void Save(out string msg)
        {
            EquipmentTypeService.GetInstance().Save(GetequmentType(), out msg);
        }
 
        protected override void Update(out string msg)
        {
 
            var equmentType = GetequmentType();
            equmentType.Id = Convert.ToInt32(Request.QueryString["Id"]);
 
            EquipmentTypeService.GetInstance().Update(equmentType, out msg);
        }
 
        private EquipmentTypeEntity GetequmentType()
        {
            return new EquipmentTypeEntity
            {
                Name = EqumentTypeName.Text.Trim(),
                Remark = remark.Text.Trim(),
 
            };
        }
 
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request.QueryString["IsEdit"]))
                {
                    string msg;
                    var types = EquipmentTypeService.GetInstance().QueryByParam(new QueryParam { Filter = new Dictionary<string, object> { { "Id", Request.QueryString["Id"] } } }, out msg);
 
                    if (!string.IsNullOrEmpty(msg))
                    {
                        Alert.ShowInTop(msg);
                        return;
 
                    }
 
                    EqumentTypeName.Text = types.Count > 0 ? types[0].Name : "";
                    remark.Text = types.Count > 0 ? types[0].Remark : "";
 
                }
                else
                {
 
                    return;
                }
            }
        } 
 
 
    }
}