first commit
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 开车物资请购管理
|
||||
/// </summary>
|
||||
public static class GoodsBuyService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取开车物资请购管理信息
|
||||
/// </summary>
|
||||
/// <param name="GoodsBuyId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.DriverGoods_GoodsBuy GetGoodsBuyById(string GoodsBuyId)
|
||||
{
|
||||
return Funs.DB.DriverGoods_GoodsBuy.FirstOrDefault(e => e.GoodsBuyId == GoodsBuyId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加开车物资请购管理信息
|
||||
/// </summary>
|
||||
/// <param name="GoodsBuy"></param>
|
||||
public static void AddGoodsBuy(Model.DriverGoods_GoodsBuy GoodsBuy)
|
||||
{
|
||||
Model.DriverGoods_GoodsBuy newGoodsBuy = new Model.DriverGoods_GoodsBuy();
|
||||
newGoodsBuy.GoodsBuyId = GoodsBuy.GoodsBuyId;
|
||||
newGoodsBuy.ProjectId = GoodsBuy.ProjectId;
|
||||
newGoodsBuy.Code = GoodsBuy.Code;
|
||||
newGoodsBuy.BuyName = GoodsBuy.BuyName;
|
||||
newGoodsBuy.BuyCode = GoodsBuy.BuyCode;
|
||||
newGoodsBuy.CompileMan = GoodsBuy.CompileMan;
|
||||
newGoodsBuy.ApprovalDate = GoodsBuy.ApprovalDate;
|
||||
newGoodsBuy.SubmitDate = GoodsBuy.SubmitDate;
|
||||
newGoodsBuy.GetGoodsDate = GoodsBuy.GetGoodsDate;
|
||||
newGoodsBuy.AttachUrl = GoodsBuy.AttachUrl;
|
||||
newGoodsBuy.Remark = GoodsBuy.Remark;
|
||||
Funs.DB.DriverGoods_GoodsBuy.InsertOnSubmit(newGoodsBuy);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改开车物资请购管理
|
||||
/// </summary>
|
||||
/// <param name="GoodsBuy"></param>
|
||||
public static void UpdateGoodsBuy(Model.DriverGoods_GoodsBuy GoodsBuy)
|
||||
{
|
||||
Model.DriverGoods_GoodsBuy newGoodsBuy = Funs.DB.DriverGoods_GoodsBuy.FirstOrDefault(e => e.GoodsBuyId == GoodsBuy.GoodsBuyId);
|
||||
if (newGoodsBuy != null)
|
||||
{
|
||||
newGoodsBuy.Code = GoodsBuy.Code;
|
||||
newGoodsBuy.BuyName = GoodsBuy.BuyName;
|
||||
newGoodsBuy.BuyCode = GoodsBuy.BuyCode;
|
||||
//newGoodsBuy.CompileMan = GoodsBuy.CompileMan;
|
||||
newGoodsBuy.ApprovalDate = GoodsBuy.ApprovalDate;
|
||||
newGoodsBuy.SubmitDate = GoodsBuy.SubmitDate;
|
||||
newGoodsBuy.GetGoodsDate = GoodsBuy.GetGoodsDate;
|
||||
newGoodsBuy.AttachUrl = GoodsBuy.AttachUrl;
|
||||
newGoodsBuy.Remark = GoodsBuy.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除开车物资请购管理
|
||||
/// </summary>
|
||||
/// <param name="GoodsBuyId"></param>
|
||||
public static void DeleteGoodsBuy(string GoodsBuyId)
|
||||
{
|
||||
Model.DriverGoods_GoodsBuy GoodsBuy = Funs.DB.DriverGoods_GoodsBuy.FirstOrDefault(e => e.GoodsBuyId == GoodsBuyId);
|
||||
if (GoodsBuy != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(GoodsBuy.AttachUrl))
|
||||
{
|
||||
BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, GoodsBuy.AttachUrl);//删除附件
|
||||
}
|
||||
Funs.DB.DriverGoods_GoodsBuy.DeleteOnSubmit(GoodsBuy);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 开车物资计划
|
||||
/// </summary>
|
||||
public static class GoodsPlanService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取开车物资计划信息
|
||||
/// </summary>
|
||||
/// <param name="GoodsPlanId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.DriverGoods_GoodsPlan GetGoodsPlanById(string GoodsPlanId)
|
||||
{
|
||||
return Funs.DB.DriverGoods_GoodsPlan.FirstOrDefault(e => e.GoodsPlanId == GoodsPlanId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加开车物资计划信息
|
||||
/// </summary>
|
||||
/// <param name="GoodsPlan"></param>
|
||||
public static void AddGoodsPlan(Model.DriverGoods_GoodsPlan GoodsPlan)
|
||||
{
|
||||
Model.DriverGoods_GoodsPlan newGoodsPlan = new Model.DriverGoods_GoodsPlan();
|
||||
newGoodsPlan.GoodsPlanId = GoodsPlan.GoodsPlanId;
|
||||
newGoodsPlan.ProjectId = GoodsPlan.ProjectId;
|
||||
newGoodsPlan.Code = GoodsPlan.Code;
|
||||
newGoodsPlan.PlanName = GoodsPlan.PlanName;
|
||||
newGoodsPlan.PlanCode = GoodsPlan.PlanCode;
|
||||
newGoodsPlan.CompileMan = GoodsPlan.CompileMan;
|
||||
newGoodsPlan.ApprovalDate = GoodsPlan.ApprovalDate;
|
||||
newGoodsPlan.AttachUrl = GoodsPlan.AttachUrl;
|
||||
newGoodsPlan.Remark = GoodsPlan.Remark;
|
||||
Funs.DB.DriverGoods_GoodsPlan.InsertOnSubmit(newGoodsPlan);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改开车物资计划
|
||||
/// </summary>
|
||||
/// <param name="GoodsPlan"></param>
|
||||
public static void UpdateGoodsPlan(Model.DriverGoods_GoodsPlan GoodsPlan)
|
||||
{
|
||||
Model.DriverGoods_GoodsPlan newGoodsPlan = Funs.DB.DriverGoods_GoodsPlan.FirstOrDefault(e => e.GoodsPlanId == GoodsPlan.GoodsPlanId);
|
||||
if (newGoodsPlan != null)
|
||||
{
|
||||
newGoodsPlan.Code = GoodsPlan.Code;
|
||||
newGoodsPlan.PlanName = GoodsPlan.PlanName;
|
||||
newGoodsPlan.PlanCode = GoodsPlan.PlanCode;
|
||||
//newGoodsPlan.CompileMan = GoodsPlan.CompileMan;
|
||||
newGoodsPlan.ApprovalDate = GoodsPlan.ApprovalDate;
|
||||
newGoodsPlan.AttachUrl = GoodsPlan.AttachUrl;
|
||||
newGoodsPlan.Remark = GoodsPlan.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除开车物资计划
|
||||
/// </summary>
|
||||
/// <param name="GoodsPlanId"></param>
|
||||
public static void DeleteGoodsPlan(string GoodsPlanId)
|
||||
{
|
||||
Model.DriverGoods_GoodsPlan GoodsPlan = Funs.DB.DriverGoods_GoodsPlan.FirstOrDefault(e => e.GoodsPlanId == GoodsPlanId);
|
||||
if (GoodsPlan != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(GoodsPlan.AttachUrl))
|
||||
{
|
||||
BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, GoodsPlan.AttachUrl);//删除附件
|
||||
}
|
||||
Funs.DB.DriverGoods_GoodsPlan.DeleteOnSubmit(GoodsPlan);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 开车材料跟踪管理
|
||||
/// </summary>
|
||||
public static class MaterialTraceService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取开车材料跟踪管理信息
|
||||
/// </summary>
|
||||
/// <param name="MaterialTraceId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.DriverGoods_MaterialTrace GetMaterialTraceById(string MaterialTraceId)
|
||||
{
|
||||
return Funs.DB.DriverGoods_MaterialTrace.FirstOrDefault(e => e.MaterialTraceId == MaterialTraceId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加开车材料跟踪管理信息
|
||||
/// </summary>
|
||||
/// <param name="MaterialTrace"></param>
|
||||
public static void AddMaterialTrace(Model.DriverGoods_MaterialTrace MaterialTrace)
|
||||
{
|
||||
Model.DriverGoods_MaterialTrace newMaterialTrace = new Model.DriverGoods_MaterialTrace();
|
||||
newMaterialTrace.MaterialTraceId = MaterialTrace.MaterialTraceId;
|
||||
newMaterialTrace.ProjectId = MaterialTrace.ProjectId;
|
||||
newMaterialTrace.Code = MaterialTrace.Code;
|
||||
newMaterialTrace.Type = MaterialTrace.Type;
|
||||
newMaterialTrace.MaterialName = MaterialTrace.MaterialName;
|
||||
newMaterialTrace.SpecificationModel = MaterialTrace.SpecificationModel;
|
||||
newMaterialTrace.BatchStorage_1 = MaterialTrace.BatchStorage_1;
|
||||
newMaterialTrace.BatchStorage_2 = MaterialTrace.BatchStorage_2;
|
||||
newMaterialTrace.BatchStorage_3 = MaterialTrace.BatchStorage_3;
|
||||
newMaterialTrace.BatchOutStorage_1 = MaterialTrace.BatchOutStorage_1;
|
||||
newMaterialTrace.BatchOutStorage_2 = MaterialTrace.BatchOutStorage_2;
|
||||
newMaterialTrace.BatchOutStorage_3 = MaterialTrace.BatchOutStorage_3;
|
||||
newMaterialTrace.BatchOutStorage_4 = MaterialTrace.BatchOutStorage_4;
|
||||
newMaterialTrace.BatchOutStorage_5 = MaterialTrace.BatchOutStorage_5;
|
||||
newMaterialTrace.BatchOutStorage_6 = MaterialTrace.BatchOutStorage_6;
|
||||
newMaterialTrace.BatchSurplus_1 = MaterialTrace.BatchSurplus_1;
|
||||
newMaterialTrace.BatchSurplus_2 = MaterialTrace.BatchSurplus_2;
|
||||
newMaterialTrace.BatchSurplus_3 = MaterialTrace.BatchSurplus_3;
|
||||
newMaterialTrace.BatchSurplus_4 = MaterialTrace.BatchSurplus_4;
|
||||
newMaterialTrace.BatchSurplus_5 = MaterialTrace.BatchSurplus_5;
|
||||
newMaterialTrace.BatchSurplus_6 = MaterialTrace.BatchSurplus_6;
|
||||
newMaterialTrace.AttachUrl = MaterialTrace.AttachUrl;
|
||||
newMaterialTrace.Remark = MaterialTrace.Remark;
|
||||
Funs.DB.DriverGoods_MaterialTrace.InsertOnSubmit(newMaterialTrace);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改开车材料跟踪管理
|
||||
/// </summary>
|
||||
/// <param name="MaterialTrace"></param>
|
||||
public static void UpdateMaterialTrace(Model.DriverGoods_MaterialTrace MaterialTrace)
|
||||
{
|
||||
Model.DriverGoods_MaterialTrace newMaterialTrace = Funs.DB.DriverGoods_MaterialTrace.FirstOrDefault(e => e.MaterialTraceId == MaterialTrace.MaterialTraceId);
|
||||
if (newMaterialTrace != null)
|
||||
{
|
||||
newMaterialTrace.Code = MaterialTrace.Code;
|
||||
newMaterialTrace.Type = MaterialTrace.Type;
|
||||
newMaterialTrace.MaterialName = MaterialTrace.MaterialName;
|
||||
newMaterialTrace.SpecificationModel = MaterialTrace.SpecificationModel;
|
||||
newMaterialTrace.BatchStorage_1 = MaterialTrace.BatchStorage_1;
|
||||
newMaterialTrace.BatchStorage_2 = MaterialTrace.BatchStorage_2;
|
||||
newMaterialTrace.BatchStorage_3 = MaterialTrace.BatchStorage_3;
|
||||
newMaterialTrace.BatchOutStorage_1 = MaterialTrace.BatchOutStorage_1;
|
||||
newMaterialTrace.BatchOutStorage_2 = MaterialTrace.BatchOutStorage_2;
|
||||
newMaterialTrace.BatchOutStorage_3 = MaterialTrace.BatchOutStorage_3;
|
||||
newMaterialTrace.BatchOutStorage_4 = MaterialTrace.BatchOutStorage_4;
|
||||
newMaterialTrace.BatchOutStorage_5 = MaterialTrace.BatchOutStorage_5;
|
||||
newMaterialTrace.BatchOutStorage_6 = MaterialTrace.BatchOutStorage_6;
|
||||
newMaterialTrace.BatchSurplus_1 = MaterialTrace.BatchSurplus_1;
|
||||
newMaterialTrace.BatchSurplus_2 = MaterialTrace.BatchSurplus_2;
|
||||
newMaterialTrace.BatchSurplus_3 = MaterialTrace.BatchSurplus_3;
|
||||
newMaterialTrace.BatchSurplus_4 = MaterialTrace.BatchSurplus_4;
|
||||
newMaterialTrace.BatchSurplus_5 = MaterialTrace.BatchSurplus_5;
|
||||
newMaterialTrace.BatchSurplus_6 = MaterialTrace.BatchSurplus_6;
|
||||
newMaterialTrace.AttachUrl = MaterialTrace.AttachUrl;
|
||||
newMaterialTrace.Remark = MaterialTrace.Remark;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除开车材料跟踪管理
|
||||
/// </summary>
|
||||
/// <param name="MaterialTraceId"></param>
|
||||
public static void DeleteMaterialTrace(string MaterialTraceId)
|
||||
{
|
||||
Model.DriverGoods_MaterialTrace MaterialTrace = Funs.DB.DriverGoods_MaterialTrace.FirstOrDefault(e => e.MaterialTraceId == MaterialTraceId);
|
||||
if (MaterialTrace != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(MaterialTrace.AttachUrl))
|
||||
{
|
||||
BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, MaterialTrace.AttachUrl);//删除附件
|
||||
}
|
||||
Funs.DB.DriverGoods_MaterialTrace.DeleteOnSubmit(MaterialTrace);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user