20210708
This commit is contained in:
@@ -91,6 +91,8 @@
|
||||
</f:Button>
|
||||
<f:Button ID="btnQR" ToolTip="批量生成二维码" Icon="TableRefresh" runat="server" OnClick="btnQR_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPhoto" ToolTip="刷新照片转二进制" Icon="ArrowRefresh" runat="server" OnClick="btnPhoto_Click" >
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
||||
@@ -722,5 +722,23 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
ShowNotify("操作完成,新生成二维码"+ num.ToString()+"条", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPhoto_Click(object sender, EventArgs e)
|
||||
{
|
||||
var getPersons = from x in Funs.DB.SitePerson_Person
|
||||
where x.ProjectId == this.ProjectId && x.HeadImage == null && x.PhotoUrl != null
|
||||
select x;
|
||||
foreach (var item in getPersons)
|
||||
{
|
||||
item.HeadImage = AttachFileService.SetImageToByteArray(Funs.RootPath + item.PhotoUrl);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,6 +237,15 @@ namespace FineUIPro.Web.HSSE.SitePerson {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQR;
|
||||
|
||||
/// <summary>
|
||||
/// btnPhoto 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPhoto;
|
||||
|
||||
/// <summary>
|
||||
/// lbI 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -92,21 +92,21 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
if (person != null)
|
||||
{
|
||||
this.ProjectId = person.ProjectId;
|
||||
if (this.ProjectId != this.CurrUser.LoginProjectId)
|
||||
if (this.ProjectId != this.CurrUser.LoginProjectId || this.UnitId != person.UnitId)
|
||||
{
|
||||
this.InitDropDownList();
|
||||
this.UnitId = person.UnitId;
|
||||
this.InitProjectDropDownList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(person.Sex))
|
||||
{
|
||||
this.rblSex.SelectedValue = person.Sex;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(person.UnitId))
|
||||
{
|
||||
{
|
||||
var unit = BLL.UnitService.GetUnitByUnitId(person.UnitId);
|
||||
if (unit != null)
|
||||
{
|
||||
this.txtUnitName.Text = unit.UnitName;
|
||||
this.UnitId = person.UnitId;
|
||||
this.txtUnitName.Text = unit.UnitName;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(person.WorkAreaId))
|
||||
@@ -257,15 +257,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
/// 初始化下拉框
|
||||
/// </summary>
|
||||
private void InitDropDownList()
|
||||
{
|
||||
gvWorkArea.DataSource = BLL.UnitWorkService.GetUnitWorkLists(this.CurrUser.LoginProjectId);
|
||||
gvWorkArea.DataBind();//单位工程
|
||||
{
|
||||
WorkPostService.InitWorkPostDropDownList(this.drpPost, true);
|
||||
PositionService.InitPositionDropDownList(this.drpPosition, true);
|
||||
PostTitleService.InitPostTitleDropDownList(this.drpTitle, true);
|
||||
TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroup, this.ProjectId, this.UnitId, true);
|
||||
CertificateService.InitCertificateDropDownList(this.drpCertificate, true);
|
||||
UserService.InitFlowOperateControlUserDropDownList(this.drpAuditor, this.ProjectId, Const.UnitId_CWCEC, true);
|
||||
PostTitleService.InitPostTitleDropDownList(this.drpTitle, true);
|
||||
CertificateService.InitCertificateDropDownList(this.drpCertificate, true);
|
||||
CNProfessionalService.InitCNProfessionalDownList(this.drpMainCNProfessional, true);
|
||||
CNProfessionalService.InitCNProfessionalDownList(this.drpViceCNProfessional, true);
|
||||
BasicDataService.InitBasicDataProjectUnitDropDownList(this.drpEduLevel, "EDU_LEVEL", true);
|
||||
@@ -277,6 +273,17 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
Funs.FineUIPleaseSelect(this.drpProvinceCode);
|
||||
}
|
||||
|
||||
private void InitProjectDropDownList()
|
||||
{
|
||||
gvWorkArea.DataSource = BLL.UnitWorkService.GetUnitWorkLists(this.ProjectId);
|
||||
gvWorkArea.DataBind();//单位工程
|
||||
|
||||
this.drpTeamGroup.Items.Clear();
|
||||
TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTeamGroup, this.ProjectId, this.UnitId, true);
|
||||
|
||||
UserService.InitFlowOperateControlUserDropDownList(this.drpAuditor, this.ProjectId, Const.UnitId_CWCEC, true);
|
||||
}
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
|
||||
Reference in New Issue
Block a user