11
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using BLL;
|
||||
using BLL.Common;
|
||||
using FineUIPro.Web.HJGL.WeldingManage;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.POIFS.Properties;
|
||||
using Org.BouncyCastle.Asn1.Tsp;
|
||||
@@ -16,17 +17,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
{
|
||||
public partial class PDFMarking : PageBase
|
||||
{
|
||||
public List<Model.HJGL_WeldJoint> WeldJointlist
|
||||
{
|
||||
get
|
||||
{
|
||||
return (List<Model.HJGL_WeldJoint>)ViewState["ISO_ID"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ISO_ID"] = value;
|
||||
}
|
||||
}
|
||||
public static Dictionary<string, List<Model.HJGL_WeldJoint>> WeldJointlist = new Dictionary<string, List<Model.HJGL_WeldJoint>>();
|
||||
|
||||
|
||||
private string ISO_ID
|
||||
{
|
||||
@@ -86,7 +78,15 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
FileId = Request.Params["FileId"];
|
||||
URL = Funs.SGGLUrl + Request.Params["pdfurl"];
|
||||
this.IsPDMS = "0";
|
||||
WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
if (!WeldJointlist.ContainsKey(CurrUser.PersonId))
|
||||
{
|
||||
WeldJointlist.Add(CurrUser.PersonId, new List<Model.HJGL_WeldJoint>());
|
||||
}
|
||||
else
|
||||
{
|
||||
WeldJointlist[ CurrUser.PersonId]= new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -96,10 +96,17 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
Grid1.RecordCount = WeldJointlist.Count;
|
||||
Grid1.DataSource = WeldJointlist;
|
||||
Grid1.DataBind();
|
||||
if (!WeldJointlist.ContainsKey(CurrUser.PersonId))
|
||||
{
|
||||
Grid1.RecordCount = WeldJointlist[CurrUser.PersonId].Count;
|
||||
Grid1.DataSource = WeldJointlist[CurrUser.PersonId];
|
||||
}
|
||||
else
|
||||
{
|
||||
Grid1.RecordCount = 0;
|
||||
Grid1.DataSource = null;
|
||||
}
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
#endregion
|
||||
@@ -118,7 +125,9 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
}
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_DataInMenuId, Const.BtnIn))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
DataInEdit.dic[Grid1.SelectedRowID] = WeldJointlist[CurrUser.PersonId].FirstOrDefault(x => x.WeldJointId == Grid1.SelectedRowID);
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?WeldJointId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -142,7 +151,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
DataInEdit.dic[Grid1.SelectedRowID] = WeldJointlist[CurrUser.PersonId].FirstOrDefault(x=>x.WeldJointId == Grid1.SelectedRowID);
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?WeldJointId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -168,8 +178,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var WeldJoint = WeldJointlist.FirstOrDefault(x => x.WeldJointId == rowID);
|
||||
WeldJointlist.Remove(WeldJoint);
|
||||
var WeldJoint = WeldJointlist[CurrUser.PersonId].FirstOrDefault(x => x.WeldJointId == rowID);
|
||||
WeldJointlist[CurrUser.PersonId].Remove(WeldJoint);
|
||||
}
|
||||
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
@@ -229,8 +239,9 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
protected void btnSaveMethod(string LoginProjectId, string UserId, string IsPDMS)
|
||||
{
|
||||
//beginProgress();
|
||||
Funs.DB.HJGL_WeldJoint.InsertAllOnSubmit(WeldJointlist);
|
||||
Funs.DB.HJGL_WeldJoint.InsertAllOnSubmit(WeldJointlist[CurrUser.PersonId]);
|
||||
Funs.DB.SubmitChanges();
|
||||
WeldJointlist.Remove(CurrUser.PersonId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -254,8 +265,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
if (iso != null)
|
||||
{
|
||||
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == iso.UnitId);
|
||||
|
||||
WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
WeldJointlist[CurrUser.PersonId] = new List<Model.HJGL_WeldJoint>();
|
||||
for (int i = 0; i < jsonArray.Count; i++)
|
||||
{
|
||||
JObject item = jsonArray[i] as JObject;
|
||||
@@ -272,7 +283,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
newDataInTemp.Y2 = item.Value<string>("y2");
|
||||
newDataInTemp.AttachSourceId = FileId;
|
||||
newDataInTemp.WeldingMode = "手动";
|
||||
WeldJointlist.Add(newDataInTemp);
|
||||
WeldJointlist[CurrUser.PersonId].Add(newDataInTemp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user