This commit is contained in:
2024-07-15 22:36:48 +08:00
parent d281b1d9c1
commit 20d7c09645
5 changed files with 150 additions and 5 deletions
@@ -30,8 +30,8 @@ namespace FineUIPro.Web.CQMS.WBS.Control
/// </summary>
public void DataBrid()
{
string strSql = @"select * from(select a.ControlId,a.ProjectId,a.ParentId,a.ControlCode,a.ControlLevel,a.PlanId,a.PlanTypeId,a.SubItemsId,a.DetectionItems,a.BasedCriterion,a.QualityRecordName,a.RecordNumber,a.Subcontractors,a.OperateTime,a.Sort,a.States,a.Partition from Control_PointCropping as a where isnull(a.ProjectId,'')='' ";
string strSql1 = "select a.ControlId,a.ProjectId,a.ParentId,a.ControlCode,a.ControlLevel,a.PlanId,a.PlanTypeId,a.SubItemsId,a.DetectionItems,a.BasedCriterion,a.QualityRecordName,a.RecordNumber,a.Subcontractors,a.OperateTime,a.Sort,a.States,a.Partition from Control_PointCropping as a where a.ProjectId=@ProjectId ";
string strSql = @"select * from(select a.ControlId,a.ProjectId,a.ParentId,a.ControlCode,a.ControlLevel,a.PlanId,a.PlanTypeId,a.SubItemsId,a.DetectionItems,a.BasedCriterion,a.QualityRecordName,a.RecordNumber,a.Subcontractors,a.OperateTime,a.Sort,a.States,a.Partition,a.MaxLevel from Control_PointCropping as a where isnull(a.ProjectId,'')='' ";
string strSql1 = "select a.ControlId,a.ProjectId,a.ParentId,a.ControlCode,a.ControlLevel,a.PlanId,a.PlanTypeId,a.SubItemsId,a.DetectionItems,a.BasedCriterion,a.QualityRecordName,a.RecordNumber,a.Subcontractors,a.OperateTime,a.Sort,a.States,a.Partition,a.MaxLevel from Control_PointCropping as a where a.ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (!string.IsNullOrEmpty(sDetectionItems.Text.Trim()))
@@ -143,8 +143,9 @@ namespace FineUIPro.Web.CQMS.WBS.Control
var rowIndex = Grid1.SelectedRowIndex;
var rowId = Grid1.DataKeys[rowIndex][0].ToString();
var maxLevel = Grid1.DataKeys[rowIndex][4] == null ? 3 : int.Parse(Grid1.DataKeys[rowIndex][4].ToString());
var controlLevel = Grid1.DataKeys[rowIndex][2] != null ? Convert.ToInt32(Grid1.DataKeys[rowIndex][2]) : 1;
if (controlLevel > 2)
if (controlLevel >= maxLevel)
{
ShowNotify("最小节点无子节点!", MessageBoxIcon.Warning);
return;