username@email.com
2025-05-15 6fe02a16e55f17e45a3997171e1b2284d45af25b
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
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.Infrastructure.Common;
using CY.BLL.Info;
using CY.BLL;
namespace CY.WebForm.Pages.member
{
    //吴辉
    //企业网站信息-基本信息
    public partial class FirmBasic : BasePage
    {
        Info_FirmBLL _Info_FirmBLL = null;
        public FirmBasic()
        {
            _Info_FirmBLL = new Info_FirmBLL();
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitialData();
            }
        }
 
        protected void InitialData()
        {
            Info_Firm m_Info_Firm = _Info_FirmBLL.selectSingleModel(CurrentUser.MemberId);
            if (m_Info_Firm != null)
            {
                this.txtfirmInfoBottom.Value = m_Info_Firm.firmInfoBottom;
                this.imgLogo.Src = m_Info_Firm.firmLogo;
                this.trLogo.Visible = string.IsNullOrEmpty(m_Info_Firm.firmLogo) ? false : true;
                this.imgLogo1.Src = m_Info_Firm.firmLogo1;
                this.trLogo1.Visible = string.IsNullOrEmpty(m_Info_Firm.firmLogo1) ? false : true;
            }
        }
 
        protected void btn_Submit_Click(object sender, EventArgs e)
        {
            Info_Firm m_Info_Firm = _Info_FirmBLL.selectSingleModel(CurrentUser.MemberId);
            if (m_Info_Firm == null)
            {
                m_Info_Firm = new Info_Firm();
                m_Info_Firm.bussinessScope = "";
                m_Info_Firm.FirmInroduce = "";
                m_Info_Firm.FrimContactInfo = "";
                m_Info_Firm.firmLogo = "";
                m_Info_Firm.firmLogo1 = "";
            }
 
            m_Info_Firm.firmInfoBottom = this.txtfirmInfoBottom.Value;
 
            //图片上传
            CY.WebForm.cs.UploadCS.UpFileResult _UpFileResult1 = CY.WebForm.cs.UploadCS.Upload("txtLogo", m_Info_Firm.firmLogo);
            m_Info_Firm.firmLogo = m_Info_Firm.firmLogo ?? "";
            if (_UpFileResult1.returnerror.Count == 0)
            {
                if (_UpFileResult1.returnfilename.Count > 0)
                    m_Info_Firm.firmLogo = _UpFileResult1.returnfilename[0].ToString2();
            }
            else
            {
                JavaScript.MessageBox(string.Join("<br/>", (string[])_UpFileResult1.returnerror.ToArray(typeof(string))), this);
                return;
            }
 
            //图片上传
            CY.WebForm.cs.UploadCS.UpFileResult _UpFileResult2 = CY.WebForm.cs.UploadCS.Upload("txtLogo1", m_Info_Firm.firmLogo1);
            m_Info_Firm.firmLogo1 = m_Info_Firm.firmLogo1 ?? "";
            if (_UpFileResult2.returnerror.Count == 0)
            {
                if (_UpFileResult2.returnfilename.Count > 0)
                    m_Info_Firm.firmLogo1 = _UpFileResult2.returnfilename[0].ToString2();
            }
            else
            {
                JavaScript.MessageBox(string.Join("<br/>", (string[])_UpFileResult2.returnerror.ToArray(typeof(string))), this);
                return;
            }
 
            if (m_Info_Firm != null)
            {
                if (_Info_FirmBLL.UpdateModel(m_Info_Firm))
                    JavaScript.MessageBox("保存成功", this);
                else
                    JavaScript.MessageBox("保存失败", this);
            }
            else
            {
                if (_Info_FirmBLL.InsertModel(m_Info_Firm))
                    JavaScript.MessageBox("保存成功", this);
                else
                    JavaScript.MessageBox("保存失败", this);
            }
        }
    }
}