Compare commits

..

No commits in common. "3b39bf3074f361d440e3f321e82da0be50e5ef11" and "7a51a9642f287728633f7f18f958e4d9bb481c8d" have entirely different histories.

48 changed files with 263 additions and 557 deletions

View File

@ -1,48 +0,0 @@
alter table Comprehensive_DataReceivingDoc alter column RemarkCode int
go
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='¸Ö½îHRB400E'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='Y200430832'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='ÒÑÈ¡ÑùËͼì'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='Y1109024'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB8624-2014'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='CV'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB/T5574-2008'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='J1009194'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='B201031625'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB50264-2013'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='QC202108241813'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB8624-2016'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='Q355'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='A537CL2'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='EQ001'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB/T3880-2012'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='SS2022-00150'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='F1112193'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='AFJ2207444'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='A02212507RPS1'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='¸Ö½îHPB300'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='A537CL2/A516 Cr 60/Q370/Q345'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='J1012004'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='A537 CL2/Q370/Q345'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='SANS298-2007'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='SS2022-00006'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='jc/70-2002'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='AFJ22070445'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB8624-2015'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='8900002955433'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='GB8624-2013'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='Q370/Q345'
update Comprehensive_InspectionEquipment set RemarkCode = null where RemarkCode ='Y1201023'
go
alter table Comprehensive_InspectionEquipment alter column RemarkCode int
go
alter table Comprehensive_InspectionPerson alter column RemarkCode int
go
alter table Comprehensive_InspectionMachine alter column RemarkCode int
go
alter table Comprehensive_TrainingRecords alter column RemarkCode int
go
alter table Comprehensive_ConTechnologyDisclosure alter column RemarkCode int
go

View File

@ -64,7 +64,6 @@ namespace BLL
newCon.DisclosureDate = con.DisclosureDate;
newCon.UnitWorkId = con.UnitWorkId;
newCon.AttendMan = con.AttendMan;
newCon.RemarkCode = con.RemarkCode;
Funs.DB.SubmitChanges();
}
}

View File

@ -71,7 +71,6 @@ namespace BLL
newTraining.Hours = trainingRecords.Hours;
newTraining.KeynoteSpeaker = trainingRecords.KeynoteSpeaker;
newTraining.Remark = trainingRecords.Remark;
newTraining.RemarkCode = trainingRecords.RemarkCode;
Funs.DB.SubmitChanges();
}
}

View File

@ -3306,7 +3306,32 @@ namespace BLL
/// 质量专项检查模板文件原始虚拟路径
/// </summary>
public const string JointCheckTempUrl = "File\\Excel\\CQMS\\质量专项检查模版.xls";
#endregion
/// <summary>
/// 设备材料报验模板文件原始虚拟路径
/// </summary>
public const string InspectionEquipmentTempUrl = "File\\Excel\\CQMS\\设备材料报验模板.xls";
/// <summary>
/// 人员报验模板文件原始虚拟路径
/// </summary>
public const string InspectionPersonTempUrl = "File\\Excel\\CQMS\\人员报验模板.xls";
/// <summary>
/// 机具报验模板文件原始虚拟路径
/// </summary>
public const string InspectionMachineTempUrl = "File\\Excel\\CQMS\\机具报验模板.xls";
/// <summary>
/// 培训记录模板文件原始虚拟路径
/// </summary>
public const string TrainingRecordsTempUrl = "File\\Excel\\CQMS\\培训记录模板.xls";
/// <summary>
/// 施工技术交底模板文件原始虚拟路径
/// </summary>
public const string ConTechnologyDisclosureTempUrl = "File\\Excel\\CQMS\\施工技术交底管理模板.xls";
#endregion
#endregion
#region

View File

@ -239,7 +239,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
protected void btnOut_Click(object sender, EventArgs e)
{
string rootPath = Server.MapPath("~/");
string initTemplatePath = Const.ConTechnologyDisclosureTemUrl;
string initTemplatePath = Const.ConTechnologyDisclosureTempUrl;
string uploadfilepath = string.Empty;
string newUrl = string.Empty;
uploadfilepath = rootPath + initTemplatePath;
@ -259,11 +259,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
lists = lists.Where(x => x.DisclosureCode.Contains(this.txtCode.Text.Trim()));
}
lists = lists.OrderBy(x => x.RemarkCode);
lists = lists.OrderBy(x => x.UnitId);
if (lists != null)
{
string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("施工技术交底管理导入模板", "施工技术交底管理("+projectName+DateTime.Now.ToString("yyyyMMdd")+"");
newUrl = uploadfilepath.Replace("施工技术交底管理模板.xls", "施工技术交底管理.xls");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
NPOI.SS.UserModel.IWorkbook workbook;
@ -298,7 +297,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
NPOI.SS.UserModel.ICell cell;
int i = 2;
int i = 1;
foreach (var item in lists)
{
// 第二步:创建新数据行
@ -351,10 +350,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
cell = row.CreateCell(7);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.AttendMan);//参加人员
cell = row.CreateCell(8);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
i++;
}
// 第三步:写入文件流

View File

@ -178,7 +178,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
for (int i = 1; i < ir; i++)
for (int i = 0; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@ -246,17 +246,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
else
{
try
{
int t = Convert.ToInt32(row8);
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "标识编号" + "," + "[" + row8 + "]错误!" + "|";
}
}
}
if (!string.IsNullOrEmpty(result))
{
@ -406,13 +395,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
&& x.SuperUnitWork == null
select x;
for (int i = 1; i < ir; i++)
for (int i = 0; i < ir; i++)
{
Model.Comprehensive_ConTechnologyDisclosure oldViewInfo = new Model.Comprehensive_ConTechnologyDisclosure();
string row0 = pds.Rows[i][0].ToString().Trim();
string row3 = pds.Rows[i][3].ToString().Trim();
var cn = cns.Where(y => y.ProfessionalName == row0).FirstOrDefault();
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode ==Funs.GetNewInt( pds.Rows[i][8].ToString().Trim())
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][8].ToString().Trim()
).FirstOrDefault();
if (oldViewInfo == null)
{
@ -430,7 +419,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
des.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][6].ToString().Trim());
}
des.AttendMan = pds.Rows[i][7].ToString().Trim();
des.RemarkCode =Funs.GetNewInt( pds.Rows[i][8].ToString().Trim());
des.RemarkCode = pds.Rows[i][8].ToString().Trim();
des.CompileMan = this.CurrUser.UserId;
des.CompileDate = DateTime.Now;
BLL.ConTechnologyDisclosureService.AddConTechnologyDisclosure(des);

View File

@ -36,7 +36,6 @@
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnitWorkIds" runat="server" Label="单位工程名称" EnableCheckBoxSelect="true" EnableMultiSelect="true" LabelWidth="130px" AutoSelectFirstItem="false" LabelAlign="Right"></f:DropDownList>
<f:NumberBox ID="txtRemarkCode" runat="server" Label="标志编号" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true" NoDecimal="true" NoNegative="true"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>

View File

@ -64,7 +64,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.drpUnitWorkIds.SelectedValueArray = con.UnitWorkId.Split(',');
}
this.txtAttendMan.Text = con.AttendMan;
this.txtRemarkCode.Text = con.RemarkCode.HasValue ? con.RemarkCode.ToString() : "";
}
else
{
@ -92,14 +91,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择交底负责单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.ConTechnologyDisclosureId != this.ConTechnologyDisclosureId || (this.ConTechnologyDisclosureId == null && x.ConTechnologyDisclosureId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
Model.Comprehensive_ConTechnologyDisclosure newCon = new Model.Comprehensive_ConTechnologyDisclosure();
newCon.ProjectId = this.CurrUser.LoginProjectId;
newCon.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
@ -121,7 +112,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
newCon.UnitWorkId = ids;
newCon.AttendMan = this.txtAttendMan.Text.Trim();
newCon.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (string.IsNullOrEmpty(this.ConTechnologyDisclosureId))
{

View File

@ -102,15 +102,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitWorkIds;
/// <summary>
/// txtRemarkCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtRemarkCode;
/// <summary>
/// txtAttendMan 控件。
/// </summary>

View File

@ -15,7 +15,7 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="资料收发文登记记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="DataReceivingDocId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="DataReceivingDocId" AllowSorting="true" SortField="RemarkCode"
ClicksToEdit="2" DataIDField="DataReceivingDocId" AllowSorting="true" SortField="FileCode"
SortDirection="DESC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">

View File

@ -54,8 +54,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
doc.CompileMan,
doc.CompileDate,
doc.Status,
cnp.ProfessionalName,
doc.RemarkCode "
cnp.ProfessionalName "
+ @" FROM Comprehensive_DataReceivingDoc AS doc"
+ @" LEFT JOIN Base_CNProfessional AS cnp ON cnp.CNProfessionalId = doc.CNProfessionalId"
+ @" WHERE doc.ProjectId = @ProjectId";
@ -515,7 +514,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
cell = row.CreateCell(19);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
cell.SetCellValue(item.RemarkCode);//标志编号
i++;
}

View File

@ -170,7 +170,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where y.ProjectId == this.CurrUser.LoginProjectId
select x;
var cns = from x in Funs.DB.Base_CNProfessional select x;
var cns = from x in Funs.DB.Base_CNProfessional select x;
for (int i = 2; i < ir; i++)
{
@ -276,7 +276,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
result += (i + 2).ToString() + "," + "上报日期" + "," + "格式错误!" + "|";
}
}
string row10 = pds.Rows[i][10].ToString().Trim();
if (!string.IsNullOrEmpty(row10))
{
@ -355,7 +355,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string row18 = pds.Rows[i][18].ToString().Trim();
if (!string.IsNullOrEmpty(row18))
{
{
if (row18 != "是" && row18 != "否")
{
result += (i + 2).ToString() + "," + "是否存档" + "," + "[" + row18 + "]错误!" + "|";
@ -367,17 +367,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
else
{
try
{
int c = Convert.ToInt32(row19);
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row19 + "]错误!" + "|";
}
}
}
if (!string.IsNullOrEmpty(result))
{
@ -528,7 +517,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var cn = cns.Where(y => y.ProfessionalName == pds.Rows[i][4].ToString().Trim()).FirstOrDefault();
var unit = units.Where(y => y.UnitName == pds.Rows[i][5].ToString().Trim()).FirstOrDefault();
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][19].ToString().Trim())
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][19].ToString().Trim()
).FirstOrDefault();
if (oldViewInfo == null)
{
@ -580,7 +569,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
des.IsOnFile = false;
}
}
des.RemarkCode = Funs.GetNewInt(pds.Rows[i][19].ToString().Trim());
des.RemarkCode = pds.Rows[i][19].ToString().Trim();
des.CompileMan = this.CurrUser.UserId;
des.CompileDate = DateTime.Now;
BLL.DataReceivingDocService.AddDataReceivingDoc(des);

View File

@ -117,8 +117,7 @@
</f:FormRow>
<f:FormRow>
<Items>
<%--<f:TextBox ID="txtRemarkCode" runat="server" Label="标志编号" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px"></f:TextBox>--%>
<f:NumberBox ID="txtRemarkCode" runat="server" Label="标志编号" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px" NoDecimal="true" NoNegative="true"></f:NumberBox>
<f:TextBox ID="txtRemarkCode" runat="server" Label="标志编号" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
<f:Label ID="Label1" runat="server"></f:Label>
<f:Label ID="Label3" runat="server"></f:Label>
</Items>

View File

@ -153,7 +153,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.rblIsOnFile.SelectedValue = "false";
}
}
this.txtRemarkCode.Text = dataReceivingDoc.RemarkCode.HasValue ? dataReceivingDoc.RemarkCode.ToString() : "";
this.txtRemarkCode.Text = dataReceivingDoc.RemarkCode;
//var currApprove = DataReceivingDocApproveService.GetCurrentApprove(dataReceivingDoc.DataReceivingDocId);
//if (currApprove != null)
@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null)));
var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.RemarkCode == this.txtRemarkCode.Text.Trim() && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
@ -274,7 +274,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
dataReceivingDoc.IsOnFile = Convert.ToBoolean(this.rblIsOnFile.SelectedValue);
}
dataReceivingDoc.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
dataReceivingDoc.RemarkCode = this.txtRemarkCode.Text.Trim();
//if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
//{
// dataReceivingDoc.AuditMan = drpAudit.SelectedValue;

View File

@ -271,7 +271,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtRemarkCode;
protected global::FineUIPro.TextBox txtRemarkCode;
/// <summary>
/// Label1 控件。

View File

@ -15,7 +15,7 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="设备材料报验" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="InspectionEquipmentId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="InspectionEquipmentId" AllowSorting="true" SortField="RemarkCode"
ClicksToEdit="2" DataIDField="InspectionEquipmentId" AllowSorting="true" SortField="InspectionCode"
SortDirection="DESC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="true">

View File

@ -282,7 +282,7 @@ namespace FineUIPro.Web.Comprehensive
protected void btnOut_Click(object sender, EventArgs e)
{
string rootPath = Server.MapPath("~/");
string initTemplatePath = Const.InspectionEquipmentDataInUrl;
string initTemplatePath = Const.InspectionEquipmentTempUrl;
string uploadfilepath = string.Empty;
string newUrl = string.Empty;
uploadfilepath = rootPath + initTemplatePath;
@ -306,11 +306,10 @@ namespace FineUIPro.Web.Comprehensive
{
lists = lists.Where(x => x.InspectionDate <= Funs.GetNewDateTime(txtEndTime.Text.Trim()));
}
lists = lists.OrderBy(x => x.RemarkCode);
lists = lists.OrderBy(x => x.UnitId);
if (lists != null)
{
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("设备材料报验导入模板", "设备材料报验(" + projectName + "" + DateTime.Now.ToString("yyyyMMdd") + ")");
newUrl = uploadfilepath.Replace("设备材料报验模板.xls", "设备材料报验.xls");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
NPOI.SS.UserModel.IWorkbook workbook;
@ -345,7 +344,7 @@ namespace FineUIPro.Web.Comprehensive
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
NPOI.SS.UserModel.ICell cell;
int i = 2;
int i = 1;
foreach (var item in lists)
{
// 第二步:创建新数据行
@ -361,6 +360,10 @@ namespace FineUIPro.Web.Comprehensive
cell = row.CreateCell(2);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.EquipmentNO);//设备位号
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId);
if (cnp != null)
{
@ -371,10 +374,6 @@ namespace FineUIPro.Web.Comprehensive
cell.SetCellValue(string.Empty);//专业
}
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.EquipmentNO);//设备位号
cell = row.CreateCell(4);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.InspectionName);//名称
@ -423,10 +422,6 @@ namespace FineUIPro.Web.Comprehensive
cell.CellStyle = cellStyle;
cell.SetCellValue(item.UsedPlace);//拟使用部位
cell = row.CreateCell(13);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
i++;
}
// 第三步:写入文件流

View File

@ -126,7 +126,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 14);
AddDatasetToSQL(ds.Tables[0], 13);
hdCheckResult.Text = "1";
}
catch (Exception exc)
@ -173,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var cns = from x in Funs.DB.Base_CNProfessional select x;
for (int i = 1; i < ir; i++)
for (int i = 0; i < ir; i++)
{
Model.Comprehensive_InspectionEquipment oldViewInfo = new Model.Comprehensive_InspectionEquipment();
string row0 = pds.Rows[i][0].ToString().Trim();
@ -223,23 +223,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
}
string row13 = pds.Rows[i][13].ToString();
if (string.IsNullOrEmpty(row13))
string row12 = pds.Rows[i][12].ToString();
if (string.IsNullOrEmpty(row12))
{
result += (i + 2).ToString() + "," + "标识编号" + "," + "此项为必填项!" + "|";
}
else
{
try
{
int t = Convert.ToInt32(row13);
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "标识编号" + "," + "[" + row13 + "]错误!" + "|";
}
}
//else
//{
// var view = oldViewInfos.FirstOrDefault(x => x.RemarkCode == row12);
// if (view != null)
// {
// result += (i + 2).ToString() + "," + "标识编号" + "," + "[" + row12 + "]已存在!" + "|";
// }
//}
}
else
{
result += (i + 2).ToString() + "," + "报验单位" + "," + "[" + row0 + "]不存在!" + "|";
@ -351,7 +349,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 14);
AddDatasetToSQL2(ds.Tables[0], 13);
}
catch (Exception ex)
{
@ -390,7 +388,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var cns = from x in Funs.DB.Base_CNProfessional select x;
for (int i = 1; i < ir; i++)
for (int i = 0; i < ir; i++)
{
Model.Comprehensive_InspectionEquipment oldViewInfo = new Model.Comprehensive_InspectionEquipment();
string row0 = pds.Rows[i][0].ToString().Trim();
@ -398,7 +396,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
if (unitInfo != null && !string.IsNullOrEmpty(row0))
{
oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId
&& x.RemarkCode ==Funs.GetNewInt(pds.Rows[i][13].ToString().Trim())
&& x.RemarkCode == pds.Rows[i][12].ToString().Trim()
).FirstOrDefault();
if (oldViewInfo == null)//新增
{
@ -423,12 +421,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim());
}
Ins.UsedPlace = pds.Rows[i][12].ToString().Trim();
Ins.RemarkCode =Funs.GetNewInt(pds.Rows[i][13].ToString().Trim());
Ins.RemarkCode = pds.Rows[i][12].ToString().Trim();
Ins.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
Ins.CompileMan = this.CurrUser.UserId;
Ins.CompileDate = DateTime.Now.Date;
Ins.Status = BLL.Const.Comprehensive_Compile;
Ins.Status = BLL.Const.Comprehensive_Complete;
BLL.InspectionEquipmentService.AddInspectionEquipment(Ins);
}
@ -454,11 +451,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
oldViewInfo.InspectionDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim());
}
oldViewInfo.UsedPlace= pds.Rows[i][12].ToString().Trim();
oldViewInfo.RemarkCode =Funs.GetNewInt(pds.Rows[i][13].ToString().Trim());
oldViewInfo.RemarkCode = pds.Rows[i][12].ToString().Trim();
oldViewInfo.CompileMan = this.CurrUser.UserId;
oldViewInfo.CompileDate = DateTime.Now.Date;
oldViewInfo.Status = BLL.Const.Comprehensive_Compile;
oldViewInfo.Status = BLL.Const.Comprehensive_Complete;
BLL.InspectionEquipmentService.UpdateInspectionEquipment(oldViewInfo);
//result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|";
}
@ -480,6 +476,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
#endregion
#endregion
#region
/// <summary>
/// 下载模板按钮

View File

@ -65,7 +65,7 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtRemarkCode" runat="server" Label="标识编号" LabelAlign="Right" LabelWidth="120px" Required="true" ShowRedStar="true" NoDecimal="true" NoNegative="true"></f:NumberBox>
<f:TextBox ID="txtRemarkCode" runat="server" Label="标识编号" MaxLength="50" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="txtUsedPlace" runat="server" Label="拟使用部位" MaxLength="100" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
</Items>
</f:FormRow>

View File

@ -82,7 +82,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.drpSamplingResult.SelectedValue = inspectionEquipment.SamplingResult;
}
this.txtInspectionDate.Text = inspectionEquipment.InspectionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", inspectionEquipment.InspectionDate) : "";
this.txtRemarkCode.Text = inspectionEquipment.RemarkCode.HasValue ? inspectionEquipment.RemarkCode.ToString() : "";
this.txtRemarkCode.Text = inspectionEquipment.RemarkCode;
this.txtEquipmentNo.Text = inspectionEquipment.EquipmentNO;
this.txtUsedPlace.Text = inspectionEquipment.UsedPlace;
var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(inspectionEquipment.InspectionEquipmentId);
@ -243,12 +243,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment();
newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId;
@ -262,7 +256,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim();
newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim();
newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim();
newInspectionEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim();
newInspectionEquipment.Counts = this.txtCounts.Text.Trim();
newInspectionEquipment.Unit = this.txtUnit.Text.Trim();
newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();
@ -330,12 +324,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
return;
}
var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment();
newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId;
newInspectionEquipment.UnitId = this.drpUnitId.SelectedValue;
@ -348,7 +336,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim();
newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim();
newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim();
newInspectionEquipment.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim();
newInspectionEquipment.Counts = this.txtCounts.Text.Trim();
newInspectionEquipment.Unit = this.txtUnit.Text.Trim();
newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim();

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Comprehensive {
public partial class InspectionEquipmentEdit {
namespace FineUIPro.Web.CQMS.Comprehensive
{
public partial class InspectionEquipmentEdit
{
/// <summary>
/// form1 控件。
/// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// drpUnitId 控件。
/// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
/// <summary>
/// txtInspectionCode 控件。
/// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtInspectionCode;
/// <summary>
/// txtEquipmentNo 控件。
/// </summary>
@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEquipmentNo;
/// <summary>
/// drpCNProfessionalId 控件。
/// </summary>
@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCNProfessionalId;
/// <summary>
/// txtInspectionName 控件。
/// </summary>
@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtInspectionName;
/// <summary>
/// txtSpecifications 控件。
/// </summary>
@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSpecifications;
/// <summary>
/// drpEquipmentOrMatail 控件。
/// </summary>
@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpEquipmentOrMatail;
/// <summary>
/// txtSupplier 控件。
/// </summary>
@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSupplier;
/// <summary>
/// txtCounts 控件。
/// </summary>
@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtCounts;
/// <summary>
/// txtUnit 控件。
/// </summary>
@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUnit;
/// <summary>
/// txtSamplingCount 控件。
/// </summary>
@ -137,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSamplingCount;
/// <summary>
/// drpSamplingResult 控件。
/// </summary>
@ -146,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpSamplingResult;
/// <summary>
/// drpAttribute 控件。
/// </summary>
@ -155,7 +157,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAttribute;
/// <summary>
/// txtInspectionDate 控件。
/// </summary>
@ -164,7 +166,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtInspectionDate;
/// <summary>
/// txtRemarkCode 控件。
/// </summary>
@ -172,8 +174,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtRemarkCode;
protected global::FineUIPro.TextBox txtRemarkCode;
/// <summary>
/// txtUsedPlace 控件。
/// </summary>
@ -182,7 +184,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtUsedPlace;
/// <summary>
/// Panel2 控件。
/// </summary>
@ -191,7 +193,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel2;
/// <summary>
/// Label1 控件。
/// </summary>
@ -200,7 +202,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// btnAttach 控件。
/// </summary>
@ -209,7 +211,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttach;
/// <summary>
/// drpAudit 控件。
/// </summary>
@ -218,7 +220,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpAudit;
/// <summary>
/// agree 控件。
/// </summary>
@ -227,7 +229,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow agree;
/// <summary>
/// rblIsAgree 控件。
/// </summary>
@ -236,7 +238,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblIsAgree;
/// <summary>
/// options 控件。
/// </summary>
@ -245,7 +247,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow options;
/// <summary>
/// txtidea 控件。
/// </summary>
@ -254,7 +256,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtidea;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@ -263,7 +265,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// hdAttachUrl 控件。
/// </summary>
@ -272,7 +274,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdAttachUrl;
/// <summary>
/// btnSave 控件。
/// </summary>
@ -281,7 +283,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
@ -290,7 +292,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary>
/// WindowAtt 控件。
/// </summary>

View File

@ -305,7 +305,7 @@ namespace FineUIPro.Web.Comprehensive
protected void btnOut_Click(object sender, EventArgs e)
{
string rootPath = Server.MapPath("~/");
string initTemplatePath = Const.InspectionMachineDataInUrl;
string initTemplatePath = Const.InspectionMachineTempUrl;
string uploadfilepath = string.Empty;
string newUrl = string.Empty;
uploadfilepath = rootPath + initTemplatePath;
@ -325,11 +325,10 @@ namespace FineUIPro.Web.Comprehensive
{
lists = lists.Where(x => x.InspectionType == this.sdrpType.SelectedValue);
}
lists = lists.OrderBy(x => x.RemarkCode);
lists = lists.OrderBy(x => x.UnitId);
if (lists != null)
{
string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("机具报验导入模板", "机具报验("+ projectName+DateTime.Now.ToString("yyyyMMdd")+ "");
newUrl = uploadfilepath.Replace("机具报验模板.xls", "机具报验.xls");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
NPOI.SS.UserModel.IWorkbook workbook;
@ -364,7 +363,7 @@ namespace FineUIPro.Web.Comprehensive
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
NPOI.SS.UserModel.ICell cell;
int i = 2;
int i = 1;
foreach (var item in lists)
{
// 第二步:创建新数据行
@ -450,28 +449,8 @@ namespace FineUIPro.Web.Comprehensive
cell = row.CreateCell(12);
cell.CellStyle = cellStyle;
string isK = string.Empty;
if (item.IsCheckOK.HasValue)//校验合格
{
if (item.IsCheckOK == true)
{
isK = "是";
}
else if (item.IsCheckOK == false)
{
isK = "否";
}
}
cell.SetCellValue(isK);
cell = row.CreateCell(13);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.LeaveDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.LeaveDate) : "");//离场时间
cell = row.CreateCell(14);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
i++;
}
// 第三步:写入文件流

View File

@ -126,7 +126,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 15);
AddDatasetToSQL(ds.Tables[0], 14);
hdCheckResult.Text = "1";
}
catch (Exception exc)
@ -173,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var cns = from x in Funs.DB.Base_CNProfessional select x;
for (int i = 1; i < ir; i++)
for (int i = 0; i < ir; i++)
{
Model.Comprehensive_InspectionMachine oldViewInfo = new Model.Comprehensive_InspectionMachine();
string row0 = pds.Rows[i][0].ToString().Trim();
@ -269,39 +269,20 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string row12 = pds.Rows[i][12].ToString();
if (!string.IsNullOrEmpty(row12))
{
if (row12 != "是" && row12 != "否")
try
{
result += (i + 2).ToString() + "," + "校验合格" + "," + "[" + row12 + "]错误!" + "|";
DateTime leaveDate = Convert.ToDateTime(row12);
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row12 + "]错误!" + "|";
}
}
string row13 = pds.Rows[i][13].ToString();
if (!string.IsNullOrEmpty(row13))
{
try
{
DateTime leaveDate = Convert.ToDateTime(row13);
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row13 + "]错误!" + "|";
}
}
string row14 = pds.Rows[i][14].ToString();
if (string.IsNullOrEmpty(row14))
if (string.IsNullOrEmpty(row13))
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
else
{
try
{
int t = Convert.ToInt32(row14);
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row14 + "]错误!" + "|";
}
}
}
else
{
@ -412,7 +393,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 15);
AddDatasetToSQL2(ds.Tables[0], 14);
}
catch (Exception ex)
{
@ -451,7 +432,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var cns = from x in Funs.DB.Base_CNProfessional select x;
for (int i = 1; i < ir; i++)
for (int i = 0; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString().Trim();
var unitInfo = units.Where(y => y.UnitName == row0).FirstOrDefault();
@ -459,7 +440,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
Model.Comprehensive_InspectionMachine oldViewInfo = new Model.Comprehensive_InspectionMachine();
oldViewInfo = oldViewInfos.FirstOrDefault(x => x.UnitId == unitInfo.UnitId
&& x.RemarkCode ==Funs.GetNewInt(pds.Rows[i][13].ToString().Trim()));
&& x.RemarkCode == pds.Rows[i][13].ToString().Trim());
if (oldViewInfo==null)
{
Model.Comprehensive_InspectionMachine Ins = new Model.Comprehensive_InspectionMachine();
@ -501,12 +482,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
Ins.UnitsCount = Convert.ToInt32(pds.Rows[i][11].ToString().Trim());
}
Ins.IsCheckOK = pds.Rows[i][12].ToString().Trim() == "是" ? true : false;
if (!string.IsNullOrEmpty(pds.Rows[i][13].ToString().Trim()))
if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim()))
{
Ins.LeaveDate = Convert.ToDateTime(pds.Rows[i][13].ToString().Trim());
Ins.LeaveDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim());
}
Ins.RemarkCode =Funs.GetNewInt(pds.Rows[i][14].ToString().Trim());
Ins.RemarkCode = pds.Rows[i][13].ToString().Trim();
Ins.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine));
Ins.CompileMan = this.CurrUser.UserId;
Ins.CompileDate = DateTime.Now.Date;
@ -553,12 +533,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
oldViewInfo.UnitsCount = Convert.ToInt32(pds.Rows[i][11].ToString().Trim());
}
oldViewInfo.IsCheckOK = pds.Rows[i][12].ToString().Trim() == "是" ? true : false;
if (!string.IsNullOrEmpty(pds.Rows[i][13].ToString().Trim()))
if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim()))
{
oldViewInfo.LeaveDate = Convert.ToDateTime(pds.Rows[i][13].ToString().Trim());
oldViewInfo.LeaveDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim());
}
oldViewInfo.RemarkCode = Funs.GetNewInt(pds.Rows[i][14].ToString().Trim());
oldViewInfo.RemarkCode = pds.Rows[i][13].ToString().Trim();
oldViewInfo.CompileMan = this.CurrUser.UserId;
oldViewInfo.CompileDate = DateTime.Now.Date;

View File

@ -89,7 +89,6 @@
</f:Button>
</Items>
</f:Panel>
<f:NumberBox ID="txtRemarkCode" runat="server" Label="标志编号" LabelAlign="Right" Required="true" ShowRedStar="true" NoDecimal="true" NoNegative="true" LabelWidth="110px"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow MarginTop="10px">

View File

@ -93,7 +93,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
drpAudit.SelectedValue = inspectionMachine.AuditMan;
}
this.txtRemarkCode.Text = inspectionMachine.RemarkCode.HasValue ? inspectionMachine.RemarkCode.ToString() : "";
var currApprove = InspectionMachineApproveService.GetCurrentApprove(inspectionMachine.InspectionMachineId);
if (currApprove != null)
{ //重新编制 编制人 可以 显示 提交 保存按钮
@ -151,8 +150,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtSpecificationModel.Readonly = true;
this.txtTestCycle.Readonly = true;
this.txtUnitsCount.Readonly = true;
this.drpAudit.Readonly = true;
this.txtRemarkCode.Readonly = true;
this.drpAudit.Readonly = true;
//this.btnAttach.Enabled = false;
}
@ -193,12 +191,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
Model.Comprehensive_InspectionMachine inspectionMachone = new Model.Comprehensive_InspectionMachine();
inspectionMachone.ProjectId = this.CurrUser.LoginProjectId;
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
@ -221,7 +213,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
inspectionMachone.IsCheckOK = this.rblIsCheckOK.SelectedValue == "true" ? true : false;
inspectionMachone.LeaveDate = Funs.GetNewDateTime(this.txtLeaveDate.Text);
inspectionMachone.UnitsCount = Funs.GetNewInt(this.txtUnitsCount.Text.Trim());
inspectionMachone.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue))
{
inspectionMachone.AuditMan = drpAudit.SelectedValue;
@ -268,12 +259,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
Model.Comprehensive_InspectionMachine inspectionMachone = new Model.Comprehensive_InspectionMachine();
inspectionMachone.ProjectId = this.CurrUser.LoginProjectId;
if (this.drpUnitId.SelectedValue != BLL.Const._Null)

View File

@ -192,15 +192,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// </remarks>
protected global::FineUIPro.Button btnAttach;
/// <summary>
/// txtRemarkCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtRemarkCode;
/// <summary>
/// drpAudit 控件。
/// </summary>

View File

@ -372,7 +372,7 @@ namespace FineUIPro.Web.Comprehensive
protected void btnOut_Click(object sender, EventArgs e)
{
string rootPath = Server.MapPath("~/");
string initTemplatePath = Const.InspectionPersonDataInUrl;
string initTemplatePath = Const.InspectionPersonTempUrl;
string uploadfilepath = string.Empty;
string newUrl = string.Empty;
uploadfilepath = rootPath + initTemplatePath;
@ -392,11 +392,10 @@ namespace FineUIPro.Web.Comprehensive
{
lists = lists.Where(x => x.PersonName.Contains(this.stxtPersonName.Text.Trim()));
}
lists = lists.OrderBy(x => x.RemarkCode);
lists = lists.OrderBy(x => x.UnitId);
if (lists != null)
{
string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("人员报验导入模板", "人员报验(" + projectName + DateTime.Now.ToString("yyyyMMdd") + "");
newUrl = uploadfilepath.Replace("人员报验模板.xls", "人员报验.xls");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
NPOI.SS.UserModel.IWorkbook workbook;
@ -431,7 +430,7 @@ namespace FineUIPro.Web.Comprehensive
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
NPOI.SS.UserModel.ICell cell;
int i = 2;
int i = 1;
foreach (var item in lists)
{
// 第二步:创建新数据行
@ -447,10 +446,6 @@ namespace FineUIPro.Web.Comprehensive
cell = row.CreateCell(2);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.PersonName);//姓名
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
string proName = string.Empty;
var cnp = BLL.CNProfessionalService.GetCNProfessional(item.CNProfessionalId);
if (cnp != null)
@ -459,7 +454,7 @@ namespace FineUIPro.Web.Comprehensive
}
cell.SetCellValue(proName);//专业
cell = row.CreateCell(4);
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
string unitWork = string.Empty;
if (!string.IsNullOrEmpty(item.UnitWorkId))
@ -468,19 +463,23 @@ namespace FineUIPro.Web.Comprehensive
}
cell.SetCellValue(unitWork);//单位工程名称
cell = row.CreateCell(5);
cell = row.CreateCell(4);
cell.CellStyle = cellStyle;
string postName = string.Empty;
if (!string.IsNullOrEmpty(item.PostId))
{
var post = BLL.PostService.GetPostById(item.PostId);
if (post != null)
if (post!=null)
{
postName = post.PostName;
}
}
cell.SetCellValue(postName);//工种
cell = row.CreateCell(5);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.PersonName);//姓名
cell = row.CreateCell(6);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.CertificateNumber);//证书编号
@ -499,42 +498,8 @@ namespace FineUIPro.Web.Comprehensive
cell = row.CreateCell(10);
cell.CellStyle = cellStyle;
string isO = string.Empty;
if (item.IsOnSite == true)//是否在场
{
isO = "是";
}
else
{
isO = "否";
}
cell.SetCellValue(isO);
cell = row.CreateCell(11);
cell.CellStyle = cellStyle;
string isT = string.Empty;
if (item.IsTrain == true)//是否培训
{
isT = "是";
}
else
{
isT = "否";
}
cell.SetCellValue(isT);
cell = row.CreateCell(12);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.DepartureTime.HasValue ? string.Format("{0:yyyy-MM-dd}", item.DepartureTime) : "");//离场时间
cell = row.CreateCell(13);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.Remark);//备注
cell = row.CreateCell(14);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
i++;
}
// 第三步:写入文件流

View File

@ -126,7 +126,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 15);
AddDatasetToSQL(ds.Tables[0], 13);
hdCheckResult.Text = "1";
}
catch (Exception exc)
@ -172,21 +172,28 @@ namespace FineUIPro.Web.CQMS.Comprehensive
select x;
var cns = from x in Funs.DB.Base_CNProfessional select x;
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
select x;
var posts = from x in Funs.DB.Base_Post select x;
for (int i = 1; i < ir; i++)
for (int i = 0; i < ir; i++)
{
Model.Comprehensive_InspectionPerson oldViewInfo = new Model.Comprehensive_InspectionPerson();
string row0 = pds.Rows[i][0].ToString().Trim();
var unitInfo = units.Where(y => y.UnitName == row0).FirstOrDefault();
if (unitInfo != null && !string.IsNullOrEmpty(row0))
{
/*oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId
&& x.PersonName == pds.Rows[i][2].ToString().Trim()
&& x.InspectionPersonCode == pds.Rows[i][1].ToString().Trim()
).FirstOrDefault();
if (oldViewInfo == null)
{
}
else
{
result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位人员报验编号已存在!" + "|";
}*/
string row1 = pds.Rows[i][1].ToString();
if (string.IsNullOrEmpty(row1))
{
@ -212,24 +219,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string row4 = pds.Rows[i][4].ToString();
if (!string.IsNullOrEmpty(row4))
{
string[] reunit = row4.Split(',');
foreach (string unitWork in reunit)
var post = posts.Where(x => x.PostName == row4.Trim()).FirstOrDefault();
if (post == null)
{
var u = unitWorks.Where(x => x.UnitWorkName == unitWork.Trim()).FirstOrDefault();
if (u == null)
{
result += (i + 2).ToString() + "," + "单位工程名称" + "," + "[" + unitWork.Trim() + "]不存在!" + "|";
}
result += (i + 2).ToString() + "," + "工种" + "," + "[" + row4 + "]不存在!" + "|";
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row5))
string row7 = pds.Rows[i][7].ToString();
if (!string.IsNullOrEmpty(row7))
{
var post = posts.Where(x => x.PostName == row5.Trim()).FirstOrDefault();
if (post == null)
try
{
result += (i + 2).ToString() + "," + "工种" + "," + "[" + row5 + "]不存在!" + "|";
DateTime date = Convert.ToDateTime(row7.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "有效期" + "," + "[" + row7 + "]错误!" + "|";
}
}
@ -242,69 +248,36 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "有效期" + "," + "[" + row8 + "]错误!" + "|";
result += (i + 2).ToString() + "," + "批准时间" + "," + "[" + row8 + "]错误!" + "|";
}
}
string row9 = pds.Rows[i][9].ToString();
string row9 = pds.Rows[i][9].ToString().Trim();
if (!string.IsNullOrEmpty(row9))
{
try
if (row9 != "是" && row9 != "否")
{
DateTime date = Convert.ToDateTime(row9.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "批准时间" + "," + "[" + row9 + "]错误!" + "|";
result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row9 + "]错误!" + "|";
}
}
string row10 = pds.Rows[i][10].ToString().Trim();
string row10 = pds.Rows[i][10].ToString();
if (!string.IsNullOrEmpty(row10))
{
if (row10 != "是" && row10 != "否")
{
result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row10 + "]错误!" + "|";
}
}
string row11 = pds.Rows[i][11].ToString().Trim();
if (!string.IsNullOrEmpty(row11))
{
if (row11 != "是" && row11 != "否")
{
result += (i + 2).ToString() + "," + "培训" + "," + "[" + row11 + "]错误!" + "|";
}
}
string row12 = pds.Rows[i][12].ToString();
if (!string.IsNullOrEmpty(row12))
{
try
{
DateTime date = Convert.ToDateTime(row12.Trim());
DateTime date = Convert.ToDateTime(row10.Trim());
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row12 + "]错误!" + "|";
result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row10 + "]错误!" + "|";
}
}
string row14 = pds.Rows[i][14].ToString();
if (string.IsNullOrEmpty(row14))
string row12 = pds.Rows[i][12].ToString();
if (string.IsNullOrEmpty(row12))
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
else
{
try
{
int t = Convert.ToInt32(row14);
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row14 + "]错误!" + "|";
}
}
}
else
{
@ -415,7 +388,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 15);
AddDatasetToSQL2(ds.Tables[0], 13);
}
catch (Exception ex)
{
@ -453,15 +426,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
select x;
var cns = from x in Funs.DB.Base_CNProfessional select x;
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
select x;
var posts = from x in Funs.DB.Base_Post select x;
for (int i = 1; i < ir; i++)
for (int i = 0; i < ir; i++)
{
Model.Comprehensive_InspectionPerson oldViewInfo = new Model.Comprehensive_InspectionPerson();
string row0 = pds.Rows[i][0].ToString().Trim();
@ -469,7 +436,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
if (unitInfo != null && !string.IsNullOrEmpty(row0))
{
oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId
&& x.RemarkCode == Funs.GetNewInt(pds.Rows[i][14].ToString().Trim())
&& x.RemarkCode == pds.Rows[i][12].ToString().Trim()
).FirstOrDefault();
if (oldViewInfo == null)
{
@ -483,37 +450,37 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId;
}
if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim()))
{
Ins.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][4].ToString().Trim());
Ins.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][4].ToString().Trim()).PostId;
}
if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim()))
Ins.CertificateNumber = pds.Rows[i][5].ToString().Trim();
Ins.QualifiedProjectCode = pds.Rows[i][6].ToString().Trim();
if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim()))
{
Ins.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][5].ToString().Trim()).PostId;
Ins.ValidityDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim());
}
Ins.CertificateNumber = pds.Rows[i][6].ToString().Trim();
Ins.QualifiedProjectCode = pds.Rows[i][7].ToString().Trim();
if (!string.IsNullOrEmpty(pds.Rows[i][8].ToString().Trim()))
{
Ins.ValidityDate = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim());
Ins.ApprovalTime = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim());
}
if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim()))
Ins.IsOnSite = pds.Rows[i][9].ToString().Trim() == "是" ? true : false;
if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim()))
{
Ins.ApprovalTime = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim());
Ins.DepartureTime = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim());
}
Ins.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false;
Ins.IsTrain= pds.Rows[i][11].ToString().Trim() == "是" ? true : false;
if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim()))
{
Ins.DepartureTime = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim());
}
Ins.Remark = pds.Rows[i][13].ToString().Trim();
Ins.RemarkCode =Funs.GetNewInt(pds.Rows[i][14].ToString().Trim());
Ins.Remark = pds.Rows[i][11].ToString().Trim();
Ins.RemarkCode = pds.Rows[i][12].ToString().Trim();
Ins.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
Ins.CompileMan = this.CurrUser.UserId;
Ins.CompileDate = DateTime.Now.Date;
Ins.Status = BLL.Const.Comprehensive_Compile;
Ins.IsTrain = true;
BLL.InspectionPersonService.AddInspectionPerson(Ins);
if (pds.Rows[i][4].ToString().Trim() == "焊工")
{
@ -543,37 +510,36 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
oldViewInfo.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId;
}
if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim()))
{
oldViewInfo.UnitWorkId = BLL.UnitWorkService.GetUnitWorkIdsByUnitWorkNames(this.CurrUser.LoginProjectId, pds.Rows[i][4].ToString().Trim());
oldViewInfo.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][4].ToString().Trim()).PostId;
}
if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim()))
oldViewInfo.CertificateNumber = pds.Rows[i][5].ToString().Trim();
oldViewInfo.QualifiedProjectCode = pds.Rows[i][6].ToString().Trim();
if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim()))
{
oldViewInfo.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][5].ToString().Trim()).PostId;
oldViewInfo.ValidityDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim());
}
oldViewInfo.CertificateNumber = pds.Rows[i][6].ToString().Trim();
oldViewInfo.QualifiedProjectCode = pds.Rows[i][7].ToString().Trim();
if (!string.IsNullOrEmpty(pds.Rows[i][8].ToString().Trim()))
{
oldViewInfo.ValidityDate = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim());
oldViewInfo.ApprovalTime = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim());
}
if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim()))
{
oldViewInfo.ApprovalTime = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim());
}
oldViewInfo.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false;
oldViewInfo.IsTrain = pds.Rows[i][11].ToString().Trim() == "是" ? true : false;
if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim()))
{
oldViewInfo.DepartureTime = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim());
}
oldViewInfo.Remark = pds.Rows[i][13].ToString().Trim();
oldViewInfo.RemarkCode = Funs.GetNewInt(pds.Rows[i][14].ToString().Trim());
oldViewInfo.IsOnSite = pds.Rows[i][9].ToString().Trim() == "是" ? true : false;
if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim()))
{
oldViewInfo.DepartureTime = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim());
}
oldViewInfo.Remark = pds.Rows[i][11].ToString().Trim();
oldViewInfo.RemarkCode= pds.Rows[i][12].ToString().Trim();
oldViewInfo.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
oldViewInfo.CompileMan = this.CurrUser.UserId;
oldViewInfo.CompileDate = DateTime.Now.Date;
oldViewInfo.Status = BLL.Const.Comprehensive_Compile;
oldViewInfo.IsTrain = true;
BLL.InspectionPersonService.UpdateInspectionPerson(oldViewInfo);
if (pds.Rows[i][4].ToString().Trim() == "焊工")
{

View File

@ -72,7 +72,7 @@
<f:RadioItem Text="是" Value="true" Selected="true" />
<f:RadioItem Text="否" Value="false" />
</f:RadioButtonList>
<f:NumberBox ID="txtRemarkCode" runat="server" Label="标志编号" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true" NoDecimal="true" NoNegative="true"></f:NumberBox>
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="150" LabelWidth="150px" LabelAlign="Right"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
@ -86,7 +86,6 @@
</f:Button>
</Items>
</f:Panel>
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="150" LabelWidth="150px" LabelAlign="Right"></f:TextBox>
</Items>
</f:FormRow>

View File

@ -106,7 +106,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.drpUnitWorkIds.SelectedValueArray = inspectionPerson.UnitWorkId.Split(',');
}
this.txtRemark.Text = inspectionPerson.Remark;
this.txtRemarkCode.Text = inspectionPerson.RemarkCode.HasValue ? inspectionPerson.RemarkCode.ToString() : "";
var currApprove = InspectionPersonApproveService.GetCurrentApprove(inspectionPerson.InspectionPersonId);
@ -173,8 +172,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtValidityDate.Readonly = true;
this.drpPostId.Readonly = true;
this.drpAudit.Readonly = true;
this.drpUnitWorkIds.Readonly = true;
this.txtRemarkCode.Readonly = true;
this.drpUnitWorkIds.Readonly = true;
//this.btnAttach.Enabled = false;
}
@ -225,12 +223,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
return;
}
}
var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
// 焊工部分
Model.BS_Welder welder = new Model.BS_Welder();
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
@ -315,7 +307,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
inspectionPerson.DepartureTime = Convert.ToDateTime(this.txtDepartureTime.Text.ToString());
}
inspectionPerson.Remark = this.txtRemark.Text.Trim();
inspectionPerson.RemarkCode =Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
string ids = string.Empty;
var lists = this.drpUnitWorkIds.SelectedValueArray;
foreach (var item in lists)
@ -410,12 +401,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
return;
}
}
var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
// 焊工部分
Model.BS_Welder welder = new Model.BS_Welder();
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
@ -501,7 +486,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
inspectionPerson.DepartureTime = Convert.ToDateTime(this.txtDepartureTime.Text.ToString());
}
inspectionPerson.Remark = this.txtRemark.Text.Trim();
inspectionPerson.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
string ids = string.Empty;
var lists = this.drpUnitWorkIds.SelectedValueArray;
foreach (var item in lists)

View File

@ -166,13 +166,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
protected global::FineUIPro.RadioButtonList rblIsTrain;
/// <summary>
/// txtRemarkCode 控件。
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtRemarkCode;
protected global::FineUIPro.TextBox txtRemark;
/// <summary>
/// Panel2 控件。
@ -201,15 +201,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// </remarks>
protected global::FineUIPro.Button btnAttach;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRemark;
/// <summary>
/// drpAudit 控件。
/// </summary>

View File

@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
protected void btnOut_Click(object sender, EventArgs e)
{
string rootPath = Server.MapPath("~/");
string initTemplatePath = Const.CQMS_TrainingRecordsTemplateUrl;
string initTemplatePath = Const.TrainingRecordsTempUrl;
string uploadfilepath = string.Empty;
string newUrl = string.Empty;
uploadfilepath = rootPath + initTemplatePath;
@ -228,11 +228,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
lists = lists.Where(x => x.TrainingContents.Contains(this.txtTrainingContents.Text.Trim()));
}
lists = lists.OrderBy(x => x.RemarkCode);
if (lists != null)
{
string projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
newUrl = uploadfilepath.Replace("培训记录导入模板", "培训记录(" + projectName + DateTime.Now.ToString("yyyyMMdd") + "");
newUrl = uploadfilepath.Replace("培训记录模板.xls", "培训记录.xls");
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
NPOI.SS.UserModel.IWorkbook workbook;
@ -267,7 +265,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
NPOI.SS.UserModel.ICell cell;
int i = 2;
int i = 1;
foreach (var item in lists)
{
// 第二步:创建新数据行
@ -306,11 +304,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
cell = row.CreateCell(6);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.Remark);//备注
cell = row.CreateCell(7);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.RemarkCode.HasValue ? item.RemarkCode.ToString() : "");//标志编号
i++;
}
// 第三步:写入文件流

View File

@ -165,7 +165,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var cns = from x in Funs.DB.Base_CNProfessional select x;
for (int i = 1; i < ir; i++)
for (int i = 0; i < ir; i++)
{
string row0 = pds.Rows[i][0].ToString();
if (string.IsNullOrEmpty(row0))
@ -217,17 +217,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
}
else
{
try
{
int t = Convert.ToInt32(row7);
}
catch (Exception)
{
result += (i + 2).ToString() + "," + "标志编号" + "," + "[" + row7 + "]错误!" + "|";
}
}
}
if (!string.IsNullOrEmpty(result))
{
@ -367,13 +356,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var cns = from x in Funs.DB.Base_CNProfessional select x;
for (int i = 1; i < ir; i++)
for (int i = 0; i < ir; i++)
{
Model.Comprehensive_TrainingRecords oldViewInfo = new Model.Comprehensive_TrainingRecords();
string row1 = pds.Rows[i][1].ToString().Trim();
var cn = cns.Where(y => y.ProfessionalName == row1).FirstOrDefault();
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == Funs.GetNewInt(pds.Rows[i][7].ToString().Trim())
oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][7].ToString().Trim()
).FirstOrDefault();
if (oldViewInfo == null)
{
@ -390,7 +379,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
des.KeynoteSpeaker = pds.Rows[i][5].ToString().Trim();
des.Remark = pds.Rows[i][6].ToString().Trim();
des.RemarkCode = Funs.GetNewInt(pds.Rows[i][7].ToString().Trim());
des.RemarkCode = pds.Rows[i][7].ToString().Trim();
BLL.TrainingRecordsService.AddTrainingRecords(des);
}
}

View File

@ -42,11 +42,6 @@
<f:TextBox ID="txtKeynoteSpeaker" runat="server" Label="主讲人" MaxLength="50" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtRemarkCode" runat="server" Label="标志编号" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px" NoDecimal="true" NoNegative="true"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtRemark" runat="server" Label="备注" MaxLength="50" LabelAlign="Right" LabelWidth="130px"></f:TextArea>

View File

@ -50,7 +50,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.txtHours.Text = trainingRecords.Hours.HasValue ? trainingRecords.Hours.ToString() : "";
this.txtKeynoteSpeaker.Text = trainingRecords.KeynoteSpeaker;
this.txtRemark.Text = trainingRecords.Remark;
this.txtRemarkCode.Text = trainingRecords.RemarkCode.HasValue ? trainingRecords.RemarkCode.ToString() : "";
}
}
}
@ -69,12 +68,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning);
return;
}
var q = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.TrainingRecordsId != this.TrainingRecordsId || (this.TrainingRecordsId == null && x.TrainingRecordsId != null)));
if (q != null)
{
Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning);
return;
}
Model.Comprehensive_TrainingRecords trainingRecords = new Model.Comprehensive_TrainingRecords();
trainingRecords.CNProfessionalId = this.drpCNProfessionalId.SelectedValue;
trainingRecords.TrainingContents = this.txtTrainingContents.Text.Trim();
@ -83,7 +76,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
trainingRecords.Hours = Funs.GetNewDecimal(this.txtHours.Text.Trim());
trainingRecords.KeynoteSpeaker = this.txtKeynoteSpeaker.Text.Trim();
trainingRecords.Remark = this.txtRemark.Text.Trim();
trainingRecords.RemarkCode = Funs.GetNewInt(this.txtRemarkCode.Text.Trim());
if (!string.IsNullOrEmpty(this.TrainingRecordsId))
{
trainingRecords.TrainingRecordsId = this.TrainingRecordsId;

View File

@ -93,15 +93,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive {
/// </remarks>
protected global::FineUIPro.TextBox txtKeynoteSpeaker;
/// <summary>
/// txtRemarkCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtRemarkCode;
/// <summary>
/// txtRemark 控件。
/// </summary>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort />

View File

@ -87256,7 +87256,7 @@ namespace Model
private System.Nullable<System.DateTime> _CompileDate;
private System.Nullable<int> _RemarkCode;
private string _RemarkCode;
private EntityRef<Base_CNProfessional> _Base_CNProfessional;
@ -87294,7 +87294,7 @@ namespace Model
partial void OnCompileManChanged();
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
partial void OnCompileDateChanged();
partial void OnRemarkCodeChanging(System.Nullable<int> value);
partial void OnRemarkCodeChanging(string value);
partial void OnRemarkCodeChanged();
#endregion
@ -87563,8 +87563,8 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
public System.Nullable<int> RemarkCode
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
public string RemarkCode
{
get
{
@ -89545,7 +89545,7 @@ namespace Model
private string _AuditMan;
private System.Nullable<int> _RemarkCode;
private string _RemarkCode;
private EntityRef<Base_CNProfessional> _Base_CNProfessional;
@ -89609,7 +89609,7 @@ namespace Model
partial void OnStatusChanged();
partial void OnAuditManChanging(string value);
partial void OnAuditManChanged();
partial void OnRemarkCodeChanging(System.Nullable<int> value);
partial void OnRemarkCodeChanging(string value);
partial void OnRemarkCodeChanged();
#endregion
@ -90134,8 +90134,8 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
public System.Nullable<int> RemarkCode
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
public string RemarkCode
{
get
{
@ -93794,7 +93794,7 @@ namespace Model
private string _EquipmentNO;
private System.Nullable<int> _RemarkCode;
private string _RemarkCode;
private string _UsedPlace;
@ -93850,7 +93850,7 @@ namespace Model
partial void OnCompileDateChanged();
partial void OnEquipmentNOChanging(string value);
partial void OnEquipmentNOChanged();
partial void OnRemarkCodeChanging(System.Nullable<int> value);
partial void OnRemarkCodeChanging(string value);
partial void OnRemarkCodeChanged();
partial void OnUsedPlaceChanging(string value);
partial void OnUsedPlaceChanged();
@ -94206,8 +94206,8 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
public System.Nullable<int> RemarkCode
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
public string RemarkCode
{
get
{
@ -94771,7 +94771,7 @@ namespace Model
private string _AuditMan;
private System.Nullable<int> _RemarkCode;
private string _RemarkCode;
private EntityRef<Base_CNProfessional> _Base_CNProfessional;
@ -94825,7 +94825,7 @@ namespace Model
partial void OnStatusChanged();
partial void OnAuditManChanging(string value);
partial void OnAuditManChanged();
partial void OnRemarkCodeChanging(System.Nullable<int> value);
partial void OnRemarkCodeChanging(string value);
partial void OnRemarkCodeChanged();
#endregion
@ -95269,8 +95269,8 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
public System.Nullable<int> RemarkCode
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
public string RemarkCode
{
get
{
@ -95714,7 +95714,7 @@ namespace Model
private string _AuditMan;
private System.Nullable<int> _RemarkCode;
private string _RemarkCode;
private EntityRef<Base_Post> _Base_Post;
@ -95776,7 +95776,7 @@ namespace Model
partial void OnStatusChanged();
partial void OnAuditManChanging(string value);
partial void OnAuditManChanged();
partial void OnRemarkCodeChanging(System.Nullable<int> value);
partial void OnRemarkCodeChanging(string value);
partial void OnRemarkCodeChanged();
#endregion
@ -96228,8 +96228,8 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
public System.Nullable<int> RemarkCode
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
public string RemarkCode
{
get
{
@ -102807,7 +102807,7 @@ namespace Model
private string _Remark;
private System.Nullable<int> _RemarkCode;
private string _RemarkCode;
private EntityRef<Base_CNProfessional> _Base_CNProfessional;
@ -102835,7 +102835,7 @@ namespace Model
partial void OnKeynoteSpeakerChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
partial void OnRemarkCodeChanging(System.Nullable<int> value);
partial void OnRemarkCodeChanging(string value);
partial void OnRemarkCodeChanged();
#endregion
@ -103034,8 +103034,8 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="Int")]
public System.Nullable<int> RemarkCode
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RemarkCode", DbType="NVarChar(50)")]
public string RemarkCode
{
get
{

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />