This commit is contained in:
2025-12-08 09:24:37 +08:00
parent f7d3bb3e30
commit c750debcd2
58 changed files with 4308 additions and 341 deletions
+237 -25
View File
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace BLL.APIService
{
public class SyncUserInfoService
public class SyncUserInfoService
{
private const string GETTOKENAPI = "https://ppsintf.basf-ypc.net.cn/ppsinterface/token/getToken";
private const string GETHRINfOAPI = "https://ppsintf.basf-ypc.net.cn/ppsinterface/interfaceInfo/getHrInfo";
@@ -28,25 +28,29 @@ namespace BLL.APIService
}
}
/// <summary>
/// 获取HR信息并进行逻辑处理
/// </summary>
public static void GetSyncUserInfo()
{
//var token = GetUserToken(); //获取接口token
var token = GetUserToken(); //获取接口token
var dic = GetDepartList(); //把本地数据库中的部门全部取出作为字典
var dicUser = GetUserInfoByAccount(); //同上把所有用户取出来
string file = System.Web.HttpContext.Current.Server.MapPath("~/data.txt");
string result = System.IO.File.ReadAllText(file);
//string result = BLL.Common.HttpHelper.HttpPostRequest(GETHRINfOAPI, "", token);
//string file = System.Web.HttpContext.Current.Server.MapPath("~/data.txt");
//string result = System.IO.File.ReadAllText(file);
string result = BLL.Common.HttpHelper.HttpPostRequest(GETHRINfOAPI, "", token);
var data = JsonHelper.DeserializeJsonToObject<ResultData<List<UserInfo>>>(result);
List<Model.SyncDataUserLogs> logList = new List<Model.SyncDataUserLogs>();
if (data.code == "200")
{
//ErrLogInfo.WriteLog($"userinfo={data.data}");
ErrLogInfo.WriteLog($"userinfo={data.data}");
var userInfo = data.data;
string batchNo= DateTime.Now.ToString("yyyyMMddHHmmss");
string batchNo = DateTime.Now.ToString("yyyyMMddHHmmss");
DateTime syncTime = DateTime.Now;
foreach (var item in userInfo)
{
if (item.ppsHrOtherEmp==null || string.IsNullOrEmpty(item.ppsHrOtherEmp.bgdid))
if (item.ppsHrOtherEmp == null || string.IsNullOrEmpty(item.ppsHrOtherEmp.bgdid))
{
Model.SyncDataUserLogs log3 = new Model.SyncDataUserLogs();
log3.BatchNo = batchNo;
@@ -87,7 +91,7 @@ namespace BLL.APIService
departId = InsertDepartInfo(dic, userId, item.section); //插入本地数据库部门
}
}
else if((item.section.ToUpper() == "CTT" && item.position.Contains("Manager")) || item.section.ToUpper() == "CTT" && item.position.Contains("General Manager"))
else if ((item.section.ToUpper() == "CTT" && item.position.Contains("Manager")) || item.section.ToUpper() == "CTT" && item.position.Contains("General Manager"))
{
//不处理
//判断是否存在部门
@@ -107,11 +111,16 @@ namespace BLL.APIService
if (IsExistsDepart(dic, item.section))
{
departId = dic[item.section]; //取出本地数据库部门ID
UpdateDepartInfo(userId, item.section); //更新部门表数据
//eftEffectiveDate有值说明此人已离职
if (!item.ppsHrOtherEmp.leftEffectiveDate.HasValue)
{
UpdateDepartInfo(userId, item.section); //更新部门表数据
}
}
else
{
departId = InsertDepartInfo(dic,userId, item.section); //插入本地数据库部门
departId = InsertDepartInfo(dic, userId, item.section); //插入本地数据库部门
}
}
else
@@ -127,11 +136,14 @@ namespace BLL.APIService
if (IsExistsDepart(dic, itemDepartCode))
{
departId = dic[itemDepartCode]; //取出自身部门所在的部门ID
UpdateDepartInfo(itemUserId, itemDepartCode); //更新自身部门的部门数据。
if (!item.ppsHrOtherEmp.leftEffectiveDate.HasValue)
{
UpdateDepartInfo(itemUserId, itemDepartCode); //更新自身部门的部门数据。
}
}
else
{
departId = InsertDepartInfo(dic,itemUserId, itemDepartCode); //插入本地部门表数据
departId = InsertDepartInfo(dic, itemUserId, itemDepartCode); //插入本地部门表数据
}
}
else
@@ -149,17 +161,19 @@ namespace BLL.APIService
//上级用户所在的部门已经存在
if (IsExistsDepart(dic, parentDepatCode))
{
//departId = dic[parentDepatCode]; //取出他上级用户所在的部门ID
UpdateDepartInfo(parentUserId, parentDepatCode); //更新部门信息
//departId = dic[parentDepatCode]; //取出他上级用户所在的部门ID
if (!parentUser.ppsHrOtherEmp.leftEffectiveDate.HasValue)
{
UpdateDepartInfo(parentUserId, parentDepatCode); //更新部门信息
}
//并且插入自己子部门信息
departId=InsertDepartInfoChilds(dic,parentUserId, item.section);
departId = InsertDepartInfoChilds(dic, parentUserId, item.section);
}
else
{
departId = InsertDepartInfo(dic,parentUserId, parentDepatCode); //插入他上级用户所在的部门到部门表中去
departId = InsertDepartInfo(dic, parentUserId, parentDepatCode); //插入他上级用户所在的部门到部门表中去
}
}
}
log.DepatId = departId;
@@ -181,7 +195,7 @@ namespace BLL.APIService
#region
Model.SyncDataUserLogs log2 = new Model.SyncDataUserLogs();
string resultId = string.Empty;
try
{
log2.BatchNo = batchNo;
@@ -197,7 +211,7 @@ namespace BLL.APIService
}
else
{
resultId = UpdateUserInfo(item, departId);
log.UserId = resultId;
log.DataType = 1; //同步用户类型数据
@@ -209,13 +223,13 @@ namespace BLL.APIService
{
log.UserId = resultId;
log.DataType = 1;
log2.Remark =$"同步失败:{ex.Message}";
log2.Remark = $"同步失败:{ex.Message}";
log2.IsSuccess = false;
}
//这里记录同步用户的日志
logList.Add(log2);
#endregion
}
@@ -227,6 +241,205 @@ namespace BLL.APIService
}
}
//public static void GetSyncUserInfo1()
//{
// var token = GetUserToken(); //获取接口token
// var dic = GetDepartList(); //把本地数据库中的部门全部取出作为字典
// var dicUser = GetUserInfoByAccount(); //同上把所有用户取出来
// //string file = System.Web.HttpContext.Current.Server.MapPath("~/data.txt");
// //string result = System.IO.File.ReadAllText(file);
// string result = BLL.Common.HttpHelper.HttpPostRequest(GETHRINfOAPI, "", token);
// var data = JsonHelper.DeserializeJsonToObject<ResultData<List<UserInfo>>>(result);
// List<Model.SyncDataUserLogs> logList = new List<Model.SyncDataUserLogs>();
// if (data.code == "200")
// {
// //ErrLogInfo.WriteLog($"userinfo={data.data}");
// var userInfo = data.data;
// string batchNo= DateTime.Now.ToString("yyyyMMddHHmmss");
// DateTime syncTime = DateTime.Now;
// foreach (var item in userInfo)
// {
// if (item.ppsHrOtherEmp==null || string.IsNullOrEmpty(item.ppsHrOtherEmp.bgdid))
// {
// Model.SyncDataUserLogs log3 = new Model.SyncDataUserLogs();
// log3.BatchNo = batchNo;
// log3.CreatedTime = syncTime;
// log3.DataType = 3; //错误在账号信息类型
// log3.DepatId = string.Empty;
// log3.UserId = string.Empty;
// log3.IsSuccess = false;
// log3.Remark = $"当前账号为空:{JsonHelper.SerializeObject(item)}";
// logList.Add(log3);
// continue;
// }
// var account = item.ppsHrOtherEmp.bgdid;// 当前json的账号
// var manager = item.ppsHrOtherEmp.manager; //当前经理的员工号
// account = account.ToLower();
// var user = dicUser.ContainsKey(account); //判断当前账号是否在我们数据库中
// string userId = user ? dicUser[account] : null; //存在那就是把用户id取出来,否则用户id就是null
// #region 同步部门
// //部门id
// string departId = "";
// Model.SyncDataUserLogs log = new Model.SyncDataUserLogs();
// try
// {
// log.BatchNo = batchNo;
// log.CreatedTime = syncTime;
// //如果是经理,总经理,总监
// if (item.section.ToUpper() == "CTT" && item.position.Contains("Director"))
// {
// //判断是否存在部门
// if (IsExistsDepart(dic, item.section))
// {
// departId = dic[item.section]; //取出本地数据库部门ID
// UpdateDepartInfo(userId, item.section); //更新部门表数据
// }
// else
// {
// departId = InsertDepartInfo(dic, userId, item.section); //插入本地数据库部门
// }
// }
// else if((item.section.ToUpper() == "CTT" && item.position.Contains("Manager")) || item.section.ToUpper() == "CTT" && item.position.Contains("General Manager"))
// {
// //不处理
// //判断是否存在部门
// if (IsExistsDepart(dic, item.section))
// {
// departId = dic[item.section]; //取出本地数据库部门ID
// // UpdateDepartInfo(null, item.section); //更新部门表数据
// }
// else
// {
// departId = InsertDepartInfo(dic, null, item.section); //插入本地数据库部门
// }
// }
// else if ((item.position.Contains("Manager") || item.position.Contains("Director") || item.position.Contains("General Manager")))
// {
// //判断是否存在部门
// if (IsExistsDepart(dic, item.section))
// {
// departId = dic[item.section]; //取出本地数据库部门ID
// UpdateDepartInfo(userId, item.section); //更新部门表数据
// }
// else
// {
// departId = InsertDepartInfo(dic,userId, item.section); //插入本地数据库部门
// }
// }
// else
// {
// //查找当前用户的上级经理是谁
// var parentUser = userInfo.Where(t => t.ppsHrOtherEmp.bycstaffNo == manager).FirstOrDefault();
// if (parentUser == null)
// {
// //找不到就是他自己
// string itemDepartCode = item.section.ToUpper();
// string itemUserId = userId;
// //判断当前自身的部门是否存在
// if (IsExistsDepart(dic, itemDepartCode))
// {
// departId = dic[itemDepartCode]; //取出自身部门所在的部门ID
// UpdateDepartInfo(itemUserId, itemDepartCode); //更新自身部门的部门数据。
// }
// else
// {
// departId = InsertDepartInfo(dic,itemUserId, itemDepartCode); //插入本地部门表数据
// }
// }
// else
// {
// //找到了就是上级的用户部门+LeaderID;
// string parentDepatCode = parentUser.section.ToUpper(); //上级部门编号
// string parentAccount = parentUser.ppsHrOtherEmp.bgdid; //上级用户的账号
// if (!string.IsNullOrEmpty(parentAccount))
// parentAccount = parentAccount.ToLower();
// else
// parentAccount = string.Empty;
// var parentLocalUser = dicUser.ContainsKey(parentAccount); //查找本地数据库的上级用户是否存在
// string parentUserId = parentLocalUser ? dicUser[parentAccount] : null;
// //上级用户所在的部门已经存在
// if (IsExistsDepart(dic, parentDepatCode))
// {
// //departId = dic[parentDepatCode]; //取出他上级用户所在的部门ID
// UpdateDepartInfo(parentUserId, parentDepatCode); //更新部门信息
// //并且插入自己子部门信息
// departId=InsertDepartInfoChilds(dic,parentUserId, item.section);
// }
// else
// {
// departId = InsertDepartInfo(dic,parentUserId, parentDepatCode); //插入他上级用户所在的部门到部门表中去
// }
// }
// }
// log.DepatId = departId;
// log.DataType = 0; //同步部门类型数据
// log.Remark = "同步成功";
// log.IsSuccess = true;
// }
// catch (Exception ex)
// {
// log.DepatId = departId;
// log.DataType = 0;
// log.Remark = ex.Message;
// log.IsSuccess = false;
// }
// //这里记录同步部门的日志
// logList.Add(log);
// #endregion
// #region 同步用户
// Model.SyncDataUserLogs log2 = new Model.SyncDataUserLogs();
// string resultId = string.Empty;
// try
// {
// log2.BatchNo = batchNo;
// log2.CreatedTime = syncTime;
// log2.Josn = JsonHelper.SerializeObject(item);
// //当前本地数据库用户表不存在此用户
// if (!user)
// {
// //插入
// resultId = InsertUserInfo(item, departId);
// log.UserId = resultId;
// log.DataType = 1;
// }
// else
// {
// resultId = UpdateUserInfo(item, departId);
// log.UserId = resultId;
// log.DataType = 1; //同步用户类型数据
// }
// log2.Remark = "同步成功";
// log2.IsSuccess = true;
// }
// catch (Exception ex)
// {
// log.UserId = resultId;
// log.DataType = 1;
// log2.Remark =$"同步失败:{ex.Message}";
// log2.IsSuccess = false;
// }
// //这里记录同步用户的日志
// logList.Add(log2);
// #endregion
// }
// AddSyncLogs(logList);
// }
// else
// {
// ErrLogInfo.WriteLog("请求失败:返回结果:" + result);
// }
//}
#region
/// <summary>
/// 获取所有的BU
@@ -236,9 +449,7 @@ namespace BLL.APIService
{
return BLL.Funs.DB.Base_Depart.ToList()
.ToDictionary(t => t.DepartCode.ToUpper(), t => t.DepartId);
}
}
/// <summary>
/// 获取所有的User
@@ -309,6 +520,7 @@ namespace BLL.APIService
}
return result.DepartId;
}
/// <summary>
/// 判断是否存在BU
/// </summary>
+1 -1
View File
@@ -41,7 +41,7 @@ namespace BLL.Common
/// <returns></returns>
public static string HttpPostRequest(string url, string postJsonData,string token)
{
//BLL.ErrLogInfo.WriteLog("token=" + token);
BLL.ErrLogInfo.WriteLog("token=" + token);
string strPostReponse = string.Empty;
try
{
+4 -4
View File
@@ -221,7 +221,7 @@ namespace BLL.Common
/// <param name="mailCC">抄送(多个抄送人用""隔开,最后一个不能有"")</param>
/// <param name="sendNum">发送次数</param>
/// <param name="resultMessage">输出信息</param>
public static bool SendNetMail2(EmailPop ps, string mailFrom, string[] mailTo, string mailSubject, string mailBody, string mailPriority, string[] mailCC, string sendNum, out string resultMessage)
public static bool SendNetMail2(EmailPop ps, string mailFrom, string[] mailTo, string mailSubject, string mailBody, string mailPriority, string[] mailCC, out string resultMessage)
{
var englishmonth = DateTime.Now.ToString("MMMM", CultureInfo.CreateSpecificCulture("en-GB"));
bool result = true;
@@ -303,8 +303,8 @@ namespace BLL.Common
{
Model.SendEmail newSendEmail = new Model.SendEmail();
newSendEmail.EmailId = Guid.NewGuid().ToString();
newSendEmail.EmailTile = mailSubject + sendNum;
newSendEmail.EmailContent = ReplaceHtmlTag(mailBody) + sendNum;
newSendEmail.EmailTile = mailSubject;
newSendEmail.EmailContent = ReplaceHtmlTag(mailBody);
newSendEmail.EmailURL = send;
newSendEmail.EmailName = send;
@@ -328,7 +328,7 @@ namespace BLL.Common
{
Model.SendEmail newSendEmail = new Model.SendEmail();
newSendEmail.EmailId = Guid.NewGuid().ToString();
newSendEmail.EmailTile = mailSubject + sendNum;
newSendEmail.EmailTile = mailSubject;
newSendEmail.EmailContent = ReplaceHtmlTag(mailBody);
newSendEmail.EmailURL = send;
newSendEmail.EmailName = send;
+21
View File
@@ -73,6 +73,27 @@ namespace BLL
}
}
/// <summary>
/// 增加ToDo
/// </summary>
/// <param name="todo"></param>
public static void AddToDo(Model.FC_ToDo todo)
{
Model.FC_ToDo newToDo = new Model.FC_ToDo();
newToDo.ToDoId = SQLHelper.GetNewID(typeof(Model.FC_ToDo));
newToDo.FO_NO = todo.FO_NO;
newToDo.ContractId = todo.ContractId;
newToDo.ToDoMan = todo.ToDoMan;
newToDo.ViolationBehavior = todo.ViolationBehavior;
newToDo.Result = todo.Result;
newToDo.IsHandle = todo.IsHandle;
newToDo.HandleDate = todo.HandleDate;
newToDo.Number = todo.Number;
newToDo.Number2 = todo.Number2;
Funs.DB.FC_ToDo.InsertOnSubmit(newToDo);
Funs.DB.SubmitChanges();
}
/// <summary>
/// 根据主键删除Contract Management
/// </summary>
+1 -1
View File
@@ -101,7 +101,7 @@ namespace BLL
newPunishment.Individual = punishment.Individual;
newPunishment.ViolationDegree = punishment.ViolationDegree;
newPunishment.BYC_RU = punishment.BYC_RU;
//newPunishment.Violation_Inspector = punishment.Violation_Inspector;
newPunishment.Violation_Inspector = punishment.Violation_Inspector;
newPunishment.CompletionDate = punishment.CompletionDate;
newPunishment.ViolationRelatedSes = punishment.ViolationRelatedSes;
newPunishment.SelectYesNo = punishment.SelectYesNo;
+5
View File
@@ -244,6 +244,11 @@
密码
</summary>
</member>
<member name="P:Model.ResponeData.success">
<summary>
</summary>
</member>
<member name="P:Model.ResponeData.code">
<summary>
代码 200-正常;1010-异常;
@@ -27,8 +27,10 @@
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnEdit" ToolTip="Edit" Text="Edit" Icon="Pencil" runat="server" OnClick="btnEdit_Click" Hidden="true">
</f:Button>
<f:Button ID="btnSendEmail" Icon="Email" runat="server" CssClass="marginr" Text="Send"
OnClick="btnSendEmail_Click" Hidden="true">
<f:Button ID="btnAddSafeS" Text="安全业绩加分值" runat="server" OnClick="btnAddSafeS_Click" Hidden="true">
</f:Button>
<f:Button ID="btnSendEmail" Icon="Email" runat="server" CssClass="marginr" Text="Send"
OnClick="btnSendEmail_Click" Hidden="true">
</f:Button>
<f:Button ID="btnExport" OnClick="btnExport_Click" runat="server" Text="Export" ToolTip="Export" Hidden="true"
Icon="DoorOut" EnableAjax="false" DisableControlBeforePostBack="false">
@@ -105,6 +107,10 @@
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1300px" Height="860px">
</f:Window>
<f:Window ID="Window2" Title="安全业绩加分值" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" IsModal="true"
Width="1300px" Height="760px">
</f:Window>
</form>
<script type="text/javascript">
@@ -1,7 +1,12 @@
using BLL;
using NPOI.XSSF.UserModel;
using NPOI.SS.UserModel;
using BLL.Common;
using FineUIPro.Web.common;
using Model;
using Newtonsoft.Json;
using NPOI.SS.Formula.Functions;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using Org.BouncyCastle.Bcpg.OpenPgp;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
@@ -9,10 +14,6 @@ using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using Model;
using BLL.Common;
using FineUIPro.Web.common;
using Org.BouncyCastle.Bcpg.OpenPgp;
namespace FineUIPro.Web.Evaluation
{
@@ -185,7 +186,7 @@ namespace FineUIPro.Web.Evaluation
}
var buyer = from x in Funs.DB.Sys_User where x.UserName == fo.Buyer && x.Email != null && x.Email != "" select x;
var buyer = from x in Funs.DB.Sys_User where x.UserId == fo.BuyerId && x.Email != null && x.Email != "" select x;
if (buyer.Count() > 0)
{
userList.Add(buyer.First());
@@ -437,6 +438,41 @@ namespace FineUIPro.Web.Evaluation
// 左边列表
int s = 0;
int valiNum = 0; // 合同有效期内低于60分的次数
if ((eva.FC_Status == "Expired Soon" || eva.FC_Status == "Valid") && eva.Validate_Date.HasValue)
{
DateTime valiStratdate = eva.Validate_Date.Value;
DateTime valiStrat = DateTime.Parse(valiStratdate.Year + "-" + valiStratdate.Month + "-01");
DateTime valiEnd = DateTime.Parse(DateTime.Now.Year + "-" + DateTime.Now.Month + "-13");
if (eva.Expire_Date.HasValue)
{
if (eva.Expire_Date.Value <= DateTime.Now)
{
valiEnd = DateTime.Parse(eva.Expire_Date.Value.Year + "-" + eva.Expire_Date.Value.Month + "-13");
}
}
string sqlStr = @"select FO_NO,Total from FC_OverviewReport
where FO_NO= @FoNo AND CAST(ReportMonth+'-01' AS date)>=@StartTime
AND CAST(ReportMonth+'-01' AS date)<=@EndTime ";
List<SqlParameter> valiDateParam = new List<SqlParameter>();
valiDateParam.Add(new SqlParameter("@StartTime", valiStrat));
valiDateParam.Add(new SqlParameter("@EndTime", valiEnd));
valiDateParam.Add(new SqlParameter("@FoNo", eva.FO_NO));
SqlParameter[] valiDateParList = valiDateParam.ToArray();
var sesValiDataTable = SQLHelper.GetDataTableRunText(sqlStr, valiDateParList);
//var sesValiDataScore = JsonConvert.DeserializeObject<List<YearToDateModel>>(JsonConvert.SerializeObject(sesValiDataTable));
valiNum = sesValiDataTable.Select("Total<60.0").Count();//.Count(x => Funs.GetNewDecimal(x.SumScore) < (decimal)60.0);
}
// 安全业绩加分值
decimal? bonus = 0;
var sp=from x in Funs.DB.SafetyPerformance where x.ContractorId==eva.ContractorId orderby x.Years descending select x;
if (sp.Count() > 0)
{
bonus = sp.First().Bonus;
}
DateTime startDate = DateTime.Now.AddMonths(-23);
DateTime startTime = DateTime.Parse(startDate.Year + "-" + startDate.Month + "-01");
DateTime endTime = DateTime.Parse(DateTime.Now.Year + "-" + DateTime.Now.Month + "-13");
@@ -475,7 +511,6 @@ namespace FineUIPro.Web.Evaluation
SqlParameter[] yearToDateParList2 = yearToDateParam2.ToArray();
var sesDataTable2 = SQLHelper.GetDataTableRunProc("Sp_ContractorEvaluation", yearToDateParList2);
sesDataTable.Merge(sesDataTable2);//上一轮合同合并到续签合同中
}
}
@@ -561,7 +596,7 @@ namespace FineUIPro.Web.Evaluation
var sesDataTable = SQLHelper.GetDataTableRunProc("Sp_ContractorEvaluation", yearToDateParList);
var sesDataScore = JsonConvert.DeserializeObject<List<YearToDateModel>>(JsonConvert.SerializeObject(sesDataTable));
// 15行
if (reportModel.GetRow(14) == null) reportModel.CreateRow(14);
if (reportModel.GetRow(15) == null) reportModel.CreateRow(15);
@@ -575,7 +610,6 @@ namespace FineUIPro.Web.Evaluation
if (reportModel.GetRow(23) == null) reportModel.CreateRow(23);
if (reportModel.GetRow(24) == null) reportModel.CreateRow(24);
if (reportModel.GetRow(25) == null) reportModel.CreateRow(25);
for (int j = 0; j < 24; j++)
{
var curDate = DateTime.Parse("" + startDate.Year + "-" + startDate.Month + "-01").AddMonths(j);
@@ -690,6 +724,9 @@ namespace FineUIPro.Web.Evaluation
}
if (reportModel.GetRow(27).GetCell(2) == null) reportModel.GetRow(27).CreateCell(2);
reportModel.GetRow(27).GetCell(2).SetCellValue(eva.InterviewTimes.ToString());//约谈次数
if (reportModel.GetRow(27).GetCell(4) == null) reportModel.GetRow(27).CreateCell(4);
reportModel.GetRow(27).GetCell(4).SetCellValue(valiNum.ToString());//低于60分次数
if (reportModel.GetRow(27).GetCell(5) == null) reportModel.GetRow(27).CreateCell(5);
reportModel.GetRow(27).GetCell(5).SetCellValue(eva.ReviewOfFC);//原合同竞标/续签过程回顾
if (reportModel.GetRow(30).GetCell(2) == null) reportModel.GetRow(30).CreateCell(2);
@@ -727,17 +764,17 @@ namespace FineUIPro.Web.Evaluation
decimal? technicalBonusMalus = eva.TechnicalBonusMalus.HasValue ? Convert.ToDecimal(eva.TechnicalBonusMalus.Value.ToString("0.0")) : 0;
if (reportModel.GetRow(42).GetCell(3) == null) reportModel.GetRow(42).CreateCell(3);
reportModel.GetRow(42).GetCell(3).SetCellValue(technicalBonusMalus.ToString()+"%");//技术减值
//44行
decimal? safetyBonus = 0;
safetyBonus = Funs.GetNewDecimal(eva.SafetyBonus);
if (safetyBonus == null)
{
safetyBonus = 0;
}
//44行
//decimal? safetyBonus = 0;
//safetyBonus = Funs.GetNewDecimal(eva.SafetyBonus);
//if (safetyBonus == null)
//{
// safetyBonus = 0;
//}
if (reportModel.GetRow(43).GetCell(3) == null) reportModel.GetRow(43).CreateCell(3);
reportModel.GetRow(43).GetCell(3).SetCellValue(safetyBonus.HasValue ? safetyBonus.Value.ToString("0.0") + "%" : "0");//安全业绩加值
//45行
decimal? totalSocre = technicalBonusMalus + safetyBonus;
reportModel.GetRow(43).GetCell(3).SetCellValue(bonus.HasValue ? bonus.Value.ToString("0.0") + "%" : "0");//安全业绩加值
//45行
decimal? totalSocre = technicalBonusMalus + bonus;
if (reportModel.GetRow(44).GetCell(3) == null) reportModel.GetRow(44).CreateCell(3);
reportModel.GetRow(44).GetCell(3).SetCellValue(totalSocre.HasValue ? totalSocre.ToString() + "%" : "");//Total Score (Technical and Safety)
//48行
@@ -1066,6 +1103,11 @@ namespace FineUIPro.Web.Evaluation
btnEdit_Click(null, null);
}
protected void btnAddSafeS_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("SafetyPerformance.aspx", "编辑 - ")));
}
#region
/// <summary>
/// 实体
@@ -1095,6 +1137,11 @@ namespace FineUIPro.Web.Evaluation
{
this.btnSendEmail.Hidden = false;
}
// 增加安全业绩加分值
if (buttonList.Contains(BLL.Const.BtnAdd))
{
this.btnAddSafeS.Hidden = false;
}
}
}
#endregion
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Evaluation {
public partial class ContractorEvaluation {
namespace FineUIPro.Web.Evaluation
{
public partial class ContractorEvaluation
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// hdID 控件。
/// </summary>
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdID;
/// <summary>
/// txtFO_NO 控件。
/// </summary>
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtFO_NO;
/// <summary>
/// btnSearch 控件。
/// </summary>
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnEdit 控件。
/// </summary>
@@ -101,7 +103,16 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnEdit;
/// <summary>
/// btnAddSafeS 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAddSafeS;
/// <summary>
/// btnSendEmail 控件。
/// </summary>
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSendEmail;
/// <summary>
/// btnExport 控件。
/// </summary>
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnExport;
/// <summary>
/// lblNumber 控件。
/// </summary>
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNumber;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -164,5 +175,14 @@ namespace FineUIPro.Web.Evaluation {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
}
}
@@ -3,7 +3,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>项目经理编辑器</title>
<title></title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
@@ -122,11 +122,11 @@
<Items>
<f:CheckBoxList ID="cbPriceLevel" runat="server" Label="Price Level 价格水平" LabelWidth="240px">
<Items>
<f:CheckItem Text="很高 Very high" Value="1" />
<f:CheckItem Text="较高 Higher" Value="2" />
<f:CheckItem Text="适宜 Moderate" Value="3" />
<f:CheckItem Text="较低 Lower" Value="4" />
<f:CheckItem Text="很低 Very low" Value="5" />
<f:CheckItem Text="Very high 适宜" Value="1" />
<f:CheckItem Text="Higher 较高" Value="2" />
<f:CheckItem Text="Moderate 适宜" Value="3" />
<f:CheckItem Text="Lower 较低" Value="4" />
<f:CheckItem Text="Very low 很低" Value="5" />
</Items>
<Listeners>
<f:Listener Event="change" Handler="onCheckBoxListChange" />
@@ -153,7 +153,7 @@
<f:Form ShowBorder="false" ShowHeader="false" AutoScroll="true" runat="server"
RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow ColumnWidths="25% 25% 50%">
<f:FormRow ColumnWidths="25% 26% 7% 22% 20%">
<Items>
<%--<f:CheckBoxList ID="cbInquiry" runat="server" Label="Interview 约谈 " LabelWidth="240px">
<Items>
@@ -165,7 +165,10 @@
</Listeners>
</f:CheckBoxList>--%>
<f:Label ID="lblInterview" runat="server" Text="Interview 约谈 "></f:Label>
<f:NumberBox ID="numInquiryTime" runat="server" Label="次数Times" NoDecimal="true" NoNegative="true" Readonly="true"></f:NumberBox>
<f:NumberBox ID="numInquiryTime" runat="server" Label="Times 次数" NoDecimal="true" NoNegative="true" Readonly="true"></f:NumberBox>
<f:Label ID="Label4" runat="server" ></f:Label>
<f:Label ID="IM60" runat="server" Text="Monthly Eval. <60 月度评估低于60分 " ></f:Label>
<f:NumberBox ID="numIM60" runat="server" Label="Times 次数" NoDecimal="true" NoNegative="true" Readonly="true"></f:NumberBox>
</Items>
</f:FormRow>
</Rows>
@@ -182,7 +185,7 @@
</Listeners>
</f:CheckBoxList>--%>
<f:Label ID="Label1" runat="server" Text="NCR review NCR回顾"></f:Label>
<f:NumberBox ID="numNCRTime" runat="server" Label="次数Times" NoDecimal="true" NoNegative="true" Readonly="true"></f:NumberBox>
<f:NumberBox ID="numNCRTime" runat="server" Label="Times 次数" NoDecimal="true" NoNegative="true" Readonly="true"></f:NumberBox>
</Items>
</f:FormRow>
</Rows>
@@ -190,7 +193,7 @@
<f:FormRow ColumnWidths="25% 25% 50%">
<Items>
<f:Label ID="Label2" runat="server" Text="Work suspension for rectification 停工整改"></f:Label>
<f:NumberBox ID="numWorkRe" runat="server" Label="次数Times" NoDecimal="true" NoNegative="true" Readonly="true"></f:NumberBox>
<f:NumberBox ID="numWorkRe" runat="server" Label="Times 次数" NoDecimal="true" NoNegative="true" Readonly="true"></f:NumberBox>
</Items>
</f:FormRow>
</Rows>
@@ -265,7 +268,7 @@
<Rows>
<f:FormRow>
<Items>
<f:NumberBox ID="txtSafetyBonus" runat="server" Label="Bonus of Safety Performance</br>安全业绩加分值(%" LabelWidth="240px" NoNegative="true" NoDecimal="false" RegionPercent="1"></f:NumberBox>
<f:NumberBox ID="txtSafetyBonus" runat="server" Label="Bonus of Safety Performance</br>安全业绩加分值(%" LabelWidth="240px" NoNegative="true" NoDecimal="false" RegionPercent="1" Readonly="true"></f:NumberBox>
</Items>
</f:FormRow>
</Rows>
@@ -290,7 +293,7 @@
</f:CheckBoxList>
<f:TextBox ID="txtOtherDef" runat="server" Label="描述"></f:TextBox>--%>
<f:Label ID="lblOther" runat="server" Text="Others(e.g. major incident) 其他(如:重大事件)"></f:Label>
<f:NumberBox ID="numOthers" runat="server" Label="次数Times" NoDecimal="true" NoNegative="true"></f:NumberBox>
<f:NumberBox ID="numOthers" runat="server" Label="Times 次数" NoDecimal="true" NoNegative="true"></f:NumberBox>
</Items>
</f:FormRow>
</Rows>
@@ -173,10 +173,47 @@ namespace FineUIPro.Web.Evaluation
}
numOthers.Text = foview.First().OthersNum.ToString();
txtTechnicalBonus.Text = foview.First().TechnicalBonusMalus.ToString();
if (!string.IsNullOrEmpty(foview.First().SafetyBonus))
// 安全业绩加分值
decimal? bonus = 0;
var sp = from x in Funs.DB.SafetyPerformance where x.ContractorId == foview.First().ContractorId orderby x.Years descending select x;
if (sp.Count() > 0)
{
txtSafetyBonus.Text = Funs.GetNewDecimalOrZero(foview.First().SafetyBonus).ToString();
bonus = sp.First().Bonus;
}
txtSafetyBonus.Text = bonus.ToString();
//if (!string.IsNullOrEmpty(foview.First().SafetyBonus))
//{
// txtSafetyBonus.Text = Funs.GetNewDecimalOrZero(foview.First().SafetyBonus).ToString();
//}
int valiNum = 0; // 合同有效期内低于60分的次数
if ((foview.First().FC_Status == "Expired Soon" || foview.First().FC_Status == "Valid") && foview.First().Validate_Date.HasValue)
{
DateTime valiStratdate = foview.First().Validate_Date.Value;
DateTime valiStrat = DateTime.Parse(valiStratdate.Year + "-" + valiStratdate.Month + "-01");
DateTime valiEnd = DateTime.Parse(DateTime.Now.Year + "-" + DateTime.Now.Month + "-13");
if (foview.First().Expire_Date.HasValue)
{
if (foview.First().Expire_Date.Value <= DateTime.Now)
{
valiEnd = DateTime.Parse(foview.First().Expire_Date.Value.Year + "-" + foview.First().Expire_Date.Value.Month + "-13");
}
}
string sqlStr = @"select FO_NO,Total from FC_OverviewReport
where FO_NO= @FoNo AND CAST(ReportMonth+'-01' AS date)>=@StartTime
AND CAST(ReportMonth+'-01' AS date)<=@EndTime ";
List<SqlParameter> valiDateParam = new List<SqlParameter>();
valiDateParam.Add(new SqlParameter("@StartTime", valiStrat));
valiDateParam.Add(new SqlParameter("@EndTime", valiEnd));
valiDateParam.Add(new SqlParameter("@FoNo", foview.First().FO_NO));
SqlParameter[] valiDateParList = valiDateParam.ToArray();
var sesValiDataTable = SQLHelper.GetDataTableRunText(sqlStr, valiDateParList);
valiNum = sesValiDataTable.Select("Total<60.0").Count();//.Count(x => Funs.GetNewDecimal(x.SumScore) < (decimal)60.0);
}
numIM60.Text = valiNum.ToString();
}
else
{
@@ -184,6 +221,7 @@ namespace FineUIPro.Web.Evaluation
}
int s = 0;
DateTime startDate = DateTime.Now.AddMonths(-23);
DateTime startTime = DateTime.Parse(startDate.Year + "-" + startDate.Month + "-01");
DateTime endTime = DateTime.Parse(DateTime.Now.Year + "-" + DateTime.Now.Month + "-13");
@@ -206,7 +244,6 @@ namespace FineUIPro.Web.Evaluation
yearToDateParam.Add(new SqlParameter("@EndTime", endTime));
yearToDateParam.Add(new SqlParameter("@FoNo", foNo));
SqlParameter[] yearToDateParList = yearToDateParam.ToArray();
var sesDataTable = SQLHelper.GetDataTableRunProc("Sp_ContractorEvaluation", yearToDateParList);
//上一轮合同
@@ -220,7 +257,6 @@ namespace FineUIPro.Web.Evaluation
yearToDateParam2.Add(new SqlParameter("@EndTime", endTime));
yearToDateParam2.Add(new SqlParameter("@FoNo", fo.PreviousFO));
SqlParameter[] yearToDateParList2 = yearToDateParam2.ToArray();
var sesDataTable2 = SQLHelper.GetDataTableRunProc("Sp_ContractorEvaluation", yearToDateParList2);
sesDataTable.Merge(sesDataTable2);
@@ -303,10 +339,8 @@ namespace FineUIPro.Web.Evaluation
yearToDateParam.Add(new SqlParameter("@EndTime", endTime));
yearToDateParam.Add(new SqlParameter("@FoNo", foNo));
SqlParameter[] yearToDateParList = yearToDateParam.ToArray();
var sesDataTable = SQLHelper.GetDataTableRunProc("Sp_ContractorEvaluation", yearToDateParList);
var sesDataScore = JsonConvert.DeserializeObject<List<YearToDateModel>>(JsonConvert.SerializeObject(sesDataTable));
@@ -320,6 +320,33 @@ namespace FineUIPro.Web.Evaluation
/// </remarks>
protected global::FineUIPro.NumberBox numInquiryTime;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label4;
/// <summary>
/// IM60 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label IM60;
/// <summary>
/// numIM60 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox numIM60;
/// <summary>
/// Label1 控件。
/// </summary>
@@ -170,7 +170,7 @@ namespace FineUIPro.Web.Evaluation
Funs.DB.FC_BigDepartEvaRate.DeleteAllOnSubmit(departEva);
Funs.DB.SubmitChanges();
#region
#region
percentIn[UserId] = (int)(100 / 6);
List<Model.FC_OverviewReport> ovList = new List<Model.FC_OverviewReport>();
@@ -443,7 +443,7 @@ namespace FineUIPro.Web.Evaluation
}
if (OverviewReport1.Rows[i]["TotalAvgScore3"] != null && OverviewReport1.Rows[i]["TotalAvgScore3"].ToString() != "")
{
ov.TotalAvgScore3 = Convert.ToDecimal(OverviewReport.Rows[i]["TotalAvgScore3"]);
ov.TotalAvgScore3 = Convert.ToDecimal(OverviewReport1.Rows[i]["TotalAvgScore3"]);
}
else
{
@@ -0,0 +1,198 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyPerformance.aspx.cs" Inherits="FineUIPro.Web.Evaluation.SafetyPerformance" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="2px" BodyPadding="0px" Title="安全业绩加分值"
ShowHeader="false" Layout="HBox">
<Items>
<f:Grid ID="Grid1" Title="安全业绩加分值" ShowHeader="false" EnableCollapse="true" PageSize="15"
ShowBorder="true" AllowPaging="true" IsDatabasePaging="true" runat="server" Width="910px"
EnableColumnLines="true" OnSort="Grid1_Sort" DataKeyNames="SafetyPerformanceId"
DataIDField="SafetyPerformanceId" OnPageIndexChange="Grid1_PageIndexChange"
AllowSorting="true" >
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
<Items>
<f:DatePicker ID="txtYears" runat="server" Label="Years" DateFormatString="yyyy" DisplayType="Year"
ShowTodayButton="false" OnTextChanged="txtYears_TextChanged"></f:DatePicker>
<f:ToolbarFill ID="ToolbarFill2" runat="server">
</f:ToolbarFill>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField Width="80px" ColumnID="Years" DataField="Years" FieldType="String"
HeaderText="年度" HeaderTextAlign="Center" TextAlign="Left" SortField="Years">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="YearPrize" DataField="YearPrize" FieldType="String"
HeaderText="年度奖项" HeaderTextAlign="Center" TextAlign="Left" SortField="YearPrize">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="Bonus" DataField="Bonus" FieldType="String"
HeaderText="安全业绩加分值" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField MinWidth="450px" ColumnID="Contractor" DataField="Contractor" FieldType="String"
HeaderText="承包商" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField Width="10px" ColumnID="ContractorId" DataField="ContractorId" FieldType="String"
Hidden="true">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="rowselect" Handler="onGridRowSelect" />
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
</f:DropDownList>
</PageItems>
</f:Grid>
<f:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="true" ShowHeader="false"
LabelWidth="100px" BodyPadding="5px" Width="360px">
<Items>
<f:HiddenField ID="hfFormID" runat="server">
</f:HiddenField>
</Items>
<Items>
<f:Form ID="FormT" runat="server" ShowBorder="false" ShowHeader="false" BodyPadding="5px">
<Rows>
<f:FormRow>
<Items>
<f:DatePicker ID="dateYear" runat="server" Label="Years" DisplayType="Year" Required="true" ShowRedStar="true"
DateFormatString="yyyy" ShowTodayButton="false" LabelAlign="Right" LabelWidth="100px"></f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpYearPrize" runat="server" Label="年度奖项" LabelAlign="Right" Required="true" ShowRedStar="true"
LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="drpYearPrize_OnSelectedIndexChanged">
<f:ListItem Text="-请选择-" Value="0" />
<f:ListItem Text="一等奖" Value="一等奖" />
<f:ListItem Text="二等奖" Value="二等奖" />
<f:ListItem Text="三等奖" Value="三等奖" />
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox Label="加分值" ID="numBonus" NoNegative="true" DecimalPrecision="1"
Required="true" ShowRedStar="true" runat="server" NumberSuffix="%" LabelAlign="Right" LabelWidth="100px"/>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpContractor" runat="server" Label="Contractor" LabelAlign="Right"
Required="true" ShowRedStar="true" LabelWidth="100px" EnableEdit="true" >
</f:DropDownList>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
<Items>
</Items>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server">
<Items>
<f:Button ID="btnNew" Text="" Icon="Add" ToolTip="新增" EnablePostBack="false" runat="server">
<Listeners>
<f:Listener Event="click" Handler="onNewButtonClick" />
</Listeners>
</f:Button>
<f:Button ID="btnDelete" Text="" Enabled="false" ToolTip="删除" Icon="Delete" ConfirmText="确定删除当前数据?"
OnClick="btnDelete_Click" runat="server">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="提交数据" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:SimpleForm>
</Items>
</f:Panel>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false,来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
var gridClientID = '<%= Grid1.ClientID %>';
var btnDeleteClientID = '<%= btnDelete.ClientID %>';
var btnSaveClientID = '<%= btnSave.ClientID %>';
var formClientID = '<%= SimpleForm1.ClientID %>';
var hfFormIDClientID = '<%= hfFormID.ClientID %>';
var dateYearClientID = '<%= dateYear.ClientID %>';
var drpYearPrizeClientID = '<%= drpYearPrize.ClientID %>';
var numBonusClientID = '<%= numBonus.ClientID %>';
var drpContractorClientID = '<%= drpContractor.ClientID %>';
function onGridRowSelect(event, rowId) {
var grid = F(gridClientID);
// 启用删除按钮
F(btnDeleteClientID).enable();
// 当前行数据
var rowValue = grid.getRowValue(rowId);
// 使用当前行数据填充表单字段
F(hfFormIDClientID).setValue(rowId);
F(dateYearClientID).setValue(rowValue['Years']);
F(drpYearPrizeClientID).setValue(rowValue['YearPrize']);
F(numBonusClientID).setValue(rowValue['Bonus']);
F(drpContractorClientID).setValue(rowValue['ContractorId']);
// 更新提交按钮文本
F(btnSaveClientID).setText('提交数据(编辑)');
}
function onNewButtonClick() {
// 重置表单字段
F(formClientID).reset();
// 清空表格选中行
F(gridClientID).clearSelections();
F(hfFormIDClientID).setValue("");
// 禁用删除按钮
F(btnDeleteClientID).disable();
// 更新提交按钮文本
F(btnSaveClientID).setText('提交数据(新增)');
}
</script>
</body>
</html>
@@ -0,0 +1,299 @@
using BLL;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Evaluation
{
public partial class SafetyPerformance : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BLL.ContractorService.InitDropDownList(drpContractor, true); //承包商;
BindGrid();
}
}
#region
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
string strSql = @"select SafetyPerformanceId,Years,YearPrize,Bonus,sp.ContractorId,
(CASE WHEN contractor.Contractor IS NULL THEN ISNULL(contractor.ContractorCN,'')
ELSE (CASE WHEN contractor.ContractorCN IS NULL THEN ISNULL(contractor.Contractor,'')
ELSE (ISNULL(contractor.Contractor,'') + ISNULL(contractor.ContractorCN,'')) END) END)AS Contractor
from SafetyPerformance sp
left join Base_Contractor contractor on contractor.ContractorId=sp.ContractorId
WHERE 1=1";
List<SqlParameter> listStr = new List<SqlParameter>();
if (txtYears.Text != "")
{
strSql += " AND sp.Years = @Years";
listStr.Add(new SqlParameter("@Years", txtYears.Text.Trim()));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
Grid1.PageIndex = e.NewPageIndex;
BindGrid();
}
/// <summary>
/// 分页下拉选择
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
Grid1.SortDirection = e.SortDirection;
Grid1.SortField = e.SortField;
BindGrid();
}
#endregion
#region
/// <summary>
/// 删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDelete_Click(object sender, EventArgs e)
{
Model.SafetyPerformance sp = Funs.DB.SafetyPerformance.FirstOrDefault(x => x.SafetyPerformanceId == hfFormID.Text);
if (sp != null)
{
Funs.DB.SafetyPerformance.DeleteOnSubmit(sp);
Funs.DB.SubmitChanges();
}
// 重新绑定表格,并模拟点击[新增按钮]
BindGrid();
PageContext.RegisterStartupScript("onNewButtonClick();");
}
/// <summary>
/// 右键删除事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
btnDelete_Click(null, null);
}
#endregion
#region
/// <summary>
/// 右键编辑事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
this.EditData();
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string Id = Grid1.SelectedRowID;
var safeP = Funs.DB.SafetyPerformance.FirstOrDefault(e => e.SafetyPerformanceId == Id);
if (safeP != null)
{
this.dateYear.Text = safeP.Years;
this.drpYearPrize.Text = safeP.YearPrize;
if (safeP.Bonus.HasValue)
{
this.numBonus.Text = safeP.Bonus.ToString();
}
drpContractor.SelectedValue = safeP.ContractorId;
hfFormID.Text = Id;
this.btnDelete.Enabled = true;
}
}
#endregion
private int GetYearPriceNum(string years, string price, string safetyPerformanceId)
{
var safeList = from x in Funs.DB.SafetyPerformance
where x.Years == years && x.YearPrize == price
&& x.SafetyPerformanceId != safetyPerformanceId
select x;
return safeList.Count();
}
#region
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (dateYear.Text == "")
{
Alert.ShowInTop("年度不能为空!", MessageBoxIcon.Warning);
return;
}
if (drpContractor.SelectedValue == "" || drpContractor.SelectedValue == Const._Null)
{
Alert.ShowInTop("请选择承包商!", MessageBoxIcon.Warning);
return;
}
if (drpYearPrize.SelectedValue == "0" )
{
Alert.ShowInTop("请选择安全年度奖项!", MessageBoxIcon.Warning);
return;
}
if (numBonus.Text == "")
{
Alert.ShowInTop("安全业绩加分值为空!", MessageBoxIcon.Warning);
return;
}
string strRowID = hfFormID.Text;
string strWarn = "";
int PriecNum = GetYearPriceNum(this.dateYear.Text.Trim(), drpYearPrize.SelectedValue, strRowID);
if (drpYearPrize.SelectedValue == "一等奖")
{
if (PriecNum >= 1)
{
strWarn = "年度一等奖数量只有一名,已录入!";
}
}
if (drpYearPrize.SelectedValue == "二等奖")
{
if (PriecNum >= 2)
{
strWarn = "年度二等奖数量只有二名,已录入!";
}
}
if (drpYearPrize.SelectedValue == "三等奖")
{
if (PriecNum >= 3)
{
strWarn = "年度三等奖数量只有三名,已录入!";
}
}
if (strWarn == "")
{
if (string.IsNullOrEmpty(strRowID))
{
Model.SafetyPerformance safeP = new Model.SafetyPerformance();
safeP.Years = this.dateYear.Text.Trim();
safeP.YearPrize = drpYearPrize.SelectedValue;
safeP.Bonus = Convert.ToDecimal(numBonus.Text);
safeP.ContractorId = drpContractor.SelectedValue;
strRowID = SQLHelper.GetNewID(typeof(Model.SafetyPerformance));
safeP.SafetyPerformanceId = strRowID;
Funs.DB.SafetyPerformance.InsertOnSubmit(safeP);
Funs.DB.SubmitChanges();
}
else
{
Model.SafetyPerformance update = Funs.DB.SafetyPerformance.FirstOrDefault(x => x.SafetyPerformanceId == strRowID);
if (update != null)
{
update.Years = this.dateYear.Text.Trim();
update.YearPrize = drpYearPrize.SelectedValue;
update.Bonus = Convert.ToDecimal(numBonus.Text);
update.ContractorId = drpContractor.SelectedValue;
Funs.DB.SubmitChanges();
}
}
}
else
{
Alert.ShowInTop(strWarn, MessageBoxIcon.Warning);
return;
}
// 重新绑定表格,并点击当前编辑或者新增的行
BindGrid();
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript("onNewButtonClick();");
}
#endregion
protected void drpYearPrize_OnSelectedIndexChanged(object sender, EventArgs e)
{
if (drpYearPrize.SelectedValue != "0")
{
if (drpYearPrize.SelectedValue == "一等奖")
{
numBonus.Text = "2";
}
if (drpYearPrize.SelectedValue == "二等奖")
{
numBonus.Text = "1.5";
}
if (drpYearPrize.SelectedValue == "三等奖")
{
numBonus.Text = "1";
}
}
}
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtYears_TextChanged(object sender, EventArgs e)
{
this.BindGrid();
}
#endregion
}
}
@@ -0,0 +1,242 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Evaluation
{
public partial class SafetyPerformance
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtYears 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtYears;
/// <summary>
/// ToolbarFill2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill2;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm1;
/// <summary>
/// hfFormID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hfFormID;
/// <summary>
/// FormT 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form FormT;
/// <summary>
/// dateYear 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker dateYear;
/// <summary>
/// drpYearPrize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpYearPrize;
/// <summary>
/// numBonus 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox numBonus;
/// <summary>
/// drpContractor 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpContractor;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
}
}
Binary file not shown.
+8
View File
@@ -439,6 +439,7 @@
<Content Include="Evaluation\FilesManagement.aspx" />
<Content Include="Evaluation\PerformanceReport.aspx" />
<Content Include="Evaluation\SafetyEvaluation.aspx" />
<Content Include="Evaluation\SafetyPerformance.aspx" />
<Content Include="favicon.ico" />
<Content Include="Global.asax" />
<Content Include="Images\dlu.gif" />
@@ -3236,6 +3237,13 @@
<Compile Include="Evaluation\SafetyEvaluation.aspx.designer.cs">
<DependentUpon>SafetyEvaluation.aspx</DependentUpon>
</Compile>
<Compile Include="Evaluation\SafetyPerformance.aspx.cs">
<DependentUpon>SafetyPerformance.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Evaluation\SafetyPerformance.aspx.designer.cs">
<DependentUpon>SafetyPerformance.aspx</DependentUpon>
</Compile>
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<ProjectView>ProjectFiles</ProjectView>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>
File diff suppressed because it is too large Load Diff
+13 -15
View File
@@ -51,8 +51,6 @@ namespace FineUIPro.Web
Model.Sys_User newUser = new Model.Sys_User();
newUser.UserId = SQLHelper.GetNewID(typeof(Model.Sys_User));
newUser.Account = account;
//newUser.UserName = txtUserName.Text.Trim();
//newUser.Email = txtEmail.Text.Trim();
newUser.UserName = ldapuser.FullName;
newUser.Email = ldapuser.EmailAddress;
newUser.RoleId = Const.Role_CommonUsers;
@@ -64,19 +62,19 @@ namespace FineUIPro.Web
}
else
{
// 更新用户名和邮箱
if (string.IsNullOrEmpty(user.First().UserName) || string.IsNullOrEmpty(user.First().Email))
{
Model.Sys_User newUser = Funs.DB.Sys_User.FirstOrDefault(x => x.UserId == user.First().UserId);
if (newUser != null)
{
newUser.UserName = ldapuser.FullName;
newUser.Email = ldapuser.EmailAddress;
//newUser.UserName = txtUserName.Text.Trim();
//newUser.Email = txtEmail.Text.Trim();
Funs.DB.SubmitChanges();
}
}
// 更新用户名和邮箱 暂不用从HR过来
//if (string.IsNullOrEmpty(user.First().UserName) || string.IsNullOrEmpty(user.First().Email))
//{
// Model.Sys_User newUser = Funs.DB.Sys_User.FirstOrDefault(x => x.UserId == user.First().UserId);
// if (newUser != null)
// {
// newUser.UserName = ldapuser.FullName;
// newUser.Email = ldapuser.EmailAddress;
// //newUser.UserName = txtUserName.Text.Trim();
// //newUser.Email = txtEmail.Text.Trim();
// Funs.DB.SubmitChanges();
// }
//}
}
+51
View File
@@ -70,6 +70,8 @@
OnClick="btnSendEmail_Click" Hidden="true">
</f:Button>
<f:Button ID="btnSearch" runat="server" Icon="SystemSearch" Text="Search" OnClick="btnSearch_Click"></f:Button>
<f:Button ID="btnUpdateState" ToolTip="Modify" Text="UpdateState" runat="server" OnClick="btnUpdateState_Click">
</f:Button>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar6" Position="Top" runat="server">
@@ -1295,6 +1297,50 @@
</Items>
</f:Tab>
<f:Tab ID="Tab14" Title="To_do" BodyPadding="1px" Layout="VBox" runat="server" AutoScroll="true">
<Items>
<f:Grid ID="Grid16" ShowBorder="true" ShowHeader="false" Title="To_do" EnableCollapse="true" Height="200px"
runat="server" BoxFlex="1" DataKeyNames="FileId" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="FileId" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid16_RowDoubleClick">
<Toolbars>
<f:Toolbar ID="Toolbar17" Position="Top" runat="server">
<Items>
<f:ToolbarFill ID="ToolbarFill17" runat="server"></f:ToolbarFill>
<f:RadioButtonList ID="rdbIsHandle" runat="server" OnSelectedIndexChanged="rdbIsHandle_SelectedIndexChanged" AutoPostBack="true">
<f:RadioItem Text="待办" Value="0" Selected="true" />
<f:RadioItem Text="已处理" Value="1" />
</f:RadioButtonList>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField Width="50px" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label15" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="90px" ColumnID="FO_NO" DataField="FO_NO" FieldType="String" HeaderText="合同号" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="300px" ColumnID="Contract" DataField="Contract" FieldType="String" HeaderText="承包商" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="ViolationBehavior" DataField="ViolationBehavior" FieldType="String" HeaderText="违章或违规行为" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="180px" ColumnID="Result" DataField="Result" FieldType="String" HeaderText="后果" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="ToDoMan" DataField="ToDoMan" FieldType="String" HeaderText="上传人" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="IsHandle" DataField="IsHandle" FieldType="String" HeaderText="是否处理" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu15" />
</Listeners>
</f:Grid>
</Items>
</f:Tab>
</Tabs>
</f:TabStrip>
</Items>
@@ -1458,6 +1504,11 @@
Icon="Delete" ConfirmText="Delete selected row ?" ConfirmTarget="Top" runat="server" Text="Delete" Hidden="true">
</f:MenuButton>
</f:Menu>
<f:Menu ID="Menu16" runat="server">
<f:MenuButton ID="btnMenuEdit16" OnClick="btnMenuEdit16_Click" EnablePostBack="true"
Icon="BulletEdit" runat="server" Text="处理" Hidden="true">
</f:MenuButton>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
+180 -1
View File
@@ -86,6 +86,15 @@ namespace FineUIPro.Web.SES
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
if (this.CurrUser.Account == Const.Gly)
{
btnUpdateState.Hidden = false;
}
else
{
btnUpdateState.Hidden = true;
}
}
else if (GetRequestEventArgument() == "FilterChange")
{
@@ -970,7 +979,7 @@ namespace FineUIPro.Web.SES
mailCode = fo.FO_NO + "|" + disc + "|" + contractor.Contractor + " " + contractor.ContractorCN;
var contractAdmin = from x in Funs.DB.Sys_User where x.UserId == fo.Contract_Admin && x.Email != null && x.Email != "" select x;
var buyer = from x in Funs.DB.Sys_User where x.UserName == fo.Buyer && x.Email != null && x.Email != "" select x;
var buyer = from x in Funs.DB.Sys_User where x.UserId == fo.BuyerId && x.Email != null && x.Email != "" select x;
if (buyer.Count() > 0)
{
userList.Add(buyer.First());
@@ -3194,6 +3203,71 @@ namespace FineUIPro.Web.SES
}
#endregion
/// <summary>
/// 更新状态
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnUpdateState_Click(object sender, EventArgs e)
{
var date = (from x in Funs.DB.FC_SESRelatedData where x.FC_Status != "Closed" select x).ToList();
foreach (var d in date)
{
string lastPayment = string.Empty;
string status = d.FC_Status;
if (!string.IsNullOrEmpty(d.FO_NO))
{
lastPayment = Funs.DB.CPTList.FirstOrDefault(x => x.Contract_No == d.FO_NO)?.Last_Payment;
}
if (d.Validate_Date.HasValue)
{
if (d.Validate_Date.Value < DateTime.Now)
{
status = "Ready";
}
}
if (d.Expire_Date.HasValue)
{
if (d.Expire_Date.Value >= DateTime.Now)
{
if (d.Expire_Date.Value.AddMonths(-6) <= DateTime.Now)
{
status = "Expired Soon";
}
else
{
status = "Valid";
}
}
else
{
status = "Expired";
if (lastPayment == "Y")
{
status = "Closed";
}
}
}
string strSql = "UPDATE dbo.FC_SESRelatedData SET FC_Status=@status WHERE ID=@id";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@status", status));
listStr.Add(new SqlParameter("@id", d.ID));
SqlParameter[] parameter = listStr.ToArray();
try
{
BLL.SQLHelper.ExecutSql(strSql, parameter);
}
catch (Exception ex)
{
ErrLogInfo.WriteLog($"执行当前sql:{strSql}错误:{ex.Message},当前ID={d.ID},当前status={status}");
//记录日志到数据中。
}
}
}
#region Grid行点击事件
/// <summary>
///Grid行点击事件
@@ -4002,6 +4076,45 @@ namespace FineUIPro.Web.SES
}
}
private void BindGrid16()
{
string strSql = @"select ToDoId,U.UserName AS ToDoMan,ViolationBehavior,Result,
(case when IsHandle=1 then '' else '' end) as IsHandle,
(case when contractor.Contractor is not null
then (case when contractor.ContractorCN is not null
then contractor.Contractor+' '+contractor.ContractorCN
else contractor.Contractor end)
else contractor.ContractorCN end) as Contractor
from FC_ToDo todo
LEFT JOIN Sys_User AS U ON U.UserId = todo.ToDoMan
LEFT JOIN Base_Contractor as contractor on contractor.ContractorId = todo.ContractId
WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (this.CurrUser.Account != Const.Gly)
{
strSql += " AND todo.ToDoMan = @ToDoMan";
listStr.Add(new SqlParameter("@ToDoMan", CurrUser.UserId));
}
if (rdbIsHandle.SelectedValue == "1")
{
strSql += " AND todo.IsHandle = 1";
}
else
{
strSql += " AND todo.IsHandle = 0";
}
//strSql += " ORDER BY con.UploadDate DESC";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid16.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid3, tb);
Grid16.DataSource = table;
Grid16.DataBind();
}
#endregion
#region
@@ -4090,6 +4203,10 @@ namespace FineUIPro.Web.SES
{
BindGrid15(this.hdID.Text);
}
else if (this.TabStrip2.ActiveTabIndex == 13)
{
BindGrid16();
}
}
}
}
@@ -4168,6 +4285,10 @@ namespace FineUIPro.Web.SES
{
BindGrid15(this.hdID.Text);
}
else if (this.TabStrip2.ActiveTabIndex == 13)
{
BindGrid16();
}
}
}
}
@@ -5122,6 +5243,59 @@ namespace FineUIPro.Web.SES
}
#endregion
#region TODO
/// <summary>
/// Grid3行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid16_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
btnMenuEdit16_Click(null, null);
}
/// <summary>
/// Grid3右键编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit16_Click(object sender, EventArgs e)
{
if (Grid16.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInParent("Please select at least one record!");
return;
}
string todoId = Grid16.SelectedRowID;
var todo = Funs.DB.FC_ToDo.FirstOrDefault(x => x.ToDoId == todoId);
if (todo != null)
{
// 约谈
if (todo.ViolationBehavior == "一次零容忍违章" || todo.ViolationBehavior == "累计两次月度评估低于60或安全评估低于12分")
{
PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("SESRelatedDataContractManage7.aspx?todoId={0}", todoId, "编辑 - ")));
}
// NCR
if (todo.ViolationBehavior == "三次零容忍违章")
{
PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("SESRelatedDataContractManage6.aspx?todoId={0}", todoId, "编辑 - ")));
}
// 邮件 不得参与下轮合同次数
if (todo.ViolationBehavior == "累计三次月度评估低于60分")
{
}
// 邮件 提前终止合同及不得参与下轮合同次数
if (todo.ViolationBehavior == "三次NCR")
{
}
}
}
#endregion
/// <summary>
/// 关闭弹出窗体
/// </summary>
@@ -5459,5 +5633,10 @@ namespace FineUIPro.Web.SES
// }
}
protected void rdbIsHandle_SelectedIndexChanged(object sender, EventArgs e)
{
BindGrid16();
}
}
}
+81
View File
@@ -257,6 +257,15 @@ namespace FineUIPro.Web.SES
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnUpdateState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnUpdateState;
/// <summary>
/// Toolbar6 控件。
/// </summary>
@@ -1661,6 +1670,60 @@ namespace FineUIPro.Web.SES
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtnUrl15;
/// <summary>
/// Tab14 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab14;
/// <summary>
/// Grid16 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid16;
/// <summary>
/// Toolbar17 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar17;
/// <summary>
/// ToolbarFill17 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill17;
/// <summary>
/// rdbIsHandle 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rdbIsHandle;
/// <summary>
/// Label15 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label15;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -2119,5 +2182,23 @@ namespace FineUIPro.Web.SES
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete15;
/// <summary>
/// Menu16 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu16;
/// <summary>
/// btnMenuEdit16 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit16;
}
}
@@ -133,10 +133,8 @@ namespace FineUIPro.Web.SES
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
string id = Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "1";//合同续签
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -159,6 +157,8 @@ namespace FineUIPro.Web.SES
}
else
{
string id = Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -153,10 +153,10 @@ namespace FineUIPro.Web.SES
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
return;
}
string id = Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "10";//停工整改报告// this.drpFileTypeId.SelectedValue;
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -184,6 +184,8 @@ namespace FineUIPro.Web.SES
}
else
{
string id = Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -153,10 +153,9 @@ namespace FineUIPro.Web.SES
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
return;
}
string id = Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "11";//合同终止// this.drpFileTypeId.SelectedValue;
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -184,6 +183,8 @@ namespace FineUIPro.Web.SES
}
else
{
string id = Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -153,10 +153,9 @@ namespace FineUIPro.Web.SES
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
return;
}
string id = Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "12";//组织架构// this.drpFileTypeId.SelectedValue;
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -184,6 +183,8 @@ namespace FineUIPro.Web.SES
}
else
{
string id = Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -153,10 +153,8 @@ namespace FineUIPro.Web.SES
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
return;
}
string id = Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "13";//框架承包商评估表// this.drpFileTypeId.SelectedValue;
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -184,6 +182,8 @@ namespace FineUIPro.Web.SES
}
else
{
string id = Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -140,10 +140,9 @@ namespace FineUIPro.Web.SES
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
string id = Request.Params["id"];
string id = "";//Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "2";//费用增补
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -156,8 +155,11 @@ namespace FineUIPro.Web.SES
newContract.Remark = this.txtRemark.Text.Trim();
if (!string.IsNullOrEmpty(fileId))
{
newContract.FileId = fileId;
var con = BLL.ContractManagementService.GetContractManagementById(fileId);
var att = from x in Funs.DB.AttachFile where x.ToKeyId == fileId select x;
id = con.FC_ID.ToString();
newContract.FileId = fileId;
if (att.Count() > 0)
{
newContract.AttachUrl = att.First().AttachUrl;
@@ -168,6 +170,8 @@ namespace FineUIPro.Web.SES
}
else
{
id= Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -192,14 +196,8 @@ namespace FineUIPro.Web.SES
var data = BLL.SESRelatedDataService.GetSESRelatedDataById(id);
if (data != null)
{
//decimal? totalBudget = 0;
//var conMaLists = BLL.ContractManagementService.GetContractManagementByDataIdFileType(id, "2");
//foreach (var item in conMaLists)
//{
// totalBudget += item.TotalBudget;
//}
data.Actual_Budget = newContract.TotalBudget;
BLL.SESRelatedDataService.UpdateSESRelatedData(data);
Funs.DB.SubmitChanges();
}
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
@@ -139,10 +139,10 @@ namespace FineUIPro.Web.SES
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
string id = Request.Params["id"];
string id = "";
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
//newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "3";//份额变更
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -153,6 +153,8 @@ namespace FineUIPro.Web.SES
newContract.Remark = this.txtRemark.Text.Trim();
if (!string.IsNullOrEmpty(fileId))
{
var con = BLL.ContractManagementService.GetContractManagementById(fileId);
id = con.FC_ID.ToString();
newContract.FileId = fileId;
var att = from x in Funs.DB.AttachFile where x.ToKeyId == fileId select x;
if (att.Count() > 0)
@@ -165,6 +167,8 @@ namespace FineUIPro.Web.SES
}
else
{
id = Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -138,10 +138,9 @@ namespace FineUIPro.Web.SES
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
string id = Request.Params["id"];
string id = "";
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "4";//短期延续
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -154,6 +153,8 @@ namespace FineUIPro.Web.SES
newContract.EndDate = Funs.GetNewDateTime(this.txtEndDate.Text);
if (!string.IsNullOrEmpty(fileId))
{
var con = BLL.ContractManagementService.GetContractManagementById(fileId);
id = con.FC_ID.ToString();
newContract.FileId = fileId;
var att = from x in Funs.DB.AttachFile where x.ToKeyId == fileId select x;
if (att.Count() > 0)
@@ -166,6 +167,8 @@ namespace FineUIPro.Web.SES
}
else
{
id = Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -166,10 +166,8 @@ namespace FineUIPro.Web.SES
Alert.ShowInTop("请选择审计结果!", MessageBoxIcon.Warning);
return;
}
string id = Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "5";//承包商EHSQ审计报告
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -196,6 +194,8 @@ namespace FineUIPro.Web.SES
}
else
{
string id = Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -153,10 +153,8 @@ namespace FineUIPro.Web.SES
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
return;
}
string id = Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "6";//NCR// this.drpFileTypeId.SelectedValue;
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -184,6 +182,26 @@ namespace FineUIPro.Web.SES
}
else
{
string id = Request.Params["id"];
// 从todo过来
string todoId = Request.Params["todoId"];
if (string.IsNullOrEmpty(id))
{
if (!string.IsNullOrEmpty(todoId))
{
var todo = Funs.DB.FC_ToDo.FirstOrDefault(x => x.ToDoId == todoId);
if (todo != null)
{
var fc = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(todo.FO_NO);
id = fc.ID.ToString();
newContract.ToDoId = todoId;
}
}
}
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -200,6 +218,18 @@ namespace FineUIPro.Web.SES
newContract.AttachUrl = att.First().AttachUrl;
}
BLL.ContractManagementService.AddContractManagement(newContract);
// 回写ToDo
if (!string.IsNullOrEmpty(todoId))
{
var todo = Funs.DB.FC_ToDo.FirstOrDefault(x => x.ToDoId == todoId);
if (todo != null)
{
todo.IsHandle = true;
todo.HandleDate = DateTime.Now;
Funs.DB.SubmitChanges();
}
}
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "增加NCR合同!");
ShowNotify("Save successfully!", MessageBoxIcon.Success);
}
@@ -153,10 +153,9 @@ namespace FineUIPro.Web.SES
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
return;
}
string id = Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "7";//合同约谈// this.drpFileTypeId.SelectedValue;
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -184,6 +183,24 @@ namespace FineUIPro.Web.SES
}
else
{
string id = Request.Params["id"];
// 从todo过来
string todoId = Request.Params["todoId"];
if (string.IsNullOrEmpty(id))
{
if (!string.IsNullOrEmpty(todoId))
{
var todo = Funs.DB.FC_ToDo.FirstOrDefault(x => x.ToDoId == todoId);
if (todo != null)
{
var fc = BLL.SESRelatedDataService.GetSESRelatedDataByFoNo(todo.FO_NO);
id = fc.ID.ToString();
newContract.ToDoId = todoId;
}
}
}
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -200,6 +217,19 @@ namespace FineUIPro.Web.SES
newContract.AttachUrl = att.First().AttachUrl;
}
BLL.ContractManagementService.AddContractManagement(newContract);
// 回写ToDo
if (!string.IsNullOrEmpty(todoId))
{
var todo = Funs.DB.FC_ToDo.FirstOrDefault(x => x.ToDoId == todoId);
if (todo != null)
{
todo.IsHandle = true;
todo.HandleDate= DateTime.Now;
Funs.DB.SubmitChanges();
}
}
BLL.Sys_LogService.AddLog(this.CurrUser.UserId, "增加合同约谈!");
ShowNotify("Save successfully!", MessageBoxIcon.Success);
}
@@ -153,10 +153,9 @@ namespace FineUIPro.Web.SES
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
return;
}
string id = Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "8";//开工会// this.drpFileTypeId.SelectedValue;
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -184,6 +183,8 @@ namespace FineUIPro.Web.SES
}
else
{
string id = Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -153,10 +153,10 @@ namespace FineUIPro.Web.SES
Alert.ShowInTop("请选择BYC负责部门!", MessageBoxIcon.Warning);
return;
}
string id = Request.Params["id"];
string fileId = Request.Params["fileId"];
Model.FC_ContractManagement newContract = new Model.FC_ContractManagement();
newContract.FC_ID = Convert.ToInt32(id);
newContract.FileTypeId = "9";//会议纪要// this.drpFileTypeId.SelectedValue;
newContract.FileName = this.txtFileName.Text.Trim();
if (this.drpUploadMan.SelectedValue != BLL.Const._Null)
@@ -184,6 +184,8 @@ namespace FineUIPro.Web.SES
}
else
{
string id = Request.Params["id"];
newContract.FC_ID = Convert.ToInt32(id);
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newContract.FileId = this.hdId.Text.Trim();
@@ -24,6 +24,14 @@
FilterDataRowItem = FilterDataRowItemImplement;
if (!IsPostBack)
{
var hrlog = Funs.DB.SyncDataUserLogs.FirstOrDefault(x => x.IsSuccess == true && x.CreatedTime.Value.Date == DateTime.Now.Date);
if (hrlog == null)
{
//string baseUrl = "http://localhost/fclAPI/api/DataSyncUserInfo/GetHrInfoList";
string baseUrl = "https://fcl.basf-ypc.net.cn/api/api/DataSyncUserInfo/GetHrInfoList";
BLL.Common.HttpHelper.HttpGetRequest(baseUrl);
}
GetButtonPower();//权限设置
btnNew.OnClientClick = Window1.GetShowReference("UserListEdit.aspx") + "return false;";
btnDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("Please select at least one item!");
+3
View File
@@ -7,6 +7,9 @@ namespace Model
{
public class ResponeData
{
/// <summary>
///
/// </summary>
public bool success
{
get;
+754 -1
View File
@@ -29,7 +29,11 @@ namespace Model
#region
partial void OnCreated();
partial void InsertAttachFile(AttachFile instance);
partial void OnCreated()
{
this.CommandTimeout = 600;
}
partial void InsertAttachFile(AttachFile instance);
partial void UpdateAttachFile(AttachFile instance);
partial void DeleteAttachFile(AttachFile instance);
partial void InsertAudiFlow(AudiFlow instance);
@@ -149,9 +153,15 @@ namespace Model
partial void InsertFC_SignedContracts(FC_SignedContracts instance);
partial void UpdateFC_SignedContracts(FC_SignedContracts instance);
partial void DeleteFC_SignedContracts(FC_SignedContracts instance);
partial void InsertFC_ToDo(FC_ToDo instance);
partial void UpdateFC_ToDo(FC_ToDo instance);
partial void DeleteFC_ToDo(FC_ToDo instance);
partial void InsertFilesManagement(FilesManagement instance);
partial void UpdateFilesManagement(FilesManagement instance);
partial void DeleteFilesManagement(FilesManagement instance);
partial void InsertSafetyPerformance(SafetyPerformance instance);
partial void UpdateSafetyPerformance(SafetyPerformance instance);
partial void DeleteSafetyPerformance(SafetyPerformance instance);
partial void InsertScore_JournalEvaluation(Score_JournalEvaluation instance);
partial void UpdateScore_JournalEvaluation(Score_JournalEvaluation instance);
partial void DeleteScore_JournalEvaluation(Score_JournalEvaluation instance);
@@ -606,6 +616,14 @@ namespace Model
}
}
public System.Data.Linq.Table<FC_ToDo> FC_ToDo
{
get
{
return this.GetTable<FC_ToDo>();
}
}
public System.Data.Linq.Table<FilesManagement> FilesManagement
{
get
@@ -622,6 +640,14 @@ namespace Model
}
}
public System.Data.Linq.Table<SafetyPerformance> SafetyPerformance
{
get
{
return this.GetTable<SafetyPerformance>();
}
}
public System.Data.Linq.Table<Score_JournalEvaluation> Score_JournalEvaluation
{
get
@@ -1391,6 +1417,10 @@ namespace Model
private EntitySet<FC_SESRelatedData> _FC_SESRelatedData;
private EntitySet<FC_ToDo> _FC_ToDo;
private EntitySet<SafetyPerformance> _SafetyPerformance;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -1411,6 +1441,8 @@ namespace Model
{
this._EMC_OneTimeContracts = new EntitySet<EMC_OneTimeContracts>(new Action<EMC_OneTimeContracts>(this.attach_EMC_OneTimeContracts), new Action<EMC_OneTimeContracts>(this.detach_EMC_OneTimeContracts));
this._FC_SESRelatedData = new EntitySet<FC_SESRelatedData>(new Action<FC_SESRelatedData>(this.attach_FC_SESRelatedData), new Action<FC_SESRelatedData>(this.detach_FC_SESRelatedData));
this._FC_ToDo = new EntitySet<FC_ToDo>(new Action<FC_ToDo>(this.attach_FC_ToDo), new Action<FC_ToDo>(this.detach_FC_ToDo));
this._SafetyPerformance = new EntitySet<SafetyPerformance>(new Action<SafetyPerformance>(this.attach_SafetyPerformance), new Action<SafetyPerformance>(this.detach_SafetyPerformance));
OnCreated();
}
@@ -1540,6 +1572,32 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_FC_ToDo_Base_Contractor", Storage="_FC_ToDo", ThisKey="ContractorId", OtherKey="ContractId", DeleteRule="NO ACTION")]
public EntitySet<FC_ToDo> FC_ToDo
{
get
{
return this._FC_ToDo;
}
set
{
this._FC_ToDo.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SafetyPerformance_Base_Contractor", Storage="_SafetyPerformance", ThisKey="ContractorId", OtherKey="ContractorId", DeleteRule="NO ACTION")]
public EntitySet<SafetyPerformance> SafetyPerformance
{
get
{
return this._SafetyPerformance;
}
set
{
this._SafetyPerformance.Assign(value);
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -1583,6 +1641,30 @@ namespace Model
this.SendPropertyChanging();
entity.Base_Contractor = null;
}
private void attach_FC_ToDo(FC_ToDo entity)
{
this.SendPropertyChanging();
entity.Base_Contractor = this;
}
private void detach_FC_ToDo(FC_ToDo entity)
{
this.SendPropertyChanging();
entity.Base_Contractor = null;
}
private void attach_SafetyPerformance(SafetyPerformance entity)
{
this.SendPropertyChanging();
entity.Base_Contractor = this;
}
private void detach_SafetyPerformance(SafetyPerformance entity)
{
this.SendPropertyChanging();
entity.Base_Contractor = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_Currency")]
@@ -12698,6 +12780,8 @@ namespace Model
private string _AuditResult;
private string _ToDoId;
private EntityRef<FC_SESRelatedData> _FC_SESRelatedData;
private EntityRef<Sys_User> _Sys_User;
@@ -12740,6 +12824,8 @@ namespace Model
partial void OnAuditDateChanged();
partial void OnAuditResultChanging(string value);
partial void OnAuditResultChanged();
partial void OnToDoIdChanging(string value);
partial void OnToDoIdChanged();
#endregion
public FC_ContractManagement()
@@ -13097,6 +13183,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToDoId", DbType="NVarChar(50)")]
public string ToDoId
{
get
{
return this._ToDoId;
}
set
{
if ((this._ToDoId != value))
{
this.OnToDoIdChanging(value);
this.SendPropertyChanging();
this._ToDoId = value;
this.SendPropertyChanged("ToDoId");
this.OnToDoIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_FC_ContractManagement_FC_SESRelatedData", Storage="_FC_SESRelatedData", ThisKey="FC_ID", OtherKey="ID", IsForeignKey=true)]
public FC_SESRelatedData FC_SESRelatedData
{
@@ -21626,6 +21732,390 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.FC_ToDo")]
public partial class FC_ToDo : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _ToDoId;
private string _FO_NO;
private string _ContractId;
private string _ToDoMan;
private string _ViolationBehavior;
private string _Result;
private System.Nullable<int> _Number;
private System.Nullable<int> _Number2;
private System.Nullable<bool> _IsHandle;
private System.Nullable<System.DateTime> _HandleDate;
private string _Def;
private EntityRef<Base_Contractor> _Base_Contractor;
private EntityRef<Sys_User> _Sys_User;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnToDoIdChanging(string value);
partial void OnToDoIdChanged();
partial void OnFO_NOChanging(string value);
partial void OnFO_NOChanged();
partial void OnContractIdChanging(string value);
partial void OnContractIdChanged();
partial void OnToDoManChanging(string value);
partial void OnToDoManChanged();
partial void OnViolationBehaviorChanging(string value);
partial void OnViolationBehaviorChanged();
partial void OnResultChanging(string value);
partial void OnResultChanged();
partial void OnNumberChanging(System.Nullable<int> value);
partial void OnNumberChanged();
partial void OnNumber2Changing(System.Nullable<int> value);
partial void OnNumber2Changed();
partial void OnIsHandleChanging(System.Nullable<bool> value);
partial void OnIsHandleChanged();
partial void OnHandleDateChanging(System.Nullable<System.DateTime> value);
partial void OnHandleDateChanged();
partial void OnDefChanging(string value);
partial void OnDefChanged();
#endregion
public FC_ToDo()
{
this._Base_Contractor = default(EntityRef<Base_Contractor>);
this._Sys_User = default(EntityRef<Sys_User>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToDoId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string ToDoId
{
get
{
return this._ToDoId;
}
set
{
if ((this._ToDoId != value))
{
this.OnToDoIdChanging(value);
this.SendPropertyChanging();
this._ToDoId = value;
this.SendPropertyChanged("ToDoId");
this.OnToDoIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FO_NO", DbType="NVarChar(50)")]
public string FO_NO
{
get
{
return this._FO_NO;
}
set
{
if ((this._FO_NO != value))
{
this.OnFO_NOChanging(value);
this.SendPropertyChanging();
this._FO_NO = value;
this.SendPropertyChanged("FO_NO");
this.OnFO_NOChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")]
public string ContractId
{
get
{
return this._ContractId;
}
set
{
if ((this._ContractId != value))
{
if (this._Base_Contractor.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnContractIdChanging(value);
this.SendPropertyChanging();
this._ContractId = value;
this.SendPropertyChanged("ContractId");
this.OnContractIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToDoMan", DbType="NVarChar(50)")]
public string ToDoMan
{
get
{
return this._ToDoMan;
}
set
{
if ((this._ToDoMan != value))
{
if (this._Sys_User.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnToDoManChanging(value);
this.SendPropertyChanging();
this._ToDoMan = value;
this.SendPropertyChanged("ToDoMan");
this.OnToDoManChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ViolationBehavior", DbType="NVarChar(50)")]
public string ViolationBehavior
{
get
{
return this._ViolationBehavior;
}
set
{
if ((this._ViolationBehavior != value))
{
this.OnViolationBehaviorChanging(value);
this.SendPropertyChanging();
this._ViolationBehavior = value;
this.SendPropertyChanged("ViolationBehavior");
this.OnViolationBehaviorChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Result", DbType="NVarChar(50)")]
public string Result
{
get
{
return this._Result;
}
set
{
if ((this._Result != value))
{
this.OnResultChanging(value);
this.SendPropertyChanging();
this._Result = value;
this.SendPropertyChanged("Result");
this.OnResultChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Number", DbType="Int")]
public System.Nullable<int> Number
{
get
{
return this._Number;
}
set
{
if ((this._Number != value))
{
this.OnNumberChanging(value);
this.SendPropertyChanging();
this._Number = value;
this.SendPropertyChanged("Number");
this.OnNumberChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Number2", DbType="Int")]
public System.Nullable<int> Number2
{
get
{
return this._Number2;
}
set
{
if ((this._Number2 != value))
{
this.OnNumber2Changing(value);
this.SendPropertyChanging();
this._Number2 = value;
this.SendPropertyChanged("Number2");
this.OnNumber2Changed();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsHandle", DbType="Bit")]
public System.Nullable<bool> IsHandle
{
get
{
return this._IsHandle;
}
set
{
if ((this._IsHandle != value))
{
this.OnIsHandleChanging(value);
this.SendPropertyChanging();
this._IsHandle = value;
this.SendPropertyChanged("IsHandle");
this.OnIsHandleChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleDate", DbType="DateTime")]
public System.Nullable<System.DateTime> HandleDate
{
get
{
return this._HandleDate;
}
set
{
if ((this._HandleDate != value))
{
this.OnHandleDateChanging(value);
this.SendPropertyChanging();
this._HandleDate = value;
this.SendPropertyChanged("HandleDate");
this.OnHandleDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Def", DbType="NVarChar(100)")]
public string Def
{
get
{
return this._Def;
}
set
{
if ((this._Def != value))
{
this.OnDefChanging(value);
this.SendPropertyChanging();
this._Def = value;
this.SendPropertyChanged("Def");
this.OnDefChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_FC_ToDo_Base_Contractor", Storage="_Base_Contractor", ThisKey="ContractId", OtherKey="ContractorId", IsForeignKey=true)]
public Base_Contractor Base_Contractor
{
get
{
return this._Base_Contractor.Entity;
}
set
{
Base_Contractor previousValue = this._Base_Contractor.Entity;
if (((previousValue != value)
|| (this._Base_Contractor.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Base_Contractor.Entity = null;
previousValue.FC_ToDo.Remove(this);
}
this._Base_Contractor.Entity = value;
if ((value != null))
{
value.FC_ToDo.Add(this);
this._ContractId = value.ContractorId;
}
else
{
this._ContractId = default(string);
}
this.SendPropertyChanged("Base_Contractor");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_FC_ToDo_Sys_User", Storage="_Sys_User", ThisKey="ToDoMan", OtherKey="UserId", IsForeignKey=true)]
public Sys_User Sys_User
{
get
{
return this._Sys_User.Entity;
}
set
{
Sys_User previousValue = this._Sys_User.Entity;
if (((previousValue != value)
|| (this._Sys_User.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Sys_User.Entity = null;
previousValue.FC_ToDo.Remove(this);
}
this._Sys_User.Entity = value;
if ((value != null))
{
value.FC_ToDo.Add(this);
this._ToDoMan = value.UserId;
}
else
{
this._ToDoMan = default(string);
}
this.SendPropertyChanged("Sys_User");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.FilesManagement")]
public partial class FilesManagement : INotifyPropertyChanging, INotifyPropertyChanged
{
@@ -21961,6 +22451,205 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SafetyPerformance")]
public partial class SafetyPerformance : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _SafetyPerformanceId;
private string _ContractorId;
private string _Years;
private string _YearPrize;
private System.Nullable<decimal> _Bonus;
private EntityRef<Base_Contractor> _Base_Contractor;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnSafetyPerformanceIdChanging(string value);
partial void OnSafetyPerformanceIdChanged();
partial void OnContractorIdChanging(string value);
partial void OnContractorIdChanged();
partial void OnYearsChanging(string value);
partial void OnYearsChanged();
partial void OnYearPrizeChanging(string value);
partial void OnYearPrizeChanged();
partial void OnBonusChanging(System.Nullable<decimal> value);
partial void OnBonusChanged();
#endregion
public SafetyPerformance()
{
this._Base_Contractor = default(EntityRef<Base_Contractor>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyPerformanceId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string SafetyPerformanceId
{
get
{
return this._SafetyPerformanceId;
}
set
{
if ((this._SafetyPerformanceId != value))
{
this.OnSafetyPerformanceIdChanging(value);
this.SendPropertyChanging();
this._SafetyPerformanceId = value;
this.SendPropertyChanged("SafetyPerformanceId");
this.OnSafetyPerformanceIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorId", DbType="NVarChar(50)")]
public string ContractorId
{
get
{
return this._ContractorId;
}
set
{
if ((this._ContractorId != value))
{
if (this._Base_Contractor.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnContractorIdChanging(value);
this.SendPropertyChanging();
this._ContractorId = value;
this.SendPropertyChanged("ContractorId");
this.OnContractorIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Years", DbType="NVarChar(10)")]
public string Years
{
get
{
return this._Years;
}
set
{
if ((this._Years != value))
{
this.OnYearsChanging(value);
this.SendPropertyChanging();
this._Years = value;
this.SendPropertyChanged("Years");
this.OnYearsChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearPrize", DbType="NVarChar(20)")]
public string YearPrize
{
get
{
return this._YearPrize;
}
set
{
if ((this._YearPrize != value))
{
this.OnYearPrizeChanging(value);
this.SendPropertyChanging();
this._YearPrize = value;
this.SendPropertyChanged("YearPrize");
this.OnYearPrizeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Bonus", DbType="Decimal(9,2)")]
public System.Nullable<decimal> Bonus
{
get
{
return this._Bonus;
}
set
{
if ((this._Bonus != value))
{
this.OnBonusChanging(value);
this.SendPropertyChanging();
this._Bonus = value;
this.SendPropertyChanged("Bonus");
this.OnBonusChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SafetyPerformance_Base_Contractor", Storage="_Base_Contractor", ThisKey="ContractorId", OtherKey="ContractorId", IsForeignKey=true)]
public Base_Contractor Base_Contractor
{
get
{
return this._Base_Contractor.Entity;
}
set
{
Base_Contractor previousValue = this._Base_Contractor.Entity;
if (((previousValue != value)
|| (this._Base_Contractor.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Base_Contractor.Entity = null;
previousValue.SafetyPerformance.Remove(this);
}
this._Base_Contractor.Entity = value;
if ((value != null))
{
value.SafetyPerformance.Add(this);
this._ContractorId = value.ContractorId;
}
else
{
this._ContractorId = default(string);
}
this.SendPropertyChanged("Base_Contractor");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Score_JournalEvaluation")]
public partial class Score_JournalEvaluation : INotifyPropertyChanging, INotifyPropertyChanged
{
@@ -26699,6 +27388,8 @@ namespace Model
private EntitySet<FC_SignedContracts> _FC_SignedContracts;
private EntitySet<FC_ToDo> _FC_ToDo;
private EntitySet<SSR> _SSR;
private EntitySet<SSR> _SSR_Sys_User1;
@@ -26773,6 +27464,7 @@ namespace Model
this._FC_SESRelatedData_Sys_User1 = new EntitySet<FC_SESRelatedData>(new Action<FC_SESRelatedData>(this.attach_FC_SESRelatedData_Sys_User1), new Action<FC_SESRelatedData>(this.detach_FC_SESRelatedData_Sys_User1));
this._FC_SESRelatedData_Sys_User2 = new EntitySet<FC_SESRelatedData>(new Action<FC_SESRelatedData>(this.attach_FC_SESRelatedData_Sys_User2), new Action<FC_SESRelatedData>(this.detach_FC_SESRelatedData_Sys_User2));
this._FC_SignedContracts = new EntitySet<FC_SignedContracts>(new Action<FC_SignedContracts>(this.attach_FC_SignedContracts), new Action<FC_SignedContracts>(this.detach_FC_SignedContracts));
this._FC_ToDo = new EntitySet<FC_ToDo>(new Action<FC_ToDo>(this.attach_FC_ToDo), new Action<FC_ToDo>(this.detach_FC_ToDo));
this._SSR = new EntitySet<SSR>(new Action<SSR>(this.attach_SSR), new Action<SSR>(this.detach_SSR));
this._SSR_Sys_User1 = new EntitySet<SSR>(new Action<SSR>(this.attach_SSR_Sys_User1), new Action<SSR>(this.detach_SSR_Sys_User1));
this._StandardTemplate = new EntitySet<StandardTemplate>(new Action<StandardTemplate>(this.attach_StandardTemplate), new Action<StandardTemplate>(this.detach_StandardTemplate));
@@ -27340,6 +28032,19 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_FC_ToDo_Sys_User", Storage="_FC_ToDo", ThisKey="UserId", OtherKey="ToDoMan", DeleteRule="NO ACTION")]
public EntitySet<FC_ToDo> FC_ToDo
{
get
{
return this._FC_ToDo;
}
set
{
this._FC_ToDo.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SSR_Sys_User", Storage="_SSR", ThisKey="UserId", OtherKey="RequisitionerId", DeleteRule="NO ACTION")]
public EntitySet<SSR> SSR
{
@@ -27698,6 +28403,18 @@ namespace Model
entity.Sys_User = null;
}
private void attach_FC_ToDo(FC_ToDo entity)
{
this.SendPropertyChanging();
entity.Sys_User = this;
}
private void detach_FC_ToDo(FC_ToDo entity)
{
this.SendPropertyChanging();
entity.Sys_User = null;
}
private void attach_SSR(SSR entity)
{
this.SendPropertyChanging();
@@ -28062,6 +28779,8 @@ namespace Model
private string _Contractor;
private string _ContractorId;
private string _DisciplineId;
private string _Discipline;
@@ -28080,6 +28799,8 @@ namespace Model
private System.Nullable<System.DateTime> _Expire_Date;
private string _FC_Status;
private System.Nullable<decimal> _YearDiff;
private System.Nullable<decimal> _Spending_commitment;
@@ -28232,6 +28953,22 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorId", DbType="NVarChar(50)")]
public string ContractorId
{
get
{
return this._ContractorId;
}
set
{
if ((this._ContractorId != value))
{
this._ContractorId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DisciplineId", DbType="NVarChar(50)")]
public string DisciplineId
{
@@ -28376,6 +29113,22 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FC_Status", DbType="NVarChar(50)")]
public string FC_Status
{
get
{
return this._FC_Status;
}
set
{
if ((this._FC_Status != value))
{
this._FC_Status = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearDiff", DbType="Decimal(9,2)")]
public System.Nullable<decimal> YearDiff
{
+6 -4
View File
@@ -14,7 +14,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebApi</RootNamespace>
<AssemblyName>WebApi</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
@@ -25,6 +25,7 @@
<UseGlobalApplicationHostFile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -52,13 +53,13 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Routing" />
@@ -112,6 +113,7 @@
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.9\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="WebActivatorEx, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4, processorArchitecture=MSIL">
<HintPath>..\packages\WebActivatorEx.2.0\lib\net40\WebActivatorEx.dll</HintPath>
</Reference>