合并最新

This commit is contained in:
2022-12-20 09:32:32 +08:00
parent 844e9f1488
commit 1abdaa9476
654 changed files with 73563 additions and 9746 deletions
@@ -39,6 +39,7 @@ namespace FineUIPro.Web.HJGL.DataIn
{
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
if (percent == null)
{
percent = new Dictionary<string, int>();
@@ -265,7 +266,7 @@ namespace FineUIPro.Web.HJGL.DataIn
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
@@ -275,8 +276,8 @@ namespace FineUIPro.Web.HJGL.DataIn
{
BindGrid();
}
#endregion
#endregion
#region
/// <summary>
/// 文件上传
@@ -345,7 +346,7 @@ namespace FineUIPro.Web.HJGL.DataIn
//oleDBConn.Close();
//oleDBConn.Dispose();
//this.AddDatasetToSQL(ds.Tables[0]);
DataTable dt = NPOIHelper.ExcelToDataTable1(fileUrl);
DataTable dt = NPOIHelper.ExcelToDataTable1(fileUrl);
this.AddDatasetToSQL(dt);
@@ -363,6 +364,7 @@ namespace FineUIPro.Web.HJGL.DataIn
}
}
#endregion
#region
/// 导出按钮
/// </summary>
@@ -379,6 +381,7 @@ namespace FineUIPro.Web.HJGL.DataIn
Response.End();
}
#endregion
#region Dataset的数据导入数据库
/// <summary>
/// 将Dataset的数据导入数据库
@@ -502,15 +505,15 @@ namespace FineUIPro.Web.HJGL.DataIn
percent.Add(CurrUser.UserId, 0);
}
PageContext.RegisterStartupScript("printX()");
PageContext.RegisterStartupScript("printX()");
}
protected void btnRefresh_Click(object sender, EventArgs e)
{
this.BindGrid();
}
protected void btnSaveMethod(string LoginProjectId,string UserId, string IsPDMS)
protected void btnSaveMethod(string LoginProjectId, string UserId, string IsPDMS)
{
//beginProgress();
var units = from x in Funs.DB.Base_Unit
@@ -530,7 +533,7 @@ namespace FineUIPro.Web.HJGL.DataIn
var components = from x in Funs.DB.Base_Components select x;
var dns = from x in Funs.DB.Base_DNCompare select x;
var dataInTemp = from x in Funs.DB.Sys_DataInTemp
where x.ProjectId == LoginProjectId && x.UserId ==UserId && x.Type == IsPDMS
where x.ProjectId == LoginProjectId && x.UserId == UserId && x.Type == IsPDMS
select x;
int okCount = 0;
int i = 0;
@@ -538,7 +541,7 @@ namespace FineUIPro.Web.HJGL.DataIn
string erreMessage = "";
foreach (var tempData in dataInTemp)
{
//if (i % (ir / 100 + 1) == 0 && i < ir && i > 0)
//{
// setProgress(i / (ir / 100 + 1));
@@ -548,11 +551,11 @@ namespace FineUIPro.Web.HJGL.DataIn
//}
//i++;
if (tempData != null)
{
i++;
{
i++;
percent[UserId] = (int)(100 * i / ir);
string errInfo = string.Empty;
var isExitValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
var isExitValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
&& x.WorkAreaCode == tempData.Value2 && x.ISO_IsoNo == tempData.Value3 && x.JOT_JointNo == tempData.Value4);
if (isExitValue == null || this.ckUpdate.Checked)
{
@@ -562,7 +565,7 @@ namespace FineUIPro.Web.HJGL.DataIn
isoInfo.Is_Standard = false;
if (!string.IsNullOrEmpty(tempData.Value1))
{
var unit = units.FirstOrDefault(x => x.UnitCode == tempData.Value1 );
var unit = units.FirstOrDefault(x => x.UnitCode == tempData.Value1);
if (unit == null)
{
errInfo += "单位代码[" + tempData.Value1 + "]不存在;";
@@ -625,7 +628,7 @@ namespace FineUIPro.Web.HJGL.DataIn
jointInfo.MaterialType = materialType.MaterialTypeId;
}
}
if (!string.IsNullOrEmpty(tempData.Value8))
{
jointInfo.Material1 = tempData.Value8;
@@ -733,7 +736,7 @@ namespace FineUIPro.Web.HJGL.DataIn
{
try
{
isoInfo.ISO_DesignTemperature = tempData.Value24;
}
catch (Exception)
@@ -827,10 +830,10 @@ namespace FineUIPro.Web.HJGL.DataIn
}
}
}
else
{
errInfo += "焊接区域为必填项;";
}
//else
//{
// errInfo += "焊接区域为必填项;";
//}
if (!string.IsNullOrEmpty(tempData.Value13))
{
if (tempData.Value13 != "固定" && tempData.Value13 != "活动")
@@ -842,10 +845,10 @@ namespace FineUIPro.Web.HJGL.DataIn
jointInfo.JOT_JointAttribute = tempData.Value13;
}
}
else
{
errInfo += "焊口属性为必填项;";
}
//else
//{
// errInfo += "焊口属性为必填项;";
//}
if (!string.IsNullOrEmpty(tempData.Value14))
{
try
@@ -997,10 +1000,10 @@ namespace FineUIPro.Web.HJGL.DataIn
jointInfo.JOT_Location = tempData.Value35;
}
}
else
{
errInfo += "焊接位置必填项;";
}
//else
//{
// errInfo += "焊接位置必填项;";
//}
if (!string.IsNullOrEmpty(tempData.Value36))
{
try
@@ -1129,7 +1132,7 @@ namespace FineUIPro.Web.HJGL.DataIn
{
isoInfo.ProjectId = this.CurrUser.LoginProjectId;
jointInfo.ProjectId = this.CurrUser.LoginProjectId;
var isExitISOValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
var isExitISOValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
&& x.WorkAreaCode == tempData.Value2 && x.ISO_IsoNo == tempData.Value3);
if (isExitISOValue != null) ///管线已存在
{
@@ -1143,7 +1146,7 @@ namespace FineUIPro.Web.HJGL.DataIn
jointInfo.ISO_ID = isoInfo.ISO_ID;
BLL.PW_IsoInfoService.AddIsoInfo(isoInfo);
}
var isExitJotNoValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
var isExitJotNoValue = Funs.DB.View_JointInfoAndIsoInfo.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitCode == tempData.Value1
&& x.WorkAreaCode == tempData.Value2 && x.ISO_IsoNo == tempData.Value3 && x.JOT_JointNo == tempData.Value4 && x.JOT_JointStatus != "104");
if (isExitJotNoValue == null)
{
@@ -1271,8 +1274,8 @@ namespace FineUIPro.Web.HJGL.DataIn
}
#endregion
public static Dictionary<string,int> percent { get; set; }
public static Dictionary<string,string >url { get; set; }
public static Dictionary<string, int> percent { get; set; }
public static Dictionary<string, string> url { get; set; }
[System.Web.Services.WebMethod]
public static int getPercent(string id)
@@ -1280,6 +1283,27 @@ namespace FineUIPro.Web.HJGL.DataIn
return percent[id];
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnD_Click(object sender, EventArgs e)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
int count = 0;
var getD = db.Sys_DataInTemp.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.ToopValue == "该条记录已存在于管线、焊口信息表中。");
if (getD.Count() > 0)
{
count = getD.Count();
db.Sys_DataInTemp.DeleteAllOnSubmit(getD);
db.SubmitChanges();
}
this.BindGrid();
ShowNotify("删除成功!"+count.ToString(), MessageBoxIcon.Success);
}
}
}
}