升级
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
|
||||
|
||||
namespace FineUIPro.Web.BaseInfo
|
||||
@@ -38,14 +39,14 @@ namespace FineUIPro.Web.BaseInfo
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT wp.WorkPostId,wp.WorkPostName, wp.WorkPostCode, wp.Remark,wp.PostType,wp.IsHsse,wp.IsCQMS,wp.CNCodes,
|
||||
string strSql = @"SELECT wp.WorkPostId,wp.WorkPostName, wp.WorkPostCode, wp.Remark,wp.PostType,wp.IsHsse,wp.IsCQMS,wp.IsCQMSCheck,wp.CNCodes,
|
||||
case wp.IsHsse when 1 then '是' else '否' end as IsHsseStr,const.ConstText as PostTypeName
|
||||
FROM dbo.Base_WorkPost AS wp
|
||||
LEFT JOIN Sys_Const AS const ON const.ConstValue = wp.PostType and const.GroupId = '" + ConstValue.Group_PostType + "' ";
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtKey.Text.Trim()))
|
||||
{
|
||||
strSql += "where wp.WorkPostName like '%"+this.txtKey.Text.Trim()+"%' ";
|
||||
strSql += "where wp.WorkPostName like '%" + this.txtKey.Text.Trim() + "%' ";
|
||||
}
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//strSql += " AND HazardList.ProjectId = @ProjectId";
|
||||
@@ -134,8 +135,8 @@ namespace FineUIPro.Web.BaseInfo
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
@@ -191,6 +192,10 @@ namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
this.ckbIsCQMS.Checked = true;
|
||||
}
|
||||
if (workPost.IsCQMSCheck == true)
|
||||
{
|
||||
this.ckbIsCQMSCheck.Checked = true;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(workPost.CNCodes))
|
||||
{
|
||||
txtCNCodes.Values = workPost.CNCodes.Split(',');
|
||||
@@ -205,10 +210,21 @@ namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭导入弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
@@ -228,7 +244,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
}
|
||||
var q2 = Funs.DB.Base_WorkPost.FirstOrDefault(x => x.WorkPostName == this.txtWorkPostName.Text.Trim() &&
|
||||
(x.WorkPostId != hfFormID.Text || (hfFormID.Text == null && x.WorkPostId != null))
|
||||
&&x.WorkPostCode==drpWorkPostCode.SelectedValue);
|
||||
&& x.WorkPostCode == drpWorkPostCode.SelectedValue);
|
||||
if (q2 != null)
|
||||
{
|
||||
ShowNotify("输入的岗位名称已存在!", MessageBoxIcon.Warning);
|
||||
@@ -242,6 +258,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
PostType = this.drpPostType.SelectedValue,
|
||||
IsHsse = Convert.ToBoolean(this.ckbIsHsse.Checked),
|
||||
IsCQMS = Convert.ToBoolean(this.ckbIsCQMS.Checked),
|
||||
IsCQMSCheck = Convert.ToBoolean(this.ckbIsCQMSCheck.Checked),
|
||||
CNCodes = string.Join(",", txtCNCodes.Values),
|
||||
Remark = txtRemark.Text.Trim()
|
||||
};
|
||||
@@ -314,7 +331,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
// ShowNotify("输入的岗位编号已存在!", MessageBoxIcon.Warning);
|
||||
//}
|
||||
|
||||
var q2 = Funs.DB.Base_WorkPost.FirstOrDefault(x => x.WorkPostName == this.txtWorkPostName.Text.Trim()
|
||||
var q2 = Funs.DB.Base_WorkPost.FirstOrDefault(x => x.WorkPostName == this.txtWorkPostName.Text.Trim()
|
||||
&& (x.WorkPostId != hfFormID.Text || (hfFormID.Text == null && x.WorkPostId != null)) && x.WorkPostCode == drpWorkPostCode.SelectedValue);
|
||||
if (q2 != null)
|
||||
{
|
||||
@@ -374,18 +391,9 @@ namespace FineUIPro.Web.BaseInfo
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 关闭导入弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region 数据清理
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user