海康云眸
This commit is contained in:
@@ -12,6 +12,7 @@ using Aspose.Words;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using Model;
|
||||
using BLL.Common;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
@@ -850,7 +851,39 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
return age;
|
||||
}
|
||||
protected void btnToYunMou_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var person = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == rowID);
|
||||
if (!string.IsNullOrEmpty(person.PhotoUrl))
|
||||
{
|
||||
var token = YunMouHelper.getToken();
|
||||
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
|
||||
var res1 = YunMouHelper.addPerson(person.IdentityCard, person.PersonName, string.IsNullOrEmpty(person.Telephone) ? "" : person.Telephone, person.PhotoUrl, token);
|
||||
var res3 = YunMouHelper.updatePerson(person.IdentityCard, person.PersonName, string.IsNullOrEmpty(person.Telephone) ? "" : person.Telephone, person.PhotoUrl, token);
|
||||
var res2 = YunMouHelper.addPersonsToGroups(project.YunMouGroupId, new string[] { person.IdentityCard }, token);
|
||||
person.YunMouState = "已经同步";
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择用户", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
protected void btnUpToYunMou_Click(object sender, EventArgs e)
|
||||
{
|
||||
var person = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == Grid1.SelectedRowID);
|
||||
var token = YunMouHelper.getToken();
|
||||
var res3 = YunMouHelper.updatePerson(person.IdentityCard, person.PersonName, string.IsNullOrEmpty(person.Telephone) ? "" : person.Telephone, person.PhotoUrl, token);
|
||||
}
|
||||
protected void butExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
|
||||
Reference in New Issue
Block a user