username@email.com
2025-05-21 a980cd04341d71216e0f59bd4b7327fe9fc50032
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CY.BLL;
using CY.BLL.Sys;
using CY.Model;
using CY.Infrastructure.Query;
using CY.Infrastructure.Common;
using System.Data;
 
namespace CY.WebForm.Pages.workcar
{
    //吴辉
    //打印车辆交接记录
    public partial class CarTransferPrint : BasePage
    {
        OA_CarTransferBll bll_OA_CarTransferBll = null;
        OA_CarDictionaryBLL bll_OA_CarDictionaryBLL = null;
        OA_DepartmentBll bll_OA_DepartmentBll = null;
        OA_StaffBLL bll_OA_StaffBLL = null;
        OA_CarManageBll bll_OA_CarManageBll = null;
 
        //初始化
        public CarTransferPrint()
        {
            bll_OA_CarTransferBll = new OA_CarTransferBll();
            bll_OA_CarDictionaryBLL = new OA_CarDictionaryBLL();
            bll_OA_DepartmentBll = new OA_DepartmentBll();
            bll_OA_StaffBLL = new OA_StaffBLL();
            bll_OA_CarManageBll = new OA_CarManageBll();
        }
 
        //页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.selTransferUseCarReconed.DataSource = bll_OA_CarDictionaryBLL.SelectListByMemberIdAndParType(CurrentUser.MemberId, "出车事由");//出车事由
                this.selTransferUseCarReconed.DataValueField = "ParName";
                this.selTransferUseCarReconed.DataTextField = "ParName";
                this.selTransferUseCarReconed.DataBind();
                this.selTransferUseCarReconed.Items.Insert(0, new ListItem("全部", ""));
 
                Pagination pa = new Pagination();
                pa.PageSize = 500;
                pa.PageIndex = 1;
                this.selTransferDepart.DataSource = bll_OA_DepartmentBll.SelectModelPage(pa, CurrentUser.MemberId, "", "启用");
                this.selTransferDepart.DataTextField = "Name";
                this.selTransferDepart.DataValueField = "Keyid";
                this.selTransferDepart.DataBind();
                this.selTransferDepart.Items.Insert(0, new ListItem("全部", ""));
 
                this.selCarId.DataSource = bll_OA_CarManageBll.SelectModelPage(pa, CurrentUser.MemberId, "", "", null, null, null, null, null, "", null);
                this.selCarId.DataTextField = "CarNumber";
                this.selCarId.DataValueField = "Keyid";
                this.selCarId.DataBind();
                this.selCarId.Items.Insert(0, new ListItem("全部", ""));
            }
        }
 
        //绑定数据
        private void BindList()
        {
            Pagination pa = new Pagination();
            pa.PageSize = 10000;
            pa.PageIndex = 1;
            this.RepClientList.DataSource = bll_OA_CarTransferBll.SelectModelPage(pa, CurrentUser.MemberId, this.selCarId.Value.ToInt32(), this.txtBeginViolationTime.Value.ToDateTime2(), this.txtEndViolationTime.Value.ToDateTime2(), "", this.selTransferUserCarPeople.Value, "", this.selTransferUseCarReconed.Value, this.txtTransferPilot.Value, "", "", null, null, this.selTransferIsBack.Value.ToInt32(), null, "", null, "", this.selTransferDepart.SelectedValue, "", null, null, null, "");
            this.RepClientList.DataBind();
        }
 
        //查询事件
        protected void btn_Search_Click(object src, EventArgs e)
        {
            BindList();
        }
 
        //部门修改
        protected void selDepartmentId_SelectedIndexChanged(object sender, EventArgs e)
        {
            GetStaffByDep(this.selTransferDepart.SelectedValue.ToString());
        }
 
        //员工获取
        public void GetStaffByDep(string DepartmentId)
        {
            DataTable dt_Staff = bll_OA_StaffBLL.GetStaffByDep(CurrentUser.MemberId, DepartmentId);
            if (dt_Staff.Rows.Count > 0)
            {
                this.selTransferUserCarPeople.DataSource = dt_Staff;
                this.selTransferUserCarPeople.DataTextField = "Name";
                this.selTransferUserCarPeople.DataValueField = "Name";
                this.selTransferUserCarPeople.DataBind();
                this.selTransferUserCarPeople.Items.Insert(0, new ListItem("全部", ""));
                this.selTransferUserCarPeople.Value = "";
            }
            else
            {
                this.selTransferUserCarPeople.Items.Clear();
                this.selTransferUserCarPeople.Items.Insert(0, new ListItem("全部", ""));
            }
        }
    }
}