Merge branch 'master' of http://47.104.102.122:3000/lpf/SGGL_SHJ
This commit is contained in:
@@ -226,8 +226,10 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
pointManages = pointManages.Where(x => x.UnitId == this.drpUnit.SelectedValue);
|
||||
}
|
||||
pointManages = pointManages.OrderBy(x => x.StartDate);
|
||||
|
||||
foreach (var item in pointManages)
|
||||
var trustView = from x in Funs.DB.View_Batch_BatchTrust
|
||||
join y in pointManages on x.PointBatchId equals y.PointBatchId
|
||||
select x;
|
||||
foreach (var item in trustView)
|
||||
{
|
||||
var pipeline = PointBatchService.GetPointBatchById(item.PointBatchId);
|
||||
string startdate = string.Format("{0:yyyy-MM-dd}", pipeline.StartDate);
|
||||
@@ -235,21 +237,21 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
|
||||
TreeNode newNode = new TreeNode
|
||||
{
|
||||
NodeID = item.PointBatchId,
|
||||
ToolTip = "批",
|
||||
NodeID = item.TrustBatchId,
|
||||
Text = item.TrustBatchCode + "【" + startdate + "】" + "【" + item.UnitName + "】",
|
||||
ToolTip = "委托单",
|
||||
EnableClickEvent = true,
|
||||
};
|
||||
string code = "DK-" + item.PointBatchCode.Substring(item.PointBatchCode.Length - 4);
|
||||
// 未委托批次红色显示
|
||||
if (BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(item.PointBatchId) == null)
|
||||
{
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "【" + item.UnitName + "】" + "</font>";
|
||||
newNode.ToolTip = "未委托";
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Text = code + "【" + startdate + "】" + "【" + item.UnitName + "】";
|
||||
}
|
||||
//if (BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(item.PointBatchId) == null)
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "【" + item.UnitName + "】" + "</font>";
|
||||
// newNode.ToolTip = "未委托";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newNode.Text = code + "【" + startdate + "】" + "【" + item.UnitName + "】";
|
||||
//}
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
}
|
||||
@@ -276,8 +278,8 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
this.txtTrustDate.Text = string.Empty;
|
||||
this.txtDetectionTypeCode.Text = string.Empty;
|
||||
this.lbNDEUnit.Text = string.Empty;
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
||||
Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID);
|
||||
Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(trust.PointBatchId);
|
||||
if (trust != null)
|
||||
{
|
||||
if (batch.IsClosed == true)
|
||||
@@ -330,7 +332,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_TrustBatchMenuId, Const.BtnGenerate))
|
||||
{
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointAudit.aspx", "委托 - ")));
|
||||
Model.HJGL_Batch_PointBatch pointBatch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
|
||||
Model.HJGL_Batch_PointBatch pointBatch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID.Split(',')[0]);
|
||||
if (pointBatch != null)
|
||||
{
|
||||
if (pointBatch.IsClosed == true)
|
||||
@@ -338,13 +340,13 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
ShowNotify("该检验批无需委托!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID.Split(',')[0]);
|
||||
if (trust != null)
|
||||
{
|
||||
ShowNotify("该检验批已生成委托!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointTrust.aspx?PointBatchId=" + this.tvControlItem.SelectedNodeID, "委托 - ")));
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointTrust.aspx?PointBatchId=" + this.tvControlItem.SelectedNodeID.Split(',')[0], "委托 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -365,17 +367,17 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode != null)
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
||||
if (trust == null) //为生成委托
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID);
|
||||
if (trust == null) //未生成委托
|
||||
{
|
||||
string strSql = @"SELECT * FROM dbo.View_GenerateTrustItem d WHERE PointBatchId=@PointBatchId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
|
||||
};
|
||||
listStr.Add(new SqlParameter("@PointBatchId", this.tvControlItem.SelectedNodeID));
|
||||
listStr.Add(new SqlParameter("@PointBatchId", trust.PointBatchId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
@@ -489,7 +491,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
string trustBatchId = this.tvControlItem.SelectedNodeID;
|
||||
string trustBatchId = this.tvControlItem.SelectedNodeID.Split(',')[1];
|
||||
BLL.Batch_BatchTrustService.UpdateBatchTrustAudit(trustBatchId, true);
|
||||
PageInfo();
|
||||
ShowNotify("该委托单已审核!", MessageBoxIcon.Success);
|
||||
@@ -514,7 +516,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
string trustBatchId = this.tvControlItem.SelectedNodeID;
|
||||
string trustBatchId = this.tvControlItem.SelectedNodeID.Split(',')[1];
|
||||
string trustBatchCode = this.tvControlItem.SelectedNode.Text;
|
||||
var trust = BLL.Batch_BatchTrustService.GetBatchTrustById(trustBatchId);
|
||||
|
||||
@@ -566,7 +568,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
string varValue = string.Empty;
|
||||
string pointBatchId = this.tvControlItem.SelectedNodeID;
|
||||
string pointBatchId = this.tvControlItem.SelectedNodeID.Split(',')[0];
|
||||
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(pointBatchId);
|
||||
if (trust != null)
|
||||
@@ -650,8 +652,6 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
return;
|
||||
}
|
||||
string reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||
// Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
||||
// Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
|
||||
var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId);
|
||||
if (trust == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user