不符合项清单基础数据字典(安全问题分类、性质;质量问题分类、性质)
This commit is contained in:
@@ -48,8 +48,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
this.GetButtonPower();
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
//BoundTree(treeTestTraining.Nodes, "0");
|
||||
//BindEnumrableToDropDownList();
|
||||
|
||||
this.ClassifyItemId = Request.QueryString["ClassifyItemId"];
|
||||
this.ClassifyId = Request.QueryString["ClassifyId"];
|
||||
if (!string.IsNullOrEmpty(this.ClassifyItemId))
|
||||
@@ -69,57 +68,16 @@ namespace FineUIPro.Web.BaseInfo
|
||||
}
|
||||
else
|
||||
{
|
||||
var model = BLL.CompanyTrainingService.GetCompanyTrainingById(this.ClassifyId);
|
||||
if (model != null)
|
||||
{
|
||||
this.txtCompileMan.Text = this.CurrUser.UserName;
|
||||
this.txtClassifyItemName.Text = model.CompanyTrainingName;
|
||||
//this.txtClassifyItemCode.Text = SQLHelper.RunProcNewId("SpGetNewCode3", "Base_SafetyProblemClassifyItem", "ClassifyItemCode", model.ClassifyItemCode + "-");
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
this.txtCompileMan.Text = this.CurrUser.UserName;
|
||||
//this.txtClassifyItemName.Text = model.ClassifyName;
|
||||
//this.txtClassifyItemCode.Text = SQLHelper.RunProcNewId("SpGetNewCode3", "Base_SafetyProblemClassifyItem", "ClassifyItemCode", model.ClassifyItemCode + "-");
|
||||
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
private List<Model.Training_TestTraining> GetNewTraining(string parentId)
|
||||
{
|
||||
return (from x in Funs.DB.Training_TestTraining
|
||||
where x.SupTrainingId == parentId
|
||||
orderby x.TrainingCode
|
||||
select x).ToList();
|
||||
}
|
||||
//private void BoundTree(TreeNodeCollection nodes, string parentId)
|
||||
//{
|
||||
// var dt = GetNewTraining(parentId);
|
||||
// if (dt.Count() > 0)
|
||||
// {
|
||||
// TreeNode tn = null;
|
||||
// foreach (var dr in dt)
|
||||
// {
|
||||
// string name = dr.TrainingName;
|
||||
// if (!string.IsNullOrEmpty(dr.TrainingCode))
|
||||
// {
|
||||
// name = "[" + dr.TrainingCode + "]" + dr.TrainingName;
|
||||
// }
|
||||
// tn = new TreeNode
|
||||
// {
|
||||
|
||||
// Text = name,
|
||||
// NodeID = dr.TrainingId,
|
||||
// EnableClickEvent = true,
|
||||
// ToolTip = dr.TrainingName
|
||||
// };
|
||||
// nodes.Add(tn);
|
||||
// ///是否存在下级节点
|
||||
// var sup = Funs.DB.Training_TestTraining.FirstOrDefault(x => x.SupTrainingId == tn.NodeID);
|
||||
// if (sup != null)
|
||||
// {
|
||||
// BoundTree(tn.Nodes, tn.NodeID);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
@@ -129,6 +87,7 @@ namespace FineUIPro.Web.BaseInfo
|
||||
{
|
||||
Model.Base_SafetyProblemClassifyItem newModel = new Base_SafetyProblemClassifyItem
|
||||
{
|
||||
ClassifyId = this.ClassifyId,
|
||||
ClassifyItemCode = this.txtClassifyItemCode.Text.Trim(),
|
||||
ClassifyItemName = this.txtClassifyItemName.Text.Trim(),
|
||||
CompileMan = this.CurrUser.UserId,
|
||||
@@ -147,7 +106,6 @@ namespace FineUIPro.Web.BaseInfo
|
||||
}
|
||||
else
|
||||
{
|
||||
newModel.ClassifyId = this.ClassifyId;
|
||||
this.ClassifyItemId = SQLHelper.GetNewID(typeof(Model.Base_SafetyProblemClassifyItem));
|
||||
newModel.ClassifyItemId = this.ClassifyItemId;
|
||||
BLL.SafetyProblemClassifyItemService.AddClassifyItem(newModel);
|
||||
@@ -178,37 +136,19 @@ namespace FineUIPro.Web.BaseInfo
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
var q = Funs.DB.Base_SafetyProblemClassifyItem.FirstOrDefault(x => x.ClassifyId == this.ClassifyId && x.ClassifyItemName == this.txtClassifyItemName.Text.Trim() && (x.ClassifyItemId != this.ClassifyItemId || (this.ClassifyItemId == null && x.ClassifyItemId != null)));
|
||||
var q = Funs.DB.Base_SafetyProblemClassifyItem.FirstOrDefault(x => x.ClassifyId == this.ClassifyId && x.ClassifyItemCode == this.txtClassifyItemCode.Text.Trim() && (x.ClassifyItemId != this.ClassifyItemId || (this.ClassifyItemId == null && x.ClassifyItemId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
ShowNotify("输入的安全问题分类编号已存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
var q2 = Funs.DB.Base_SafetyProblemClassifyItem.FirstOrDefault(x => x.ClassifyId == this.ClassifyId && x.ClassifyItemName == this.txtClassifyItemName.Text.Trim() && (x.ClassifyItemId != this.ClassifyItemId || (this.ClassifyItemId == null && x.ClassifyItemId != null)));
|
||||
if (q2 != null)
|
||||
{
|
||||
ShowNotify("输入的安全问题分类已存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//#region 上传附件资源
|
||||
///// <summary>
|
||||
///// 上传附件资源
|
||||
///// </summary>
|
||||
///// <param name="sender"></param>
|
||||
///// <param name="e"></param>
|
||||
//protected void btnUploadResources_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (this.btnSave.Hidden)
|
||||
// {
|
||||
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanyTraining&menuId={1}&type=-1", ClassifyItemId, BLL.Const.SafetyProblemClassifyMenuId)));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (string.IsNullOrEmpty(this.ClassifyItemId))
|
||||
// {
|
||||
// SaveData(false);
|
||||
// }
|
||||
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/CompanyTraining&menuId={1}", ClassifyItemId, BLL.Const.SafetyProblemClassifyMenuId)));
|
||||
// }
|
||||
//}
|
||||
//#endregion
|
||||
|
||||
#region 按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
|
||||
Reference in New Issue
Block a user