Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                EyouSoft.BLL.AdminCenterStructure.PersonnelInfo         bllAddress         = new EyouSoft.BLL.AdminCenterStructure.PersonnelInfo();
                EyouSoft.Model.AdminCenterStructure.PersonnelSearchInfo modelAddressSearch = new EyouSoft.Model.AdminCenterStructure.PersonnelSearchInfo();
                modelAddressSearch.UserName = WorkerName;
                IList <EyouSoft.Model.AdminCenterStructure.PersonnelInfo> listAddress = bllAddress.GetList(PageSize, PageIndex, ref RecordCount, CurrentUserCompanyID, modelAddressSearch);


                if (RecordCount == 0)
                {
                    RecordCount = 1;
                }
                listAddress = bllAddress.GetList(RecordCount, 1, ref RecordCount, CurrentUserCompanyID, modelAddressSearch);



                if (listAddress != null && listAddress.Count > 0)
                {
                    this.crptPrintAddressList.DataSource = listAddress;
                    this.crptPrintAddressList.DataBind();
                }
                else
                {
                    this.crptPrintAddressList.EmptyText = "<tr><td colspan=\"8\"><div style=\"text-align:center;  margin-top:75px; margin-bottom:75px;\">没有相关的数据!</span></div></td></tr>";
                }
            }
        }
Example #2
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        private void BindData()
        {
            EyouSoft.BLL.AdminCenterStructure.PersonnelInfo           bllAddress  = new EyouSoft.BLL.AdminCenterStructure.PersonnelInfo();
            IList <EyouSoft.Model.AdminCenterStructure.PersonnelInfo> listAddress = bllAddress.GetList(PageSize, PageIndex, ref RecordCount, CurrentUserCompanyID, WorkerName, Department);

            if (listAddress != null && listAddress.Count > 0)
            {
                this.crptAddressList.DataSource = listAddress;
                this.crptAddressList.DataBind();
                this.BindPage();
            }
            else
            {
                this.crptAddressList.EmptyText    = "<tr><td colspan=\"8\"><div style=\"text-align:center;  margin-top:75px; margin-bottom:75px;\">没有相关的数据!</span></div></td></tr>";
                this.ExporPageInfoSelect1.Visible = false;
            }
        }
Example #3
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        private void BindData()
        {
            EyouSoft.BLL.AdminCenterStructure.PersonnelInfo         bllPersonnel         = new EyouSoft.BLL.AdminCenterStructure.PersonnelInfo();
            EyouSoft.Model.AdminCenterStructure.PersonnelSearchInfo modelPersonnelSearch = GetPersonnelSearchInfo();

            listPersonnel = bllPersonnel.GetList(PageSize, PageIndex, ref RecordCount, CurrentUserCompanyID, modelPersonnelSearch);

            if (listPersonnel != null && listPersonnel.Count > 0)
            {
                this.rptData.DataSource = listPersonnel;
                this.rptData.DataBind();
                this.BindPage();
            }
            else
            {
                this.rptData.EmptyText            = "<tr><td colspan=\"12\"><div style=\"text-align:center;  margin-top:75px; margin-bottom:75px;\">没有相关的数据!</span></div></td></tr>";
                this.ExporPageInfoSelect1.Visible = false;
            }
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string method = Utils.GetQueryStringValue("Method");

            if (!IsPostBack && method == "")
            {
                WorkerName = Utils.GetQueryStringValue("WorkerName");
                Department = Utils.GetIntNull(Request.QueryString["Department"]);
                PageIndex  = Utils.GetInt(Request.QueryString["Page"], 1);
                BindData();
            }
            if (method == "GetExcel")
            {
                EyouSoft.BLL.AdminCenterStructure.PersonnelInfo         bllAddress         = new EyouSoft.BLL.AdminCenterStructure.PersonnelInfo();
                EyouSoft.Model.AdminCenterStructure.PersonnelSearchInfo modelAddressSearch = new EyouSoft.Model.AdminCenterStructure.PersonnelSearchInfo();
                modelAddressSearch.UserName = WorkerName;
                IList <EyouSoft.Model.AdminCenterStructure.PersonnelInfo> listAddress = bllAddress.GetList(PageSize, PageIndex, ref RecordCount, CurrentUserCompanyID, modelAddressSearch);

                if (RecordCount > 0)
                {
                    listAddress = bllAddress.GetList(RecordCount, 1, ref RecordCount, CurrentUserCompanyID, modelAddressSearch);
                    if (listAddress != null && listAddress.Count > 0)
                    {
                        ToExcel(listAddress);
                    }
                    else
                    {
                        ToExcel(new List <EyouSoft.Model.AdminCenterStructure.PersonnelInfo>());
                    }
                }
                else
                {
                    ToExcel(new List <EyouSoft.Model.AdminCenterStructure.PersonnelInfo>());
                }
            }
        }
Example #5
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        protected void BindData(int?DepartmentID, string Name)
        {
            EyouSoft.BLL.AdminCenterStructure.PersonnelInfo           bllPersonnelInfo  = new EyouSoft.BLL.AdminCenterStructure.PersonnelInfo();
            IList <EyouSoft.Model.AdminCenterStructure.PersonnelInfo> listPersonnelInfo = bllPersonnelInfo.GetList(PageSize, PageIndex, ref RecordCount, CurrentUserCompanyID, Name, DepartmentID);

            if (listPersonnelInfo != null && listPersonnelInfo.Count > 0)
            {
                this.dlPersonnelList.DataSource = listPersonnelInfo;
                this.dlPersonnelList.DataBind();
                this.BindPage();
            }
            else
            {
                this.NoData.Visible          = true;
                this.ExportPageInfo1.Visible = false;
            }
        }
Example #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region  除参数
            string Method      = Utils.GetQueryStringValue("method");
            int    PersonnelID = Utils.GetInt(Utils.GetQueryStringValue("personnelID"), -1);
            PageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            #endregion

            if (!IsPostBack && Method == "" && PersonnelID == -1)
            {
                if (CheckGrant(global::Common.Enum.TravelPermission.行政中心_人事档案_修改档案))
                {
                    EditFlag = true;
                }
                if (CheckGrant(global::Common.Enum.TravelPermission.行政中心_人事档案_删除档案))
                {
                    DeleteFlag = true;
                }
                GetOnSearchValue();
                BindData();
            }
            if (Method == "deletePersonnelInfo" && PersonnelID != -1)//删除
            {
                EyouSoft.BLL.AdminCenterStructure.PersonnelInfo bllPersonnel = new EyouSoft.BLL.AdminCenterStructure.PersonnelInfo();
                if (bllPersonnel.Delete(CurrentUserCompanyID, PersonnelID))
                {
                    Response.Clear();
                    Response.Write("True");
                    Response.End();
                }
                else
                {
                    Response.Clear();
                    Response.Write("False");
                    Response.End();
                }
            }
            if (Method == "GetExcel" && PersonnelID == -1)  //  导出Excel
            {
                GetOnSearchValue();
                BindData();
                EyouSoft.BLL.AdminCenterStructure.PersonnelInfo         bllPersonnel         = new EyouSoft.BLL.AdminCenterStructure.PersonnelInfo();
                EyouSoft.Model.AdminCenterStructure.PersonnelSearchInfo modelPersonnelSearch = GetPersonnelSearchInfo();

                if (RecordCount > 0)
                {
                    listPersonnel = bllPersonnel.GetList(RecordCount, 1, ref RecordCount, CurrentUserCompanyID, modelPersonnelSearch);
                    if (listPersonnel != null && listPersonnel.Count > 0)
                    {
                        ToExcel(listPersonnel);
                    }
                    else
                    {
                        ToExcel(new List <EyouSoft.Model.AdminCenterStructure.PersonnelInfo>());
                    }
                }
                else
                {
                    ToExcel(new List <EyouSoft.Model.AdminCenterStructure.PersonnelInfo>());
                }
            }
        }
Example #7
0
        /// <summary>
        /// 绑定个人档案详细信息
        /// </summary>
        protected void BindData()
        {
            EyouSoft.BLL.AdminCenterStructure.PersonnelInfo         bllPersonnel         = new EyouSoft.BLL.AdminCenterStructure.PersonnelInfo();
            EyouSoft.Model.AdminCenterStructure.PersonnelSearchInfo modelPersonnelSearch = new EyouSoft.Model.AdminCenterStructure.PersonnelSearchInfo();
            if (FileNo != "")
            {
                modelPersonnelSearch.ArchiveNo = FileNo;
            }
            if (Name != "")
            {
                modelPersonnelSearch.UserName = Name;
            }
            if (Sex != 0)
            {
                modelPersonnelSearch.ContactSex = (EyouSoft.Model.EnumType.CompanyStructure.Sex)Sex;
            }
            modelPersonnelSearch.BirthDateFrom = BirthdayStart;
            modelPersonnelSearch.BirthDateTo   = BirthdayEnd;
            modelPersonnelSearch.WorkYearFrom  = WorkYearFrom;
            modelPersonnelSearch.WorkYearTo    = WorkYearTo;
            if (JobPostion != 0)
            {
                modelPersonnelSearch.DutyId = JobPostion;
            }
            if (WorkerType != null && WorkerType != -1)
            {
                modelPersonnelSearch.PersonalType = (EyouSoft.Model.EnumType.AdminCenterStructure.PersonalType)(WorkerType);
            }
            if (WorkerState != "null")
            {
                modelPersonnelSearch.IsLeave = Convert.ToBoolean(WorkerState);
            }
            if (MarriageState != "null")
            {
                modelPersonnelSearch.IsMarried = Convert.ToBoolean(MarriageState);
            }
            int RecordCount = 0;
            IList <EyouSoft.Model.AdminCenterStructure.PersonnelInfo> listPersonnel = bllPersonnel.GetList(10000, 1, ref RecordCount, CurrentUserCompanyID, modelPersonnelSearch);

            if (listPersonnel != null && listPersonnel.Count != 0)
            {
                this.rptDataList.DataSource = listPersonnel;
                this.rptDataList.DataBind();
            }
            else
            {
                this.rptDataList.EmptyText = "<tr><td colspan=\"12\"><div style=\"text-align:center;  margin-top:75px; margin-bottom:75px;\">没有相关的数据!</span></div></td></tr>";
            }
        }