135 lines
5.6 KiB
C#
135 lines
5.6 KiB
C#
using System.Linq;
|
|
|
|
namespace BLL
|
|
{
|
|
/// <summary>
|
|
/// 涉及交工资料的合同
|
|
/// </summary>
|
|
public class FCListService
|
|
{
|
|
/// <summary>
|
|
/// 根据主键获取涉及交工资料的合同
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
public static Model.FC_List GetFCListDataById(string id)
|
|
{
|
|
return Funs.DB.FC_List.FirstOrDefault(e => e.FCListId == id);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据合同号获取涉及交工资料的合同
|
|
/// </summary>
|
|
/// <param name="fO_NO"></param>
|
|
/// <returns></returns>
|
|
public static Model.FC_List GetFCListDataByFoNo(string fO_NO)
|
|
{
|
|
return Funs.DB.FC_List.FirstOrDefault(e => e.FO_No == fO_NO);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加
|
|
/// </summary>
|
|
/// <param name="fcList"></param>
|
|
public static void AddFCList(Model.FC_List fcList)
|
|
{
|
|
Model.FC_List newFCList = new Model.FC_List();
|
|
newFCList.FCListId = fcList.FCListId;
|
|
newFCList.No = fcList.No;
|
|
newFCList.ContractTitle = fcList.ContractTitle;
|
|
newFCList.Contractor = fcList.Contractor;
|
|
newFCList.FO_No = fcList.FO_No;
|
|
newFCList.Contract_Admin = fcList.Contract_Admin;
|
|
newFCList.Cost_Checker = fcList.Cost_Checker;
|
|
newFCList.Buyer = fcList.Buyer;
|
|
newFCList.Main_Coordinator = fcList.Main_Coordinator;
|
|
newFCList.Pricing_Scheme = fcList.Pricing_Scheme;
|
|
newFCList.Item = fcList.Item;
|
|
newFCList.Material_Group = fcList.Material_Group;
|
|
newFCList.Purchase_Group = fcList.Purchase_Group;
|
|
newFCList.Cost_Element = fcList.Cost_Element;
|
|
newFCList.Vendor_No = fcList.Vendor_No;
|
|
newFCList.Currency = fcList.Currency;
|
|
newFCList.OriginalW = fcList.OriginalW;
|
|
newFCList.Type = fcList.Type;
|
|
newFCList.User_Representative = fcList.User_Representative;
|
|
newFCList.Applicant = fcList.Applicant;
|
|
newFCList.Validate_Date = fcList.Validate_Date;
|
|
newFCList.Expire_Date = fcList.Expire_Date;
|
|
newFCList.FC_Status = fcList.FC_Status;
|
|
newFCList.Contact_Person = fcList.Contact_Person;
|
|
newFCList.Tel = fcList.Tel;
|
|
newFCList.Total_Budget = fcList.Total_Budget;
|
|
newFCList.FC_Definition = fcList.FC_Definition;
|
|
newFCList.Actual_Budget = fcList.Actual_Budget;
|
|
newFCList.Key_Contractor = fcList.Key_Contractor;
|
|
newFCList.First_Meeting = fcList.First_Meeting;
|
|
newFCList.Second_Meeting = fcList.Second_Meeting;
|
|
newFCList.Third_Meeting = fcList.Third_Meeting;
|
|
newFCList.Fourth_Meeting = fcList.Fourth_Meeting;
|
|
Funs.DB.FC_List.InsertOnSubmit(newFCList);
|
|
Funs.DB.SubmitChanges();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 修改
|
|
/// </summary>
|
|
/// <param name="fcList"></param>
|
|
public static void UpdateFCList(Model.FC_List fcList)
|
|
{
|
|
Model.FC_List newFCList = Funs.DB.FC_List.FirstOrDefault(e => e.FCListId == fcList.FCListId);
|
|
if (newFCList != null)
|
|
{
|
|
newFCList.No = fcList.No;
|
|
newFCList.ContractTitle = fcList.ContractTitle;
|
|
newFCList.Contractor = fcList.Contractor;
|
|
newFCList.FO_No = fcList.FO_No;
|
|
newFCList.Contract_Admin = fcList.Contract_Admin;
|
|
newFCList.Cost_Checker = fcList.Cost_Checker;
|
|
newFCList.Buyer = fcList.Buyer;
|
|
newFCList.Main_Coordinator = fcList.Main_Coordinator;
|
|
newFCList.Pricing_Scheme = fcList.Pricing_Scheme;
|
|
newFCList.Item = fcList.Item;
|
|
newFCList.Material_Group = fcList.Material_Group;
|
|
newFCList.Purchase_Group = fcList.Purchase_Group;
|
|
newFCList.Cost_Element = fcList.Cost_Element;
|
|
newFCList.Vendor_No = fcList.Vendor_No;
|
|
newFCList.Currency = fcList.Currency;
|
|
newFCList.OriginalW = fcList.OriginalW;
|
|
newFCList.Type = fcList.Type;
|
|
newFCList.User_Representative = fcList.User_Representative;
|
|
newFCList.Applicant = fcList.Applicant;
|
|
newFCList.Validate_Date = fcList.Validate_Date;
|
|
newFCList.Expire_Date = fcList.Expire_Date;
|
|
newFCList.FC_Status = fcList.FC_Status;
|
|
newFCList.Contact_Person = fcList.Contact_Person;
|
|
newFCList.Tel = fcList.Tel;
|
|
newFCList.Total_Budget = fcList.Total_Budget;
|
|
newFCList.FC_Definition = fcList.FC_Definition;
|
|
newFCList.Actual_Budget = fcList.Actual_Budget;
|
|
newFCList.Key_Contractor = fcList.Key_Contractor;
|
|
newFCList.First_Meeting = fcList.First_Meeting;
|
|
newFCList.Second_Meeting = fcList.Second_Meeting;
|
|
newFCList.Third_Meeting = fcList.Third_Meeting;
|
|
newFCList.Fourth_Meeting = fcList.Fourth_Meeting;
|
|
Funs.DB.SubmitChanges();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据主键删除
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
|
|
public static void DeleteFCListByFoNo(string foNo)
|
|
{
|
|
Model.FC_List fcList = Funs.DB.FC_List.FirstOrDefault(e => e.FO_No == foNo);
|
|
if (fcList != null)
|
|
{
|
|
Funs.DB.FC_List.DeleteOnSubmit(fcList);
|
|
Funs.DB.SubmitChanges();
|
|
}
|
|
}
|
|
}
|
|
}
|