20230630人员自定义卡号验证
This commit is contained in:
@@ -33,10 +33,12 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.GetButtonPower();
|
||||
|
||||
BLL.ProjectService.InitAllProjectDropDownList(this.drpSubjectProject, true);
|
||||
this.GetButtonPower();
|
||||
BLL.UnitService.InitSeDinAndCNCECUnitDropDownList(this.drpUnit, false);
|
||||
BLL.DepartService.InitDepartDropDownList(this.drpDepart, true);
|
||||
this.drpDepart.SelectedValue = Const.Depart_constructionId;
|
||||
BLL.Person_PersonsService.InitUserUnitIdDepartIdDropDownList(this.drpCheckTeamLeader, this.drpUnit.SelectedValue, string.Empty, true);
|
||||
BLL.ProjectService.InitProjectDropDownList(this.drpSubjectProject, true);
|
||||
|
||||
this.CheckNoticeId = Request.Params["CheckNoticeId"];
|
||||
if (!string.IsNullOrEmpty(this.CheckNoticeId))
|
||||
@@ -50,11 +52,13 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
{
|
||||
this.drpSubjectProject.SelectedValue = checkNotice.SubjectProjectId;
|
||||
}
|
||||
this.txtSubjectUnitMan.Text = checkNotice.SubjectUnitMan;
|
||||
SitePerson_PersonService.InitSitePersonDropDownList(this.drpSubjectUnitMan, this.drpSubjectProject.SelectedValue, Const.sedinId, null, null, true);
|
||||
|
||||
// this.txtSubjectUnitMan.Text = checkNotice.SubjectUnitMan;
|
||||
this.txtSubjectUnitAdd.Text = checkNotice.SubjectUnitAdd;
|
||||
this.txtSubjectUnitTel.Text = checkNotice.SubjectUnitTel;
|
||||
//this.txtSubjectObject.Text = checkNotice.SubjectObject;
|
||||
this.txtCheckTeamLeaderName.Text = checkNotice.CheckTeamLeaderName;
|
||||
// this.txtCheckTeamLeaderName.Text = checkNotice.CheckTeamLeaderName;
|
||||
if (!string.IsNullOrEmpty(checkNotice.UnitId))
|
||||
{
|
||||
this.drpUnit.SelectedValue = checkNotice.UnitId;
|
||||
@@ -81,24 +85,24 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.txtCheckTeamLeaderName.Text))
|
||||
if (this.drpCheckTeamLeader.SelectedValue != Const._Null)
|
||||
{
|
||||
ShowNotify("请先填写检查组长!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.ProjectSupervision_CheckNotice newCheckNotice = new Model.ProjectSupervision_CheckNotice();
|
||||
if (this.drpSubjectProject.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpSubjectProject.SelectedValue))
|
||||
{
|
||||
newCheckNotice.SubjectProjectId = this.drpSubjectProject.SelectedValue;
|
||||
}
|
||||
Model.ProjectSupervision_CheckNotice newCheckNotice = new Model.ProjectSupervision_CheckNotice();
|
||||
newCheckNotice.SubjectUnitAdd = this.txtSubjectUnitAdd.Text.Trim();
|
||||
newCheckNotice.SubjectUnitMan = this.txtSubjectUnitMan.Text.Trim();
|
||||
// newCheckNotice.SubjectUnitMan = this.txtSubjectUnitMan.Text.Trim();
|
||||
newCheckNotice.SubjectUnitTel = this.txtSubjectUnitTel.Text.Trim();
|
||||
newCheckNotice.CheckStartTime = Funs.GetNewDateTime(this.txtCheckStartTime.Text).Value;
|
||||
newCheckNotice.CheckEndTime = Funs.GetNewDateTime(this.txtCheckEndTime.Text).Value;
|
||||
newCheckNotice.CompileMan = this.CurrUser.PersonId;
|
||||
newCheckNotice.CompileDate = DateTime.Now;
|
||||
newCheckNotice.CheckTeamLeaderName = this.txtCheckTeamLeaderName.Text.Trim();
|
||||
newCheckNotice.CheckTeamLeaderName = this.drpCheckTeamLeader.SelectedText;
|
||||
if (this.drpSubjectProject.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpSubjectProject.SelectedValue))
|
||||
{
|
||||
newCheckNotice.SubjectProjectId = this.drpSubjectProject.SelectedValue;
|
||||
}
|
||||
if (this.drpSex.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpSex.SelectedValue))
|
||||
{
|
||||
newCheckNotice.SexName = this.drpSex.SelectedValue;
|
||||
@@ -114,7 +118,7 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
|
||||
if (string.IsNullOrEmpty(this.CheckNoticeId))
|
||||
{
|
||||
newCheckNotice.CheckNoticeId = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_CheckNotice));
|
||||
newCheckNotice.CheckNoticeId = SQLHelper.GetNewID();
|
||||
BLL.CheckNoticeService.AddCheckNotice(newCheckNotice);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, newCheckNotice.CheckTeamLeaderName, newCheckNotice.CheckNoticeId, BLL.Const.CheckNoticeMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
@@ -141,8 +145,9 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
var units = BLL.ProjectService.GetProjectByProjectId(this.drpSubjectProject.SelectedValue);
|
||||
if (units != null)
|
||||
{
|
||||
this.txtSubjectUnitAdd.Text = units.ProjectAddress;
|
||||
this.txtSubjectUnitAdd.Text = units.ProjectAddress;
|
||||
}
|
||||
SitePerson_PersonService.InitSitePersonDropDownList(this.drpSubjectUnitMan, this.drpSubjectProject.SelectedValue, Const.UnitId_SEDIN, null, null, true);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -165,27 +170,43 @@ namespace FineUIPro.Web.OfficeCheck.Check
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Text改变事件
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查组长事件
|
||||
/// 组长
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtCheckTeamLeaderName_TextChanged(object sender, EventArgs e)
|
||||
protected void drpCheckTeamLeader_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpUnit.Enabled = true;
|
||||
var sysUser = BLL.Person_PersonsService.GetPersonsByName(this.txtCheckTeamLeaderName.Text.Trim());
|
||||
if (sysUser != null)
|
||||
if (this.drpCheckTeamLeader.SelectedValue != Const._Null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(sysUser.UnitId))
|
||||
var getperson = Person_PersonsService.GetPerson_PersonsById(this.drpCheckTeamLeader.SelectedValue);
|
||||
if (getperson != null)
|
||||
{
|
||||
this.drpUnit.SelectedValue = sysUser.UnitId;
|
||||
this.drpUnit.Enabled = false;
|
||||
this.drpSex.SelectedValue = (getperson.Sex == "2" ? "女" : "男");
|
||||
}
|
||||
this.hdUserId.Text = sysUser.PersonId;
|
||||
this.drpSex.SelectedValue = sysUser.Sex;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpSubjectUnitMan_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpSubjectUnitMan.SelectedValue != Const._Null)
|
||||
{
|
||||
var getperson = Person_PersonsService.GetPerson_PersonsById(this.drpSubjectUnitMan.SelectedValue);
|
||||
if (getperson != null)
|
||||
{
|
||||
this.txtSubjectUnitTel.Text = getperson.Telephone;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user