diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx
index 0756c091..f2e19b55 100644
--- a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx
@@ -47,6 +47,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs
index fc3c91f8..920ad92d 100644
--- a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.cs
@@ -249,6 +249,7 @@ namespace FineUIPro.Web.ZHGL.RealName
}
}
+ #region 按身份证推送或删除考勤
///
/// 按身份证推送
///
@@ -264,32 +265,7 @@ namespace FineUIPro.Web.ZHGL.RealName
var getRProjects = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
if (getRProjects != null && !string.IsNullOrEmpty(getRProjects.ProCode))
{
- idText = idText.Replace(",",",").Replace("(条)","").Replace(";",";").Replace("(","(").Replace(")",")");
- List getList = new List();
- if (idText.Contains("("))
- {
- var getData = Funs.GetStrListByStr(idText, ';');
- foreach (var itemD in getData)
- {
- if (!string.IsNullOrEmpty(itemD))
- {
- var a = itemD.Split('(');
- if (a.Count() > 1)
- {
- var b = a[1].Split(')');
- if (b.Count() > 1)
- {
- getList.Add(b[0]);
- }
- }
- }
- }
- }
- else
- {
- getList = Funs.GetStrListByStr(idText, ',');
- }
-
+ var getList = returnCardList();
if (getList != null && getList.Count > 0)
{
foreach (var item in getList)
@@ -307,6 +283,58 @@ namespace FineUIPro.Web.ZHGL.RealName
}
}
+ protected void btnDelete_Click(object sender, EventArgs e)
+ {
+ var getList = returnCardList();
+ if (getList != null && getList.Count > 0)
+ {
+ foreach (var item in getList)
+ {
+ var realPersonInOutNow = Funs.DB.RealName_PersonInOutNow.Where(x => x.IdcardNumber == item);
+ if (realPersonInOutNow.Count() > 0)
+ {
+ Funs.DB.RealName_PersonInOutNow.DeleteAllOnSubmit(realPersonInOutNow);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ }
+ }
+
+ private List returnCardList()
+ {
+ List getList = new List();
+ string idText = this.txtIdentityCard.Text.Trim();
+ if (!string.IsNullOrEmpty(idText))
+ {
+ idText = idText.Replace(",", ",").Replace("(条)", "").Replace(";", ";").Replace("(", "(").Replace(")", ")");
+ if (idText.Contains("("))
+ {
+ var getData = Funs.GetStrListByStr(idText, ';');
+ foreach (var itemD in getData)
+ {
+ if (!string.IsNullOrEmpty(itemD))
+ {
+ var a = itemD.Split('(');
+ if (a.Count() > 1)
+ {
+ var b = a[1].Split(')');
+ if (b.Count() > 1)
+ {
+ getList.Add(b[0]);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ getList = Funs.GetStrListByStr(idText, ',');
+ }
+ }
+ return getList;
+ }
+ #endregion
+
#region 考勤记录 去重
///
/// 考勤记录 去重
diff --git a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.designer.cs
index 7ae8e489..afd8e7b5 100644
--- a/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/ZHGL/RealName/SynchroSet.aspx.designer.cs
@@ -102,6 +102,15 @@ namespace FineUIPro.Web.ZHGL.RealName {
///
protected global::FineUIPro.Button btnPushData;
+ ///
+ /// btnDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDelete;
+
///
/// Toolbar1 控件。
///