This commit is contained in:
2021-07-06 15:16:17 +08:00
parent 957d206c2b
commit 7f785d6423
13 changed files with 240 additions and 102 deletions
+25
View File
@@ -696,3 +696,28 @@ IP地址:::1
出错时间:06/18/2021 16:57:48
错误信息开始=====>
错误类型:HttpParseException
错误信息:基类包括字段“txtIdentityCard”,但其类型(FineUIPro.TextBox)与控件(FineUIPro.TextArea)的类型不兼容。
错误堆栈:
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildFieldDeclaration(ControlBuilder builder)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers()
在 System.Web.Compilation.PageCodeDomTreeGenerator.BuildMiscClassMembers()
在 System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree()
在 System.Web.Compilation.BaseCodeDomTreeGenerator.GetCodeDomTree(CodeDomProvider codeDomProvider, StringResourceBuilder stringResourceBuilder, VirtualPath virtualPath)
在 System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder assemblyBuilder)
在 System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
出错时间:07/06/2021 14:24:26
出错文件:http://localhost:8118/ZHGL/RealName/SynchroSet.aspx
IP地址:::1
出错时间:07/06/2021 14:24:26
@@ -96,6 +96,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
rootNode.ToolTip = "当前项目人员总数:0";
}
rootNode.Expanded = true;
rootNode.EnableClickEvent = true;
this.tvProjectAndUnit.Nodes.Add(rootNode);
GetUnitLists(rootNode.Nodes, this.ProjectId, personLists);
}
@@ -168,102 +169,99 @@ namespace FineUIPro.Web.HSSE.SitePerson
private void BindGrid()
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
{
string unitId = string.Empty;
if (this.tvProjectAndUnit != null && !string.IsNullOrEmpty(this.tvProjectAndUnit.SelectedNodeID))
{
string id = this.tvProjectAndUnit.SelectedNodeID;
string unitId = string.Empty;
string projectId = string.Empty;
var str = id.Split('|');
var str = this.tvProjectAndUnit.SelectedNodeID.Split('|');
if (str.Count() > 1)
{
unitId = str[0];
projectId = str[1];
}
}
string strSql = "select * from View_SitePerson_Person Where ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>
string strSql = "select * from View_SitePerson_Person Where ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@ProjectId", this.ProjectId)
};
if (!string.IsNullOrEmpty(unitId) && unitId != "0")
{
strSql += " AND UnitId =@UnitId ";
listStr.Add(new SqlParameter("@UnitId", unitId));
}
else
{
strSql += " AND UnitId IS NULL";
}
if (!string.IsNullOrEmpty(unitId) && unitId != "0")
{
strSql += " AND UnitId =@UnitId ";
listStr.Add(new SqlParameter("@UnitId", unitId));
}
//else
//{
// strSql += " AND UnitId IS NULL";
//}
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
{
strSql += " AND PersonName LIKE @PersonName";
listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim()))
{
strSql += " AND PersonName LIKE @PersonName";
listStr.Add(new SqlParameter("@PersonName", "%" + this.txtPersonName.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtCardNo.Text.Trim()))
{
strSql += " AND CardNo LIKE @CardNo";
listStr.Add(new SqlParameter("@CardNo", "%" + this.txtCardNo.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtIdentityCard.Text.Trim()))
{
strSql += " AND IdentityCard LIKE @IdentityCard";
listStr.Add(new SqlParameter("@IdentityCard", "%" + this.txtIdentityCard.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.drpTreamGroup.SelectedValue) && this.drpTreamGroup.SelectedValue != BLL.Const._Null)
{
strSql += " AND TeamGroupId = @TeamGroupId";
listStr.Add(new SqlParameter("@TeamGroupId", this.drpTreamGroup.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtCardNo.Text.Trim()))
{
strSql += " AND CardNo LIKE @CardNo";
listStr.Add(new SqlParameter("@CardNo", "%" + this.txtCardNo.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtIdentityCard.Text.Trim()))
{
strSql += " AND IdentityCard LIKE @IdentityCard";
listStr.Add(new SqlParameter("@IdentityCard", "%" + this.txtIdentityCard.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.drpTreamGroup.SelectedValue) && this.drpTreamGroup.SelectedValue != BLL.Const._Null)
{
strSql += " AND TeamGroupId = @TeamGroupId";
listStr.Add(new SqlParameter("@TeamGroupId", this.drpTreamGroup.SelectedValue));
}
if (this.drpPost.SelectedItemArray.Count() > 1 || (this.drpPost.SelectedValue != BLL.Const._Null && this.drpPost.SelectedItemArray.Count() == 1))
if (this.drpPost.SelectedItemArray.Count() > 1 || (this.drpPost.SelectedValue != BLL.Const._Null && this.drpPost.SelectedItemArray.Count() == 1))
{
strSql += " AND (1=2 ";
int i = 0;
foreach (var item in this.drpPost.SelectedValueArray)
{
strSql += " AND (1=2 ";
int i = 0;
foreach (var item in this.drpPost.SelectedValueArray)
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
{
if (!string.IsNullOrEmpty(item) && item != BLL.Const._Null)
{
strSql += " OR WorkPostId = @WorkPostId" + i.ToString();
listStr.Add(new SqlParameter("@WorkPostId" + i.ToString(), item));
}
i++;
strSql += " OR WorkPostId = @WorkPostId" + i.ToString();
listStr.Add(new SqlParameter("@WorkPostId" + i.ToString(), item));
}
strSql += ")";
}
if (this.ckTrain.Checked)
{
strSql += " AND TrainCount =0";
}
if (this.ckIdCardInfoNotOK.Checked)
{
strSql += " AND (IdcardType is null or IdentityCard is null or PhotoUrl is null or (select count(*) from AttachFile where ToKeyId=PersonId+'#1')=0 or (select count(*) from AttachFile where ToKeyId=PersonId+'#5')=0)";
i++;
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
strSql += ")";
}
if (this.ckTrain.Checked)
{
strSql += " AND TrainCount =0";
}
if (this.ckIdCardInfoNotOK.Checked)
{
strSql += " AND (IdcardType is null or IdentityCard is null or PhotoUrl is null or (select count(*) from AttachFile where ToKeyId=PersonId+'#1')=0 or (select count(*) from AttachFile where ToKeyId=PersonId+'#5')=0)";
}
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
for (int i = 0; i < Grid1.Rows.Count; i++)
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
for (int i = 0; i < Grid1.Rows.Count; i++)
{
string personId = Grid1.Rows[i].DataKeys[0].ToString();
var isNull = from x in db.EduTrain_TrainRecordDetail
join y in db.EduTrain_TrainRecord on x.TrainingId equals y.TrainingId
where y.ProjectId == this.ProjectId && x.PersonId == personId
select x;
if (isNull.Count() == 0) ////未参加过培训的人员
{
string personId = Grid1.Rows[i].DataKeys[0].ToString();
var isNull = from x in db.EduTrain_TrainRecordDetail
join y in db.EduTrain_TrainRecord on x.TrainingId equals y.TrainingId
where y.ProjectId == this.ProjectId && x.PersonId == personId
select x;
if (isNull.Count() == 0) ////未参加过培训的人员
{
Grid1.Rows[i].RowCssClass = "Red";
}
Grid1.Rows[i].RowCssClass = "Red";
}
}
}
@@ -291,7 +289,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
projectId = str[1];
}
BLL.TeamGroupService.InitTeamGroupProjectUnitDropDownList(this.drpTreamGroup, projectId, unitId, true);
BindGrid();
}
else
{
BindGrid();
}
}
@@ -387,14 +388,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
this.PersonId = Grid1.SelectedRowID;
string id = this.tvProjectAndUnit.SelectedNodeID;
string[] str = id.Split('|');
if (str.Count() > 1)
{
string unitId = id.Split('|')[0];
string projectId = id.Split('|')[1];
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonListEdit.aspx?PersonId={0}&&ProjectId={1}&&UnitId={2}", this.PersonId, projectId, unitId, "编辑 - ")));
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonListEdit.aspx?PersonId={0}", this.PersonId, "编辑 - ")));
}
/// <summary>
@@ -54,7 +54,7 @@
</f:Toolbar>
</Toolbars>
<Items>
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="540px" ShowBorder="true"
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="520px" ShowBorder="true"
TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server"
ActiveTabIndex="0">
<Tabs>
@@ -74,9 +74,9 @@
<f:TextBox ID="txtIdentityCard" runat="server" Label="证件号码" MaxLength="50" LabelAlign="Right" LabelWidth="110px"
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Required="true" ShowRedStar="true">
</f:TextBox>
<f:DatePicker ID="txtIdcardStartDate" runat="server" Label="证件开始日期" LabelAlign="Right" LabelWidth="110px">
<f:DatePicker ID="txtIdcardStartDate" runat="server" Label="证件开始日期" LabelAlign="Right" LabelWidth="110px" Hidden="true">
</f:DatePicker>
<f:DatePicker ID="txtIdcardEndDate" runat="server" Label="证件有效日期" LabelAlign="Right" LabelWidth="110px">
<f:DatePicker ID="txtIdcardEndDate" runat="server" Label="证件有效日期" LabelAlign="Right" LabelWidth="110px" Hidden="true">
</f:DatePicker>
<f:TextBox ID="txtUnitName" runat="server" Label="所属单位" LabelAlign="Right"
Readonly="true" LabelWidth="110px"></f:TextBox>
@@ -119,11 +119,12 @@
<f:RadioItem Value="1" Text="男" Selected="true" />
<f:RadioItem Value="2" Text="女" />
</f:RadioButtonList>
<f:RadioButtonList ID="rblIdcardForever" runat="server" Label="证件是否永久有效" LabelWidth="145px" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="rblIdcardForever_SelectedIndexChanged">
<f:RadioButtonList ID="rblIdcardForever" runat="server" Label="证件是否永久有效" LabelWidth="145px" Hidden="true"
LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="rblIdcardForever_SelectedIndexChanged">
<f:RadioItem Value="Y" Text="是" />
<f:RadioItem Value="N" Text="否" Selected="true"/>
</f:RadioButtonList>
<f:TextBox ID="txtIdcardAddress" runat="server" Label="发证机关" MaxLength="50" LabelAlign="Right" >
<f:TextBox ID="txtIdcardAddress" runat="server" Label="发证机关" MaxLength="50" LabelAlign="Right" Hidden="true">
</f:TextBox>
<f:DropDownList ID="drpPost" runat="server" Label="所属岗位" LabelAlign="Right" Required="True" ShowRedStar="True" EnableEdit="true">
</f:DropDownList>
@@ -26,8 +26,12 @@ namespace FineUIPro.Web.ZHGL.RealName
SynchroSetService.InitProjectDropDownList(this.drpProject, false);
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
this.drpProject.SelectedValue = this.CurrUser.LoginProjectId;
this.drpProject.Readonly = true;
var getproject = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
if (getproject != null)
{
this.drpProject.SelectedValue = getproject.ProjectCode;
this.drpProject.Readonly = true;
}
}
// 绑定表格
this.BindGrid();
@@ -41,12 +41,11 @@
</f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow >
<f:FormRow ColumnWidths="90% 10%">
<Items>
<f:TextBox ID="txtIdentityCard" runat="server" Label="身份证号码" MaxLength="50"
LabelWidth="120px" >
</f:TextBox>
<f:Button ID="btnPushData" Icon="Accept" runat="server" ToolTip="连接" OnClick="btnPushData_Click">
<f:TextArea ID="txtIdentityCard" runat="server" Label="身份证号码" LabelWidth="120px" >
</f:TextArea>
<f:Button ID="btnPushData" Icon="Accept" runat="server" Text="提交" ToolTip="多身份证用逗号(,)隔开" OnClick="btnPushData_Click">
</f:Button>
</Items>
</f:FormRow>
@@ -262,9 +262,17 @@ namespace FineUIPro.Web.ZHGL.RealName
var getRProjects = Funs.DB.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
if (getRProjects != null && !string.IsNullOrEmpty(getRProjects.ProCode))
{
message += ("项目" + getRProjects.ProCode + "新增" + BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnAdd, getRProjects.ProCode, this.txtIdentityCard.Text.Trim()) ?? "");
message += ("|更新" + BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnModify, getRProjects.ProCode, this.txtIdentityCard.Text.Trim()) ?? "");
ShowNotify(message, MessageBoxIcon.Information);
string idc = this.txtIdentityCard.Text.Trim().Replace('', ',');
var getList = Funs.GetStrListByStr(idc, ',');
if (getList.Count > 0)
{
foreach (var item in getList)
{
message += ("项目" + getRProjects.ProCode + "新增" + BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnAdd, getRProjects.ProCode, item) ?? "");
message += ("|更新" + BLL.SynchroSetService.PushPersonsByIdentityCard(Const.BtnModify, getRProjects.ProCode, item) ?? "");
}
ShowNotify(message, MessageBoxIcon.Information);
}
}
else
{
@@ -91,7 +91,7 @@ namespace FineUIPro.Web.ZHGL.RealName {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIdentityCard;
protected global::FineUIPro.TextArea txtIdentityCard;
/// <summary>
/// btnPushData 控件。