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.Model;
|
using CY.Infrastructure.Query;
|
using CY.Infrastructure.Common;
|
|
namespace CY.WebForm.Pages.personnel
|
{
|
//吴辉
|
//简历信息列表
|
public partial class OA_StaffResumeList : BasePage
|
{
|
OA_StaffResumeBLL bll_OA_StaffResumeBLL = null;
|
OA_StaffPostCategoryBLL bll_OA_StaffPostCategoryBLL = null;
|
OA_StaffPostBLL bll_OA_StaffPostBLL = null;
|
public string Keyid = "";
|
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 Province = ""; //接收值 Request["selectProvince"].ToString2();
|
public string City = "";//接收值 Request["selectCity"].ToString2();
|
|
//初始化
|
public OA_StaffResumeList()
|
{
|
bll_OA_StaffResumeBLL = new OA_StaffResumeBLL();
|
bll_OA_StaffPostCategoryBLL = new OA_StaffPostCategoryBLL();
|
bll_OA_StaffPostBLL = new OA_StaffPostBLL();
|
}
|
|
//页面加载
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
//UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged;
|
if (!IsPostBack)
|
{
|
if (Request["i"] == "s")
|
{
|
ChangeStatus();
|
Response.Redirect("/Pages/personnel/OA_StaffResumeList.aspx");
|
}
|
Pagination pa = new Pagination();
|
pa.PageSize = 500;
|
pa.PageIndex = 1;
|
this.txtR_I_Consultants_id.DataSource = bll_OA_StaffPostCategoryBLL.SelectModelPage(pa, AdminAccount.MemberId, "", null, null, null, "");
|
this.txtR_I_Consultants_id.DataTextField = "PC_Name";
|
this.txtR_I_Consultants_id.DataValueField = "Keyid";
|
this.txtR_I_Consultants_id.DataBind();
|
this.txtR_I_Consultants_id.Items.Insert(0, new ListItem("全部", ""));
|
|
BindList();
|
InitData();
|
}
|
}
|
|
//修改状态
|
public void ChangeStatus()
|
{
|
try
|
{
|
OA_StaffResume m_OA_StaffResume = bll_OA_StaffResumeBLL.GetModelByMemberid(CurrentUser.MemberId);
|
if (m_OA_StaffResume != null && m_OA_StaffResume.Keyid > 0)
|
{
|
m_OA_StaffResume.R_G_Status = (m_OA_StaffResume.R_G_Status == 1 ? 2 : 1);
|
if (bll_OA_StaffResumeBLL.UpdateModel(m_OA_StaffResume))
|
JavaScript.MessageBox("操作成功", this);
|
else
|
JavaScript.MessageBox("操作失败", this);
|
}
|
else
|
{
|
JavaScript.MessageBox("请先创建简历", this);
|
}
|
}
|
catch (Exception ex)
|
{
|
PAGEHandleException(ex);
|
JavaScript.MessageBox("操作失败", this);
|
}
|
}
|
|
//绑定数据
|
private void BindList()
|
{
|
List<OA_StaffResumeEducation> m_OA_StaffResumeEducationList = bll_OA_StaffResumeBLL.GetOA_StaffResumeEducationListByKeyid(CurrentUser.MemberId) as List<OA_StaffResumeEducation>;
|
if (m_OA_StaffResumeEducationList == null || m_OA_StaffResumeEducationList.Count == 0)
|
{
|
m_OA_StaffResumeEducationList.Add(new OA_StaffResumeEducation());
|
}
|
this.RepClientList.DataSource = m_OA_StaffResumeEducationList;
|
this.RepClientList.DataBind();
|
|
List<OA_StaffResumeWork> m_OA_StaffResumeWorkList = bll_OA_StaffResumeBLL.GetOA_StaffResumeWorkListByKeyid(CurrentUser.MemberId) as List<OA_StaffResumeWork>;
|
if (m_OA_StaffResumeWorkList == null || m_OA_StaffResumeWorkList.Count == 0)
|
{
|
m_OA_StaffResumeWorkList.Add(new OA_StaffResumeWork());
|
}
|
this.RepClientList2.DataSource = m_OA_StaffResumeWorkList;
|
this.RepClientList2.DataBind();
|
}
|
|
//数据加载
|
public void InitData()
|
{
|
#region OA_StaffResume
|
OA_StaffResume m_OA_StaffResume = bll_OA_StaffResumeBLL.GetModelByMemberid(CurrentUser.MemberId);
|
if (m_OA_StaffResume != null)
|
{
|
Keyid = m_OA_StaffResume.Keyid.ToString2();
|
this.txtR_G_Name.Value = m_OA_StaffResume.R_G_Name.ToString2();
|
this.txtR_G_Sex.Value = m_OA_StaffResume.R_G_Sex.ToString2();
|
this.txtR_G_WorkYear.Value = m_OA_StaffResume.R_G_WorkYear.ToString2();
|
this.txtR_G_Degree.Value = m_OA_StaffResume.R_G_Degree.ToString2();
|
this.txtR_G_DocumentsType.Value = m_OA_StaffResume.R_G_DocumentsType.ToString2();
|
this.txtR_G_DocumentsNumber.Value = m_OA_StaffResume.R_G_DocumentsNumber.ToString2();
|
this.txtR_G_Email.Value = m_OA_StaffResume.R_G_Email.ToString2();
|
this.txtR_G_Moblie.Value = m_OA_StaffResume.R_G_Moblie.ToString2();
|
|
this.spanResumeStatus.InnerText = (m_OA_StaffResume.R_G_Status == 1 ? "展示中" : "已撤下");
|
this.btnResumeStatus.Value = (m_OA_StaffResume.R_G_Status == 1 ? "停止简历展示" : "展示简历");
|
|
if (!string.IsNullOrEmpty(m_OA_StaffResume.R_G_Avatar) && System.IO.File.Exists(HttpContext.Current.Server.MapPath("~" + m_OA_StaffResume.R_G_Avatar)))
|
this.ImgR_G_Avatar.Src = m_OA_StaffResume.R_G_Avatar;
|
else
|
this.ImgR_G_Avatar.Src = "../../images/admin/_LoadDefault.gif";
|
|
OLDProvince = m_OA_StaffResume.R_G_OldProvence.ToString2();
|
OLDCity = m_OA_StaffResume.R_G_OldCity.ToString2();
|
OLDCounty = m_OA_StaffResume.R_G_OldArea.ToString2();
|
this.txtR_G_OldAdress.Value = m_OA_StaffResume.R_G_OldAdress.ToString2();
|
NowProvince = m_OA_StaffResume.R_G_NowProvince.ToString2();
|
NowCity = m_OA_StaffResume.R_G_NowCity.ToString2();
|
NowCounty = m_OA_StaffResume.R_G_NowArea.ToString2();
|
this.txtR_G_NowAddress.Value = m_OA_StaffResume.R_G_NowAddress.ToString2();
|
|
this.txtR_G_YearsMoney.Value = m_OA_StaffResume.R_G_YearsMoney.ToString2();
|
this.txtR_G_WorkStatus.Value = m_OA_StaffResume.R_G_WorkStatus.ToString2();
|
this.txtR_G_QQ.Value = m_OA_StaffResume.R_G_QQ.ToString2();
|
this.txtR_G_YouHome.Value = m_OA_StaffResume.R_G_YouHome.ToString2();
|
this.txtR_G_YouHeight.Value = m_OA_StaffResume.R_G_YouHeight.ToString2();
|
this.txtR_G_YouWeight.Value = m_OA_StaffResume.R_G_YouWeight.ToString2();
|
this.txtR_G_MarryStatus.Value = m_OA_StaffResume.R_G_MarryStatus.ToString2();
|
this.txtR_G_YouPolitical.Value = m_OA_StaffResume.R_G_YouPolitical.ToString2();
|
}
|
else
|
{
|
this.spanResumeStatus.InnerText = "尚未创建简历";
|
this.btnResumeStatus.Visible = false;
|
this.ImgR_G_Avatar.Src = "../../images/admin/_LoadDefault.gif";
|
}
|
#endregion
|
|
#region OA_StaffResumeIntention
|
OA_StaffResumeIntention m_OA_StaffResumeIntention = bll_OA_StaffResumeBLL.GetOA_StaffResumeIntentionByKeyid(CurrentUser.MemberId);
|
if (m_OA_StaffResumeIntention != null)
|
{
|
Province = m_OA_StaffResumeIntention.R_I_WorkProvence.ToString2();
|
City = m_OA_StaffResumeIntention.R_I_WorkCity.ToString2();
|
this.txtR_I_Industry.Value = m_OA_StaffResumeIntention.R_I_Industry.ToString2();
|
this.txtR_I_Consultants_id.SelectedValue = m_OA_StaffResumeIntention.R_I_Consultants_id.ToString2();
|
this.txtR_I_HopeMoney.Value = m_OA_StaffResumeIntention.R_I_HopeMoney.ToString2();
|
this.txtR_I_WorkTime.Value = m_OA_StaffResumeIntention.R_I_WorkTime.ToString2();
|
this.txtR_I_YouDetail.Value = m_OA_StaffResumeIntention.R_I_YouDetail.ToString2();
|
}
|
#endregion
|
}
|
|
//表单提交
|
protected void btn_submit_form(object sender, EventArgs e)
|
{
|
try
|
{
|
DateTime nowTime = DateTime.Now;
|
|
#region OA_StaffResume
|
|
OA_StaffResume m_OA_StaffResume = bll_OA_StaffResumeBLL.GetModelByMemberid(CurrentUser.MemberId);
|
if (m_OA_StaffResume == null)
|
{
|
m_OA_StaffResume = new OA_StaffResume();
|
m_OA_StaffResume.Memberid = CurrentUser.MemberId;
|
m_OA_StaffResume.R_G_CreatTime = DateTime.Now;
|
m_OA_StaffResume.R_G_Language = 1;
|
m_OA_StaffResume.R_G_Status = 1;
|
m_OA_StaffResume.OrderNum = 0;
|
m_OA_StaffResume.R_G_WorkPhone = "";
|
m_OA_StaffResume.R_G_HomePhone = "";
|
m_OA_StaffResume.R_G_Avatar = "";
|
}
|
|
m_OA_StaffResume.R_G_Name = this.txtR_G_Name.Value.ToString2();
|
m_OA_StaffResume.R_G_Sex = this.txtR_G_Sex.Value.ToString2();
|
m_OA_StaffResume.R_G_WorkYear = this.txtR_G_WorkYear.Value.ToString2();
|
m_OA_StaffResume.R_G_Degree = this.txtR_G_Degree.Value.ToString2();
|
m_OA_StaffResume.R_G_DocumentsType = this.txtR_G_DocumentsType.Value.ToString2();
|
m_OA_StaffResume.R_G_DocumentsNumber = this.txtR_G_DocumentsNumber.Value.ToString2();
|
m_OA_StaffResume.R_G_Email = this.txtR_G_Email.Value.ToString2();
|
m_OA_StaffResume.R_G_Moblie = this.txtR_G_Moblie.Value.ToString2();
|
|
m_OA_StaffResume.R_G_OldProvence = Request["selectProvince#OldAddress"].ToString2();
|
m_OA_StaffResume.R_G_OldCity = Request["selectCity#OldAddress"].ToString2();
|
m_OA_StaffResume.R_G_OldArea = Request["selectCounty#OldAddress"].ToString2();
|
m_OA_StaffResume.R_G_OldAdress = this.txtR_G_OldAdress.Value.ToString2();
|
m_OA_StaffResume.R_G_NowProvince = Request["selectProvince#NowAddress"].ToString2();
|
m_OA_StaffResume.R_G_NowCity = Request["selectCity#NowAddress"].ToString2();
|
m_OA_StaffResume.R_G_NowArea = Request["selectCounty#NowAddress"].ToString2();
|
m_OA_StaffResume.R_G_NowAddress = this.txtR_G_NowAddress.Value.ToString2();
|
|
m_OA_StaffResume.R_G_YearsMoney = this.txtR_G_YearsMoney.Value.ToString2();
|
m_OA_StaffResume.R_G_WorkStatus = this.txtR_G_WorkStatus.Value.ToString2();
|
m_OA_StaffResume.R_G_QQ = this.txtR_G_QQ.Value.ToString2();
|
m_OA_StaffResume.R_G_YouHome = this.txtR_G_YouHome.Value.ToString2();
|
m_OA_StaffResume.R_G_YouHeight = this.txtR_G_YouHeight.Value.ToInt32();
|
m_OA_StaffResume.R_G_YouWeight = this.txtR_G_YouWeight.Value.ToInt32();
|
m_OA_StaffResume.R_G_MarryStatus = this.txtR_G_MarryStatus.Value.ToInt32();
|
m_OA_StaffResume.R_G_YouPolitical = this.txtR_G_YouPolitical.Value.ToString2();
|
|
m_OA_StaffResume.LastUpdateTime = nowTime;
|
m_OA_StaffResume.Operator = CurrentUser.ShortName;
|
|
#endregion
|
|
#region OA_StaffResumeIntention
|
|
OA_StaffResumeIntention m_OA_StaffResumeIntention = bll_OA_StaffResumeBLL.GetOA_StaffResumeIntentionByKeyid(CurrentUser.MemberId);
|
if (m_OA_StaffResumeIntention == null)
|
{
|
m_OA_StaffResumeIntention = new OA_StaffResumeIntention();
|
m_OA_StaffResumeIntention.Memberid = CurrentUser.MemberId;
|
m_OA_StaffResumeIntention.OrderNum = 0;
|
}
|
|
m_OA_StaffResumeIntention.R_I_WorkProvence = Request["selectProvince"].ToString2();
|
m_OA_StaffResumeIntention.R_I_WorkCity = Request["selectCity"].ToString2();
|
m_OA_StaffResumeIntention.R_I_Industry = this.txtR_I_Industry.Value.ToString2();
|
m_OA_StaffResumeIntention.R_I_Consultants_id = this.txtR_I_Consultants_id.SelectedValue.ToInt32() ?? 0;
|
m_OA_StaffResumeIntention.R_I_Postid = 0;
|
m_OA_StaffResumeIntention.R_I_PostName = Request["Post_id"].ToString2();
|
m_OA_StaffResumeIntention.R_I_HopeMoney = this.txtR_I_HopeMoney.Value.ToString2();
|
m_OA_StaffResumeIntention.R_I_WorkTime = this.txtR_I_WorkTime.Value.ToString2();
|
m_OA_StaffResumeIntention.R_I_YouDetail = this.txtR_I_YouDetail.Value.ToString2();
|
m_OA_StaffResumeIntention.LastUpdateTime = nowTime;
|
m_OA_StaffResumeIntention.Operator = CurrentUser.ShortName;
|
|
#endregion
|
|
#region OA_StaffResumeEducation
|
|
List<OA_StaffResumeEducation> m_OA_StaffResumeEducationList = new List<OA_StaffResumeEducation>();
|
string[] R_E_StudyStartTime = Request["txtR_E_StudyStartTime"].ToString2().Split(',');
|
string[] R_E_StudyEndTime = Request["txtR_E_StudyEndTime"].ToString2().Split(',');
|
string[] R_E_SchoolName = Request["txtR_E_SchoolName"].ToString2().Split(',');
|
string[] R_E_Professional = Request["txtR_E_Professional"].ToString2().Split(',');
|
string[] R_E_ProfessionalDetail = Request["txtR_E_ProfessionalDetail"].ToString2().Split(',');
|
|
if (R_E_StudyStartTime != null && R_E_StudyStartTime.Length > 0)
|
{
|
int i = 0;
|
foreach (var item in R_E_StudyStartTime)
|
{
|
if (!string.IsNullOrEmpty(item))
|
{
|
OA_StaffResumeEducation m_OA_StaffResumeEducation = new OA_StaffResumeEducation();
|
m_OA_StaffResumeEducation.Memberid = CurrentUser.MemberId;
|
m_OA_StaffResumeEducation.R_E_StudyStartTime = R_E_StudyStartTime[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeEducation.R_E_StudyEndTime = R_E_StudyEndTime[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeEducation.R_E_SchoolName = R_E_SchoolName[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeEducation.R_E_Professional = R_E_Professional[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeEducation.R_E_ProfessionalDetail = R_E_ProfessionalDetail[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeEducation.OrderNum = 0;
|
m_OA_StaffResumeEducation.LastUpdateTime = nowTime;
|
m_OA_StaffResumeEducation.Operator = CurrentUser.ShortName;
|
|
m_OA_StaffResumeEducationList.Add(m_OA_StaffResumeEducation);
|
}
|
i++;
|
}
|
}
|
|
#endregion
|
|
#region OA_StaffResumeWork
|
|
List<OA_StaffResumeWork> m_OA_StaffResumeWorkList = new List<OA_StaffResumeWork>();
|
string[] R_W_StudyStartTime = Request["txtR_W_StudyStartTime"].ToString2().Split(',');
|
string[] R_W_StudyEndTime = Request["txtR_W_StudyEndTime"].ToString2().Split(',');
|
string[] R_W_CompanyName = Request["txtR_W_CompanyName"].ToString2().Split(',');
|
string[] R_W_CompanyNature = Request["txtR_W_CompanyNature"].ToString2().Split(',');
|
string[] R_W_Industry = Request["txtR_W_Industry"].ToString2().Split(',');
|
string[] R_W_CompanyScale = Request["txtR_W_CompanyScale"].ToString2().Split(',');
|
string[] R_W_Department = Request["txtR_W_Department"].ToString2().Split(',');
|
string[] R_W_Post = Request["txtR_W_Post"].ToString2().Split(',');
|
string[] R_W_WorkDetail = Request["txtR_W_WorkDetail"].ToString2().Split(',');
|
|
if (R_W_StudyStartTime != null && R_W_StudyStartTime.Length > 0)
|
{
|
int i = 0;
|
foreach (var item in R_W_StudyStartTime)
|
{
|
if (!string.IsNullOrEmpty(item))
|
{
|
OA_StaffResumeWork m_OA_StaffResumeWork = new OA_StaffResumeWork();
|
m_OA_StaffResumeWork.Memberid = CurrentUser.MemberId;
|
m_OA_StaffResumeWork.R_W_Post = R_W_Post[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeWork.R_W_WorkDetail = R_W_WorkDetail[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeWork.R_W_StudyStartTime = R_W_StudyStartTime[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeWork.R_W_StudyEndTime = R_W_StudyEndTime[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeWork.R_W_CompanyName = R_W_CompanyName[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeWork.R_W_Industry = R_W_Industry[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeWork.R_W_CompanyScale = R_W_CompanyScale[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeWork.R_W_CompanyNature = R_W_CompanyNature[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeWork.R_W_Department = R_W_Department[i].ToString2().Replace("#@1@#", ",");
|
m_OA_StaffResumeWork.OrderNum = 0;
|
m_OA_StaffResumeWork.LastUpdateTime = nowTime;
|
m_OA_StaffResumeWork.Operator = CurrentUser.ShortName;
|
|
m_OA_StaffResumeWorkList.Add(m_OA_StaffResumeWork);
|
}
|
i++;
|
}
|
}
|
#endregion
|
|
if (bll_OA_StaffResumeBLL.SaveResume(m_OA_StaffResume, m_OA_StaffResumeIntention, m_OA_StaffResumeEducationList, m_OA_StaffResumeWorkList))
|
JavaScript.MessageBox("保存成功", this,true,true);
|
else
|
JavaScript.MessageBox("保存失败", this);
|
}
|
catch (Exception ex)
|
{
|
PAGEHandleException(ex);
|
JavaScript.MessageBox("操作失败", this);
|
}
|
}
|
}
|
}
|