username@email.com
2025-04-24 e7f2c6aa2638cde347ec1401c76a7a627cee4921
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
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;
using CY.Infrastructure.Common;
using CY.BLL.Sys;
using CY.BLL.EC;
using CY.Infrastructure.DESEncrypt;
using CY.Infrastructure.Query;
using System.Collections;
 
namespace CY.WebForm.Pages.personnel
{
    //吴辉
    //员工详情
    public partial class StaffQuanxianshezhi : BasePage
    {
        OA_StaffBLL bll_OA_StaffBLL = null;
        Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;
        EC_MemberBasicBLL bll_EC_MemberBasicBLL = null;
        OA_FirmRoleBLL bll_OA_FirmRoleBLL = null;
        OA_DepartmentBll bll_OA_DepartmentBll = null;
        OA_StaffResumeBLL bll_OA_StaffResumeBLL = null;
        OA_StaffPostLogBLL bll_OA_StaffPostLogBLL = null;
 
        public string OLDProvince = ""; //接收值 Request["selectProvince"].ToString2();
        public string OLDCity = "";//接收值 Request["selectCity"].ToString2();
        public string OLDCounty = "";//接收值 Request["selectCounty"].ToString2();
        public string NowProvince = ""; //接收值 Request["selectProvince"].ToString2();
        public string NowCity = "";//接收值 Request["selectCity"].ToString2();
        public string NowCounty = "";//接收值 Request["selectCounty"].ToString2();
        public string ManageProvince = ""; //接收值 Request["selectProvince"].ToString2();
        public string ManageCity = "";//接收值 Request["selectCity"].ToString2();
        public string ManageCounty = "";//接收值 Request["selectCounty"].ToString2();
        public string[] OldFileds;
        public string[] NowFileds;
 
        //初始化
        public StaffQuanxianshezhi()
        {
            bll_OA_StaffBLL = new OA_StaffBLL();
            bll_Sys_DictionaryBLL = new Sys_DictionaryBLL();
            bll_EC_MemberBasicBLL = new EC_MemberBasicBLL();
            bll_OA_FirmRoleBLL = new OA_FirmRoleBLL();
            bll_OA_DepartmentBll = new OA_DepartmentBll();
            bll_OA_StaffResumeBLL = new OA_StaffResumeBLL();
            bll_OA_StaffPostLogBLL = new OA_StaffPostLogBLL();
        }
 
        //页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitData();
            }
        }
        public void ClearData()
        {
             
 
 
        }
        //数据加载
        public void InitData()
        {
            var keyid = Request["keyid"];
            var type = Request["type"];
 
            OA_Staff m_OA_Staff = bll_OA_StaffBLL.GetModelByKeyid(Request["keyid"].ToInt32());
                if (m_OA_Staff != null)
                {
                if (type.ToInt32() == 1)
                {
                    this.types.InnerText = "业务经理:";
                    this.IsBusinessManager.SelectedValue = m_OA_Staff.IsBusinessManager ? "True" : "False";
                }
                else if (type.ToInt32() == 2)
                {
                    this.types.InnerText = "客户经理:";
                    this.IsBusinessManager.SelectedValue = m_OA_Staff.IsAccountManager ? "True" : "False";
                }
                else if (type.ToInt32() == 3)
                {
                    this.types.InnerText = "司机:";
                    this.IsBusinessManager.SelectedValue = m_OA_Staff.BF_IsDriver ? "True" : "False";
                }
                else if (type.ToInt32() == 4)
                {
                    this.types.InnerText = "配送权限:";
                    this.IsBusinessManager.SelectedValue = m_OA_Staff.BF_IsDeliverManage ? "True" : "False";
                }
                else if (type.ToInt32() == 5)
                {
                    this.types.InnerText = "报销主管:";
                    this.IsBusinessManager.SelectedValue = m_OA_Staff.BF_IsBaoxiaozhuguan ? "True" : "False";
                }
                else if (type.ToInt32() == 6)
                {
                    this.types.InnerText = "报销经理:";
                    this.IsBusinessManager.SelectedValue = m_OA_Staff.BF_Isbaoxiaojingli ? "True" : "False";
                }
                else if (type.ToInt32() == 7)
                {
                    this.types.InnerText = "公文权限:";
                    this.IsBusinessManager.SelectedValue = m_OA_Staff.BF_Isbaoxiaojingli ? "True" : "False";
                }
 
 
            }
                 
           
        }
 
        //提交事件
        protected void btn_submit_form(object sender, EventArgs e)
        {
            try
            {
                var keyid = Request["keyid"];
                var type = Request["type"];
                OA_Staff m_OA_Staff = bll_OA_StaffBLL.GetModelByKeyid(Request["keyid"].ToInt32());
 
                if (type.ToInt32() == 1)
                {
                    m_OA_Staff.IsBusinessManager = this.IsBusinessManager.SelectedValue.ToBoolean2();
                }
                else if (type.ToInt32() == 2)
                {
                    m_OA_Staff.IsAccountManager = this.IsBusinessManager.SelectedValue.ToBoolean2();
                }
                else if (type.ToInt32() == 3)
                {
                    m_OA_Staff.BF_IsDriver = this.IsBusinessManager.SelectedValue.ToBoolean2();
                }
                else if (type.ToInt32() == 4)
                {
                    m_OA_Staff.BF_IsDeliverManage = this.IsBusinessManager.SelectedValue.ToBoolean2();
                }
                else if (type.ToInt32() == 5)
                {
                    m_OA_Staff.BF_IsBaoxiaozhuguan = this.IsBusinessManager.SelectedValue.ToBoolean2();
                }
                else if (type.ToInt32() == 6)
                {
                    m_OA_Staff.BF_Isbaoxiaojingli = this.IsBusinessManager.SelectedValue.ToBoolean2();
                }
                else if (type.ToInt32() == 7)
                {
                    m_OA_Staff.BF_IsGongwen = this.IsBusinessManager.SelectedValue.ToBoolean2();
                }
 
 
 
 
                if (bll_OA_StaffBLL.UpdateModel(m_OA_Staff))
                    JavaScript.MessageBox("操作成功", this,true,true);
                else
                    JavaScript.MessageBox("操作失败", this);
 
 
            }
            catch (Exception ex)
            {
                PAGEHandleException(ex);
                JavaScript.MessageBox("更新失败", this);
            }
        }
    }
}