This commit is contained in:
2021-05-20 17:16:01 +08:00
parent f901e87a6e
commit e7cb804684
219 changed files with 17315 additions and 1571 deletions
+56 -39
View File
@@ -6,6 +6,11 @@
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>人员初步规划</title>
<style>
.f-grid-cell.hidethis .f-grid-checkbox {
display: none;
}
</style>
</head>
<body>
<form id="form1" runat="server">
@@ -24,14 +29,15 @@
<Items>
<f:DropDownList ID="drpDepartId" runat="server" Label="部门" LabelAlign="Right" LabelWidth="80px" Width="200px" EnableEdit="true"></f:DropDownList>
<f:TextBox ID="txtMajor" runat="server" Label="专业" LabelAlign="Right" LabelWidth="70px" Width="200px"></f:TextBox>
<f:DropDownList ID="drpProjectId" runat="server" Label="项目名称" LabelAlign="Right" LabelWidth="80px" Width="400px" EnableEdit="true"></f:DropDownList>
<f:DropDownList ID="drpProjectId" runat="server" Label="项目名称" LabelAlign="Right" LabelWidth="80px" Width="400px" EnableEdit="true"></f:DropDownList>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<Items>
<f:DropDownList ID="drpPersonType" runat="server" Label="人员类型" LabelAlign="Right" LabelWidth="80px" Width="200px"></f:DropDownList>
<f:DropDownList ID="drpMonth" runat="server" Label="月份" LabelAlign="Right" LabelWidth="70px" Width="200px"></f:DropDownList>
<f:DropDownList ID="drpMonth" runat="server" Label="月份" LabelAlign="Right" LabelWidth="70px" Width="200px"></f:DropDownList>
<f:TextBox ID="txtUserName" runat="server" Label="姓名" LabelAlign="Right" LabelWidth="80px" Width="220px"></f:TextBox>
<f:CheckBox runat="server" Label="去除重复" LabelAlign="Right" ID="ckDistinct"></f:CheckBox>
<f:Button ID="btnSearch" ToolTip="查询" Icon="SystemSearch" runat="server" OnClick="btnSearch_Click">
</f:Button>
<f:ToolbarFill runat="server">
@@ -68,42 +74,42 @@
</f:RenderField>
<f:GroupField ColumnID="gfYears" runat="server" HeaderTextAlign="Center">
<Columns>
<f:CheckBoxField ColumnID="Month1" Width="50px" SortField="Month1" RenderAsStaticField="true" DataField="Month1"
HeaderText="1月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month2" Width="50px" SortField="Month2" RenderAsStaticField="true" DataField="Month2"
HeaderText="2月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month3" Width="50px" SortField="Month3" RenderAsStaticField="true" DataField="Month3"
HeaderText="3月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month4" Width="50px" SortField="Month4" RenderAsStaticField="true" DataField="Month4"
HeaderText="4月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month5" Width="50px" SortField="Month5" RenderAsStaticField="true" DataField="Month5"
HeaderText="5月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month6" Width="50px" SortField="Month6" RenderAsStaticField="true" DataField="Month6"
HeaderText="6月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month7" Width="50px" SortField="Month7" RenderAsStaticField="true" DataField="Month7"
HeaderText="7月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month8" Width="50px" SortField="Month8" RenderAsStaticField="true" DataField="Month8"
HeaderText="8月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month9" Width="50px" SortField="Month9" RenderAsStaticField="true" DataField="Month9"
HeaderText="9月" HeaderTextAlign="Center" TextAlign="Center" >
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month10" Width="60px" SortField="Month10" RenderAsStaticField="true" DataField="Month10"
HeaderText="10月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month11" Width="60px" SortField="Month11" RenderAsStaticField="true" DataField="Month11"
HeaderText="11月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:CheckBoxField ColumnID="Month12" Width="60px" SortField="Month12" RenderAsStaticField="true" DataField="Month12"
HeaderText="12月" HeaderTextAlign="Center" TextAlign="Center">
</f:CheckBoxField>
<f:RenderField HeaderText="1月" ColumnID="Month1" DataField="Month1" SortField="Month1"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="2月" ColumnID="Month2" DataField="Month2" SortField="Month2"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="3月" ColumnID="Month3" DataField="Month3" SortField="Month3"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="4月" ColumnID="Month4" DataField="Month4" SortField="Month4"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="5月" ColumnID="Month5" DataField="Month5" SortField="Month5"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="6月" ColumnID="Month6" DataField="Month6" SortField="Month6"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="7月" ColumnID="Month7" DataField="Month7" SortField="Month7"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="8月" ColumnID="Month8" DataField="Month8" SortField="Month8"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="9月" ColumnID="Month9" DataField="Month9" SortField="Month9"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="10月" ColumnID="Month10" DataField="Month10" SortField="Month10"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="11月" ColumnID="Month11" DataField="Month11" SortField="Month11"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="12月" ColumnID="Month12" DataField="Month12" SortField="Month12"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="50px" RendererFunction="renderGender">
</f:RenderField>
</Columns>
</f:GroupField>
<f:RenderField Width="120px" ColumnID="Remark" DataField="Remark" SortField="Remark"
@@ -153,6 +159,17 @@
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
function renderGender(value) {
var returnValue = null;
if (value == "True") {
returnValue = "√";
}
else {
returnValue = "";
}
return returnValue;
}
</script>
</body>
</html>
+204 -97
View File
@@ -62,36 +62,206 @@ namespace FineUIPro.Web.Person
/// </summary>
private void BindGrid()
{
string strSql = @"SELECT * FROM View_Person_PersonPlan WHERE Years=@years";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@years", DateTime.Now.Year));
if (this.drpProjectId.SelectedValue != BLL.Const._Null)
if (!this.ckDistinct.Checked)
{
strSql += " AND ProjectId=@projectId";
listStr.Add(new SqlParameter("@projectId", this.drpProjectId.SelectedValue));
string strSql = @"SELECT * FROM View_Person_PersonPlan WHERE Years=@years";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@years", DateTime.Now.Year));
if (this.drpProjectId.SelectedValue != BLL.Const._Null)
{
strSql += " AND ProjectId=@projectId";
listStr.Add(new SqlParameter("@projectId", this.drpProjectId.SelectedValue));
}
if (this.drpDepartId.SelectedValue != BLL.Const._Null)
{
strSql += " AND DepartId=@DepartId";
listStr.Add(new SqlParameter("@DepartId", this.drpDepartId.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtMajor.Text.Trim()))
{
strSql += " AND Major LIKE @Major";
listStr.Add(new SqlParameter("@Major", "%" + this.txtMajor.Text.Trim() + "%"));
}
if (this.drpPersonType.SelectedValue != BLL.Const._Null)
{
strSql += " AND PersonType=@PersonType";
listStr.Add(new SqlParameter("@PersonType", this.drpPersonType.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim()))
{
strSql += " AND UserName LIKE @UserName";
listStr.Add(new SqlParameter("@UserName", "%" + this.txtUserName.Text.Trim() + "%"));
}
if (this.drpMonth.SelectedValue != BLL.Const._Null)
{
this.Grid1.FindColumn("Month1").Hidden = true;
this.Grid1.FindColumn("Month2").Hidden = true;
this.Grid1.FindColumn("Month3").Hidden = true;
this.Grid1.FindColumn("Month4").Hidden = true;
this.Grid1.FindColumn("Month5").Hidden = true;
this.Grid1.FindColumn("Month6").Hidden = true;
this.Grid1.FindColumn("Month7").Hidden = true;
this.Grid1.FindColumn("Month8").Hidden = true;
this.Grid1.FindColumn("Month9").Hidden = true;
this.Grid1.FindColumn("Month10").Hidden = true;
this.Grid1.FindColumn("Month11").Hidden = true;
this.Grid1.FindColumn("Month12").Hidden = true;
if (this.drpMonth.SelectedValue == "1")
{
this.Grid1.FindColumn("Month1").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "2")
{
this.Grid1.FindColumn("Month2").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "3")
{
this.Grid1.FindColumn("Month3").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "4")
{
this.Grid1.FindColumn("Month4").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "5")
{
this.Grid1.FindColumn("Month5").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "6")
{
this.Grid1.FindColumn("Month6").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "7")
{
this.Grid1.FindColumn("Month7").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "8")
{
this.Grid1.FindColumn("Month8").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "9")
{
this.Grid1.FindColumn("Month9").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "10")
{
this.Grid1.FindColumn("Month10").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "11")
{
this.Grid1.FindColumn("Month11").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "12")
{
this.Grid1.FindColumn("Month12").Hidden = false;
}
}
else
{
this.Grid1.FindColumn("Month1").Hidden = false;
this.Grid1.FindColumn("Month2").Hidden = false;
this.Grid1.FindColumn("Month3").Hidden = false;
this.Grid1.FindColumn("Month4").Hidden = false;
this.Grid1.FindColumn("Month5").Hidden = false;
this.Grid1.FindColumn("Month6").Hidden = false;
this.Grid1.FindColumn("Month7").Hidden = false;
this.Grid1.FindColumn("Month8").Hidden = false;
this.Grid1.FindColumn("Month9").Hidden = false;
this.Grid1.FindColumn("Month10").Hidden = false;
this.Grid1.FindColumn("Month11").Hidden = false;
this.Grid1.FindColumn("Month12").Hidden = false;
}
this.Grid1.FindColumn("ProjectName").Hidden = false;
this.Grid1.FindColumn("Remark").Hidden = false;
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
if (this.drpDepartId.SelectedValue != BLL.Const._Null)
{
strSql += " AND DepartId=@DepartId";
listStr.Add(new SqlParameter("@DepartId", this.drpDepartId.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtMajor.Text.Trim()))
{
strSql += " AND Major LIKE @Major";
listStr.Add(new SqlParameter("@Major", "%" + this.txtMajor.Text.Trim() + "%"));
}
if (this.drpPersonType.SelectedValue != BLL.Const._Null)
{
strSql += " AND PersonType=@PersonType";
listStr.Add(new SqlParameter("@PersonType", this.drpPersonType.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim()))
{
strSql += " AND UserName LIKE @UserName";
listStr.Add(new SqlParameter("@UserName", "%" + this.txtUserName.Text.Trim() + "%"));
}
if (this.drpMonth.SelectedValue != BLL.Const._Null)
else //去重复筛选
{
string strSql = @"SELECT distinct DepartName+UserName as PersonPlanId, DepartName,UserName,Major,PersonTypeName,'' as ProjectName,Remark FROM View_Person_PersonPlan WHERE Years=@years";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@years", DateTime.Now.Year));
if (this.drpProjectId.SelectedValue != BLL.Const._Null)
{
strSql += " AND ProjectId=@projectId";
listStr.Add(new SqlParameter("@projectId", this.drpProjectId.SelectedValue));
}
if (this.drpDepartId.SelectedValue != BLL.Const._Null)
{
strSql += " AND DepartId=@DepartId";
listStr.Add(new SqlParameter("@DepartId", this.drpDepartId.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtMajor.Text.Trim()))
{
strSql += " AND Major LIKE @Major";
listStr.Add(new SqlParameter("@Major", "%" + this.txtMajor.Text.Trim() + "%"));
}
if (this.drpPersonType.SelectedValue != BLL.Const._Null)
{
strSql += " AND PersonType=@PersonType";
listStr.Add(new SqlParameter("@PersonType", this.drpPersonType.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim()))
{
strSql += " AND UserName LIKE @UserName";
listStr.Add(new SqlParameter("@UserName", "%" + this.txtUserName.Text.Trim() + "%"));
}
if (this.drpMonth.SelectedValue != BLL.Const._Null)
{
if (this.drpMonth.SelectedValue == "1")
{
strSql += " AND Month1=1";
}
else if (this.drpMonth.SelectedValue == "2")
{
strSql += " AND Month2=1";
}
else if (this.drpMonth.SelectedValue == "3")
{
strSql += " AND Month3=1";
}
else if (this.drpMonth.SelectedValue == "4")
{
strSql += " AND Month4=1";
}
else if (this.drpMonth.SelectedValue == "5")
{
strSql += " AND Month5=1";
}
else if (this.drpMonth.SelectedValue == "6")
{
strSql += " AND Month6=1";
}
else if (this.drpMonth.SelectedValue == "7")
{
strSql += " AND Month7=1";
}
else if (this.drpMonth.SelectedValue == "8")
{
strSql += " AND Month8=1";
}
else if (this.drpMonth.SelectedValue == "9")
{
strSql += " AND Month9=1";
}
else if (this.drpMonth.SelectedValue == "10")
{
strSql += " AND Month10=1";
}
else if (this.drpMonth.SelectedValue == "11")
{
strSql += " AND Month11=1";
}
else if (this.drpMonth.SelectedValue == "12")
{
strSql += " AND Month12=1";
}
}
this.Grid1.FindColumn("ProjectName").Hidden = true;
this.Grid1.FindColumn("Month1").Hidden = true;
this.Grid1.FindColumn("Month2").Hidden = true;
this.Grid1.FindColumn("Month3").Hidden = true;
@@ -104,77 +274,14 @@ namespace FineUIPro.Web.Person
this.Grid1.FindColumn("Month10").Hidden = true;
this.Grid1.FindColumn("Month11").Hidden = true;
this.Grid1.FindColumn("Month12").Hidden = true;
if (this.drpMonth.SelectedValue=="1")
{
this.Grid1.FindColumn("Month1").Hidden = false;
}
else if (this.drpMonth.SelectedValue=="2")
{
this.Grid1.FindColumn("Month2").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "3")
{
this.Grid1.FindColumn("Month3").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "4")
{
this.Grid1.FindColumn("Month4").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "5")
{
this.Grid1.FindColumn("Month5").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "6")
{
this.Grid1.FindColumn("Month6").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "7")
{
this.Grid1.FindColumn("Month7").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "8")
{
this.Grid1.FindColumn("Month8").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "9")
{
this.Grid1.FindColumn("Month9").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "10")
{
this.Grid1.FindColumn("Month10").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "11")
{
this.Grid1.FindColumn("Month11").Hidden = false;
}
else if (this.drpMonth.SelectedValue == "12")
{
this.Grid1.FindColumn("Month12").Hidden = false;
}
this.Grid1.FindColumn("Remark").Hidden = true;
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
else
{
this.Grid1.FindColumn("Month1").Hidden = false;
this.Grid1.FindColumn("Month2").Hidden = false;
this.Grid1.FindColumn("Month3").Hidden = false;
this.Grid1.FindColumn("Month4").Hidden = false;
this.Grid1.FindColumn("Month5").Hidden = false;
this.Grid1.FindColumn("Month6").Hidden = false;
this.Grid1.FindColumn("Month7").Hidden = false;
this.Grid1.FindColumn("Month8").Hidden = false;
this.Grid1.FindColumn("Month9").Hidden = false;
this.Grid1.FindColumn("Month10").Hidden = false;
this.Grid1.FindColumn("Month11").Hidden = false;
this.Grid1.FindColumn("Month12").Hidden = false;
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
+9
View File
@@ -120,6 +120,15 @@ namespace FineUIPro.Web.Person {
/// </remarks>
protected global::FineUIPro.TextBox txtUserName;
/// <summary>
/// ckDistinct 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckDistinct;
/// <summary>
/// btnSearch 控件。
/// </summary>