username@email.com
2021-09-02 9da546cd8de37882147f19f6f090544476bfe5ae
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
1.城市区域
//页面使用
<div class="popupMenu" id="PCACCommon"></div>
<script type="text/javascript">
    PCAC('<%=Province %>', '<%=City %>', '<%=County %>',"Name");//城市数据存名称用Name,存编号则空字符
</script>
 
//后台使用
    //声明
        public string Province = ""; //接收值 Request["selectProvince"].ToString2();
        public string City = "";//接收值 Request["selectCity"].ToString2();
        public string County = "";//接收值 Request["selectCounty"].ToString2();
 
    //赋值
        Province = model.Province.ToString2();
        City= model.City.ToString2();
        County = model.County.ToString2();
    
    //接收
        model.Province = Request["selectProvince"].ToString2();
        model.City = Request["selectCity"].ToString2();
        model.County = Request["selectCounty"].ToString2();
 
2.列表序号
    //有分页
    <%#Container.ItemIndex + 1+ this.UCPager1.PageSize * (this.UCPager1.PageIndex - 1)%>
    //无分页
    <%#Container.ItemIndex + 1%>
 
 
3.客户经理 业务经理 操作人 员工
//当数据库存int时//会员id,是否业务经理,是否客户经理
this.selBusinessManagerId.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId,true,false);
this.selBusinessManagerId.DataTextField = "Name";
this.selBusinessManagerId.DataValueField = "Keyid";
this.selBusinessManagerId.DataBind();
this.selBusinessManagerId.Items.Insert(0, new ListItem("请选择", ""));
this.selBusinessManagerId.Items.Insert(1, new ListItem(CurrentUser.ShortName, "0"));
//当数据库存string时
this.selBusinessManagerId.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId,true,false);
this.selBusinessManagerId.DataTextField = "Name";
this.selBusinessManagerId.DataValueField = "Name";
this.selBusinessManagerId.DataBind();
this.selBusinessManagerId.Items.Insert(0, new ListItem("请选择", ""));
this.selBusinessManagerId.Items.Insert(1, new ListItem(CurrentUser.ShortName, CurrentUser.ShortName));
 
4.上传单张图片文件
 
        <tr>
            <td align="right">
                Logo
            </td>
            <td>
                <input type="file" name="fileAP_DefaultImg" class="" /><br />
                <img width="60" height="60" src='<%=ViewData["_Logo"].JEP2() %>' />
            </td>
        </tr>
 
        //写到业务逻辑层
        CY.WebForm.cs.UploadCS.UpFileResult _UpFileResult2 = CY.WebForm.cs.UploadCS.Upload("fileAP_DefaultImg", m_Info_Ad.A_Pic);
            m_Info_Ad.A_Pic = m_Info_Ad.A_Pic ?? "";
            if (_UpFileResult2.returnerror.Count == 0)
            {
                if (_UpFileResult2.returnfilename.Count > 0)
                    m_Info_Ad.A_Pic = _UpFileResult2.returnfilename[0].ToString2();
            }
            else
                JavaScript.MessageBox(string.Join("<br/>", (string[])_UpFileResult2.returnerror.ToArray(typeof(string))), this);
 
 
 
 
/*4 上传多张图片文件*/
        <tr>
            <td align="right">
                产品图片
            </td>
            <td>
                <div>
                    <ul>
                        <%
                            string[] s = null;
                            object o = ViewData["_ProductPics"];
                            if (o == null) { s = new string[] { }; }
                            else { s = (string[])o; }
                            for (int i = 0; i < s.Length; i++)
                            {
                        %>
                        <li class="fl" style="padding: 5px;">
                            <img style="border: 2px solid #666;" width="60" height="60" src='<%=s[i] %>' />
                            <input type="checkbox" checked="checked" name="OldProductPics" value='<%=s[i] %>' />
                        </li>
                        <%} %>
                    </ul>
                    <div class="cb">
                    </div>
                </div>
                <div class="Files">
                    <input type="file" name="ProductPics" /><br />
                </div>
                <div>
                    <input type="button" value=" + " class="addFile" />
                    <input type="button" value=" - " class="cutFile" />
                </div>
                <script>
                    $(function ()
                    {
                        $(".addFile").click(function ()
                        {
                            $(this).parent().parent().find(".Files").append("<input type=\"file\" name=\"ProductPics\" /><br />");
                        });
                        $(".cutFile").click(function ()
                        {
                            $(this).parent().parent().find(".Files").find(":file").last().remove();
                            $(this).parent().parent().find(".Files").find("br").last().remove();
                        });
                    });
                </script>
            </td>
        </tr>
 
 
 
        参数: string ProductPics, string[] OldProductPics,
 
        //写到业务逻辑层
        Common.Globals.UpFileResult _UpFileResult = Common.Globals.Upload("ProductPics");
        if (_UpFileResult.returnerror.Count == 0)
        {
            ArrayList _Arr = new ArrayList();
            if (OldProductPics != null && OldProductPics.Length > 0)
            { for (int i = 0; i < OldProductPics.Length; i++) { _Arr.Add(OldProductPics[i]); } }
            _Arr.AddRange(_UpFileResult.returnfilename);
            m_Product.ProductPics = string.Join(",", (string[])_Arr.ToArray(typeof(string)));
        }
        else
        {
            throw new DealMvc.Common.ExceptionEx.MyExceptionMessageBox(string.Join("<br/>", (string[])_UpFileResult.returnerror.ToArray(typeof(string))));
        }
 
 
        try
        {
            ViewData["_ProductPics"] = m_Product.ProductPics.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
        }
        catch { }