培训
This commit is contained in:
@@ -18,8 +18,8 @@ namespace FineUIPro.Web.BaseInfo
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
//岗位类型
|
||||
BasicDataService.InitBasicDataCodeAndNameDropDownList(this.drpWorkPostCode, "LAB_WORK_TYPE", true);
|
||||
////岗位类型
|
||||
//BasicDataService.InitBasicDataCodeAndNameDropDownList(this.drpWorkPostCode, "LAB_WORK_TYPE", true);
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpPostType, ConstValue.Group_PostType, true);
|
||||
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
|
||||
{
|
||||
@@ -28,6 +28,8 @@ namespace FineUIPro.Web.BaseInfo
|
||||
gvCNCodes.DataSource = BLL.CNProfessionalService.GetList();
|
||||
gvCNCodes.DataBind();
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
////自动生成编码
|
||||
this.txtWorkPostCode.Text = SQLHelper.RunProcNewId("SpGetNewCode3", "dbo.Base_WorkPost", "WorkPostCode", "");
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
@@ -45,7 +47,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
|
||||
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";
|
||||
@@ -108,7 +110,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, this.drpWorkPostCode.SelectedValue, hfFormID.Text, BLL.Const.WorkPostMenuId, BLL.Const.BtnDelete);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, this.txtWorkPostCode.Text.Trim(), hfFormID.Text, BLL.Const.WorkPostMenuId, BLL.Const.BtnDelete);
|
||||
BLL.WorkPostService.DeleteWorkPostById(hfFormID.Text);
|
||||
|
||||
// 重新绑定表格,并模拟点击[新增按钮]
|
||||
@@ -127,8 +129,8 @@ namespace FineUIPro.Web.BaseInfo
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
@@ -170,7 +172,8 @@ namespace FineUIPro.Web.BaseInfo
|
||||
var workPost = BLL.WorkPostService.GetWorkPostById(Id);
|
||||
if (workPost != null)
|
||||
{
|
||||
this.drpWorkPostCode.SelectedValue = workPost.WorkPostCode;
|
||||
//this.drpWorkPostCode.SelectedValue = workPost.WorkPostCode;
|
||||
this.txtWorkPostCode.Text = workPost.WorkPostCode;
|
||||
this.txtWorkPostName.Text = workPost.WorkPostName;
|
||||
if (!string.IsNullOrEmpty(workPost.PostType))
|
||||
{
|
||||
@@ -198,7 +201,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
@@ -209,11 +212,11 @@ namespace FineUIPro.Web.BaseInfo
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpWorkPostCode.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择编号!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//if (this.drpWorkPostCode.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// ShowNotify("请选择编号!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
if (this.drpPostType.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择类型!", MessageBoxIcon.Warning);
|
||||
@@ -222,7 +225,8 @@ namespace FineUIPro.Web.BaseInfo
|
||||
string strRowID = hfFormID.Text;
|
||||
Model.Base_WorkPost newWorkPost = new Model.Base_WorkPost
|
||||
{
|
||||
WorkPostCode = this.drpWorkPostCode.SelectedValue,
|
||||
//WorkPostCode = this.drpWorkPostCode.SelectedValue,
|
||||
WorkPostCode = this.txtWorkPostCode.Text.Trim(),
|
||||
WorkPostName = this.txtWorkPostName.Text.Trim(),
|
||||
PostType = this.drpPostType.SelectedValue,
|
||||
IsHsse = Convert.ToBoolean(this.ckbIsHsse.Checked),
|
||||
@@ -289,11 +293,11 @@ namespace FineUIPro.Web.BaseInfo
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//var q = Funs.DB.Base_WorkPost.FirstOrDefault(x => x.WorkPostCode == this.txtWorkPostCode.Text.Trim() && (x.WorkPostId != hfFormID.Text || (hfFormID.Text == null && x.WorkPostId != null)));
|
||||
//if (q != null)
|
||||
//{
|
||||
// ShowNotify("输入的岗位编号已存在!", MessageBoxIcon.Warning);
|
||||
//}
|
||||
var q = Funs.DB.Base_WorkPost.FirstOrDefault(x => x.WorkPostCode == this.txtWorkPostCode.Text.Trim() && (x.WorkPostId != hfFormID.Text || (hfFormID.Text == null && x.WorkPostId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
ShowNotify("输入的岗位编号已存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
var q2 = Funs.DB.Base_WorkPost.FirstOrDefault(x => x.WorkPostName == this.txtWorkPostName.Text.Trim() && (x.WorkPostId != hfFormID.Text || (hfFormID.Text == null && x.WorkPostId != null)));
|
||||
if (q2 != null)
|
||||
|
||||
Reference in New Issue
Block a user