提交代码

This commit is contained in:
高飞 2024-02-26 16:45:05 +08:00
parent 1f40c4aa91
commit f227bbeba2
26 changed files with 2379 additions and 85 deletions

View File

@ -0,0 +1,54 @@
alter table [dbo].[DriverRun_DriverRun] add InstallationId nvarchar(500) null
GO
alter table [dbo].[DriverRun_DriverRun] add InstallationNames nvarchar(500) null
GO
alter table [dbo].[DriverRun_DriverRun] add Objective nvarchar(500) null
GO
alter table [dbo].[DriverRun_DriverRun] add NeedCompletedDate datetime null
GO
alter table [dbo].[DriverRun_DriverRun] add CompileMan nvarchar(50) null
GO
alter table [dbo].[DriverRun_DriverRun] add CompileDate datetime null
GO
alter table [dbo].[DriverRun_DriverRun] add State char(1) null
GO
alter table [dbo].[DriverRun_DriverRun] add RealCompletedDate datetime null
GO
alter table [dbo].[DriverPrepare_SchemePlanItem] add FileCode nvarchar(100) null
GO
alter table [dbo].[DriverPrepare_SchemePlanItem] add CompileMan nvarchar(50) null
GO
alter table [dbo].[DriverPrepare_SchemePlanItem] add PlanCompletedDate datetime null
GO
CREATE TABLE [dbo].[DriverRun_DriverRunApprove](
[DriverRunApproveId] [nvarchar](50) NOT NULL,
[DriverRunId] [nvarchar](50) NULL,
[ApproveMan] [nvarchar](50) NULL,
[ApproveDate] [datetime] NULL,
[IsAgree] [bit] NULL,
[ApproveIdea] [nvarchar](200) NULL,
[ApproveType] [char](1) NULL,
[AttachUrl] [nvarchar](200) NULL,
CONSTRAINT [PK_DriverRun_DriverRunApprove] PRIMARY KEY CLUSTERED
(
[DriverRunApproveId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[DriverRun_DriverRunApprove] WITH CHECK ADD CONSTRAINT [FK_DriverRun_DriverRunApprove_DriverRun_DriverRun] FOREIGN KEY([DriverRunId])
REFERENCES [dbo].[DriverRun_DriverRun] ([DriverRunId])
GO
ALTER TABLE [dbo].[DriverRun_DriverRunApprove] CHECK CONSTRAINT [FK_DriverRun_DriverRunApprove_DriverRun_DriverRun]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¿ª³µ±£Ô˹ÜÀíÉóÅú±í' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DriverRun_DriverRunApprove'
GO

View File

@ -744,6 +744,7 @@
<Compile Include="TestRun\DriverPrepare\DriverPrepareSchemePlanService.cs" />
<Compile Include="TestRun\DriverProgressService.cs" />
<Compile Include="TestRun\DriverReport\DriverReportService.cs" />
<Compile Include="TestRun\DriverRun\DriverRunApproveService.cs" />
<Compile Include="TestRun\DriverRun\DriverRunContactService.cs" />
<Compile Include="TestRun\DriverRun\DriverRunPlanService.cs" />
<Compile Include="TestRun\DriverRun\DriverRunService.cs" />

View File

@ -4748,6 +4748,39 @@ namespace BLL
#endregion
#region
#region
/// <summary>
/// 编制
/// </summary>
public const string DriverRun_Compile = "1";
/// <summary>
/// 开车负责人审批
/// </summary>
public static string DriverRun_Audit1 = "2";
/// <summary>
/// 保运主任审批
/// </summary>
public static string DriverRun_Audit2 = "3";
/// <summary>
/// 保运主任确认完成
/// </summary>
public static string DriverRun_Audit3 = "4";
/// <summary>
/// 开车负责人确认完成
/// </summary>
public static string DriverRun_Audit4 = "5";
/// <summary>
/// 流程闭环
/// </summary>
public static string DriverRun_Complete = "6";
#endregion
#endregion
#region
#region Id

View File

@ -928,6 +928,18 @@ namespace BLL
}
}
public static void Init2(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
{
dropName.DataValueField = "Value";
dropName.DataTextField = "Text";
dropName.DataSource = GetMainUserList(projectId);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
/// <summary>
/// 根据施工单位、单位工程、专业获取查看信息用户
/// </summary>

View File

@ -0,0 +1,273 @@
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class DriverRunApproveService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 获取开车保运管理模板列表
/// </summary>
/// <param name="satartRowIndex"></param>
/// <param name="maximumRows"></param>
/// <returns></returns>
public static DataTable getListData(string DriverRunId)
{
var res = from x in db.DriverRun_DriverRunApprove
where x.DriverRunId == DriverRunId && x.ApproveDate != null && x.ApproveType != "S"
orderby x.ApproveDate
select new
{
x.DriverRunApproveId,
x.DriverRunId,
ApproveMan = (from y in db.Sys_User where y.UserId == x.ApproveMan select y.UserName).First(),
x.ApproveDate,
x.IsAgree,
x.ApproveIdea,
x.ApproveType,
};
return Funs.LINQToDataTable(res);
}
/// <summary>
/// 根据开车保运管理编号删除对应的所有开车保运管理审批信息
/// </summary>
/// <param name="DriverRunId">开车保运管理编号</param>
public static void DeleteDriverRunApprovesByDriverRunId(string DriverRunId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.DriverRun_DriverRunApprove where x.DriverRunId == DriverRunId select x).ToList();
db.DriverRun_DriverRunApprove.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
/// <summary>
/// 获取登录人的通知信息
/// </summary>
/// <param name="DriverRunId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public static IQueryable getList(string userId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var res = from x in db.DriverRun_DriverRunApprove
join ca in db.DriverRun_DriverRun on x.DriverRunId equals ca.DriverRunId
where x.ApproveDate == null && x.ApproveType == "S" && x.ApproveMan == userId
orderby x.ApproveDate
select new
{
//x.DriverRunApproveId,
x.DriverRunId,
//x.ApproveDate,
//x.IsAgree,
//x.ApproveIdea,
//x.ApproveType,
ca.Code
};
return res.AsQueryable().Distinct();
}
}
/// <summary>
/// 更新通知信息提醒
/// </summary>
/// <param name="DriverRunId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public static Model.DriverRun_DriverRunApprove GetSee(string DriverRunId, string userId)
{
return db.DriverRun_DriverRunApprove.FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
}
public static void See(string DriverRunId, string userId)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
{
var res = db.DriverRun_DriverRunApprove.FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
if (res != null)
{
res.ApproveDate = DateTime.Now;
db.SubmitChanges();
}
}
}
/// <summary>
/// 根据开车保运管理编号获取一个开车保运管理审批信息
/// </summary>
/// <param name="DriverRunId">开车保运管理编号</param>
/// <returns>一个开车保运管理审批实体</returns>
public static Model.DriverRun_DriverRunApprove GetDriverRunApproveByDriverRunId(string DriverRunId)
{
return db.DriverRun_DriverRunApprove.FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType != "S" && x.ApproveDate == null);
}
/// <summary>
/// 修改开车保运管理审批信息
/// </summary>
/// <param name="managerRuleApprove">开车保运管理审批实体</param>
public static void UpdateDriverRunApprove(Model.DriverRun_DriverRunApprove approve)
{
Model.SGGLDB db = Funs.DB;
Model.DriverRun_DriverRunApprove newApprove = db.DriverRun_DriverRunApprove.First(e => e.DriverRunApproveId == approve.DriverRunApproveId && e.ApproveDate == null);
newApprove.DriverRunId = approve.DriverRunId;
newApprove.ApproveMan = approve.ApproveMan;
newApprove.ApproveDate = approve.ApproveDate;
newApprove.ApproveIdea = approve.ApproveIdea;
newApprove.IsAgree = approve.IsAgree;
newApprove.ApproveType = approve.ApproveType;
db.SubmitChanges();
}
/// <summary>
/// 增加开车保运管理审批信息
/// </summary>
/// <param name="managerRuleApprove">开车保运管理审批实体</param>
public static void AddDriverRunApprove(Model.DriverRun_DriverRunApprove approve)
{
Model.SGGLDB db = Funs.DB;
string newKeyID = SQLHelper.GetNewID(typeof(Model.DriverRun_DriverRunApprove));
Model.DriverRun_DriverRunApprove newApprove = new Model.DriverRun_DriverRunApprove();
newApprove.DriverRunApproveId = newKeyID;
newApprove.DriverRunId = approve.DriverRunId;
newApprove.ApproveMan = approve.ApproveMan;
newApprove.ApproveDate = approve.ApproveDate;
newApprove.ApproveIdea = approve.ApproveIdea;
newApprove.IsAgree = approve.IsAgree;
newApprove.ApproveType = approve.ApproveType;
db.DriverRun_DriverRunApprove.InsertOnSubmit(newApprove);
db.SubmitChanges();
}
public static string AddDriverRunApproveForApi(Model.DriverRun_DriverRunApprove approve)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
{
string newKeyID = SQLHelper.GetNewID(typeof(Model.DriverRun_DriverRunApprove));
Model.DriverRun_DriverRunApprove newApprove = new Model.DriverRun_DriverRunApprove();
newApprove.DriverRunApproveId = newKeyID;
newApprove.DriverRunId = approve.DriverRunId;
newApprove.ApproveMan = approve.ApproveMan;
newApprove.ApproveDate = approve.ApproveDate;
newApprove.ApproveIdea = approve.ApproveIdea;
newApprove.IsAgree = approve.IsAgree;
newApprove.ApproveType = approve.ApproveType;
db.DriverRun_DriverRunApprove.InsertOnSubmit(newApprove);
db.SubmitChanges();
return newKeyID;
}
}
/// <summary>
/// 开车负责人审批信息
/// </summary>
/// <param name="DriverRunId"></param>
/// <returns></returns>
public static Model.DriverRun_DriverRunApprove GetAudit1(string DriverRunId)
{
return db.DriverRun_DriverRunApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == BLL.Const.DriverRun_Audit1);
}
/// <summary>
/// 保运主任审批信息
/// </summary>
/// <param name="DriverRunId"></param>
/// <returns></returns>
public static Model.DriverRun_DriverRunApprove GetAudit2(string DriverRunId)
{
return db.DriverRun_DriverRunApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == BLL.Const.DriverRun_Audit2);
}
/// <summary>
/// 分包负责人审批信息
/// </summary>
/// <param name="DriverRunId"></param>
/// <returns></returns>
public static Model.DriverRun_DriverRunApprove GetAudit3(string DriverRunId)
{
return db.DriverRun_DriverRunApprove.OrderByDescending(x => x.ApproveDate).FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == BLL.Const.DriverRun_Audit3);
}
public static Model.DriverRun_DriverRunApprove GetComplie(string DriverRunId)
{
return db.DriverRun_DriverRunApprove.FirstOrDefault(x => x.DriverRunId == DriverRunId && x.ApproveType == BLL.Const.DriverRun_Compile);
}
public static List<Model.DriverRun_DriverRunApprove> GetListDataByCodeForApi(string code)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
{
var q = from x in db.DriverRun_DriverRunApprove
where x.DriverRunId == code && x.ApproveDate != null && x.ApproveType != "S"
orderby x.ApproveDate
select new
{
x.DriverRunApproveId,
x.DriverRunId,
ApproveMan = (from y in db.Sys_User where y.UserId == x.ApproveMan select y.UserName).First(),
x.ApproveDate,
x.IsAgree,
x.ApproveIdea,
x.ApproveType,
};
List<Model.DriverRun_DriverRunApprove> res = new List<Model.DriverRun_DriverRunApprove>();
var list = q.ToList();
foreach (var item in list)
{
Model.DriverRun_DriverRunApprove approve = new Model.DriverRun_DriverRunApprove();
approve.DriverRunApproveId = item.DriverRunApproveId;
approve.DriverRunId = item.DriverRunId;
approve.ApproveMan = item.ApproveMan;
approve.ApproveDate = item.ApproveDate;
approve.IsAgree = item.IsAgree;
approve.ApproveIdea = item.ApproveIdea;
approve.ApproveType = item.ApproveType;
res.Add(approve);
}
return res;
}
}
public static Model.DriverRun_DriverRunApprove getCurrApproveForApi(string DriverRunId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.DriverRun_DriverRunApprove newApprove = db.DriverRun_DriverRunApprove.FirstOrDefault(e => e.DriverRunId == DriverRunId && e.ApproveType != "S" && e.ApproveDate == null);
if (newApprove != null)
{
Model.Sys_User user = BLL.UserService.GetUserByUserId(newApprove.ApproveMan);
if (user != null)
{
newApprove.ApproveIdea = user.UserName;
}
}
return newApprove;
}
}
public static void UpdateDriverRunApproveForApi(Model.DriverRun_DriverRunApprove approve)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Model.DriverRun_DriverRunApprove newApprove = db.DriverRun_DriverRunApprove.FirstOrDefault(e => e.DriverRunApproveId == approve.DriverRunApproveId && e.ApproveDate == null);
if (newApprove != null)
{
if (!string.IsNullOrEmpty(approve.DriverRunId))
{
newApprove.DriverRunId = approve.DriverRunId;
}
if (!string.IsNullOrEmpty(approve.ApproveMan))
newApprove.ApproveMan = approve.ApproveMan;
if (approve.ApproveDate.HasValue)
newApprove.ApproveDate = approve.ApproveDate;
if (!string.IsNullOrEmpty(approve.ApproveIdea))
newApprove.ApproveIdea = approve.ApproveIdea;
if (approve.IsAgree.HasValue)
newApprove.IsAgree = approve.IsAgree;
if (!string.IsNullOrEmpty(approve.ApproveType))
newApprove.ApproveType = approve.ApproveType;
db.SubmitChanges();
}
}
}
}
}

View File

@ -1,15 +1,17 @@
using System;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
namespace BLL
{
/// <summary>
/// 开车保运管理
/// </summary>
public static class DriverRunService
public static class DriverRunService
{
/// <summary>
/// 根据主键获取开车保运管理
@ -34,8 +36,15 @@ namespace BLL
newDriverRun.UnitId = driverRun.UnitId;
newDriverRun.Implement = driverRun.Implement;
newDriverRun.Descriptions = driverRun.Descriptions;
newDriverRun.InstallationId = driverRun.InstallationId;
newDriverRun.InstallationNames = driverRun.InstallationNames;
newDriverRun.Objective = driverRun.Objective;
newDriverRun.NeedCompletedDate = driverRun.NeedCompletedDate;
newDriverRun.CompileMan = driverRun.CompileMan;
newDriverRun.CompileDate = driverRun.CompileDate;
newDriverRun.AttachUrl = driverRun.AttachUrl;
newDriverRun.Remark = driverRun.Remark;
newDriverRun.State = driverRun.State;
Funs.DB.DriverRun_DriverRun.InsertOnSubmit(newDriverRun);
Funs.DB.SubmitChanges();
}
@ -54,8 +63,14 @@ namespace BLL
newDriverRun.UnitId = driverRun.UnitId;
newDriverRun.Implement = driverRun.Implement;
newDriverRun.Descriptions = driverRun.Descriptions;
newDriverRun.InstallationId = driverRun.InstallationId;
newDriverRun.InstallationNames = driverRun.InstallationNames;
newDriverRun.Objective = driverRun.Objective;
newDriverRun.NeedCompletedDate = driverRun.NeedCompletedDate;
newDriverRun.RealCompletedDate = driverRun.RealCompletedDate;
newDriverRun.AttachUrl = driverRun.AttachUrl;
newDriverRun.Remark = driverRun.Remark;
newDriverRun.State = driverRun.State;
Funs.DB.SubmitChanges();
}
}
@ -77,5 +92,163 @@ namespace BLL
Funs.DB.SubmitChanges();
}
}
public static Model.DriverRun_DriverRun GetDriverRunForApi(string driverRunId)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
{
Model.DriverRun_DriverRun x = db.DriverRun_DriverRun.FirstOrDefault(e => e.DriverRunId == driverRunId);
return x;
}
}
public static void Init(FineUIPro.DropDownList dropName, string state, bool isShowPlease)
{
dropName.DataValueField = "Value";
dropName.DataTextField = "Text";
dropName.DataSource = GetDHandleTypeByState(state);
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
/// <summary>
/// 根据状态选择下一步办理类型
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
public static ListItem[] GetDHandleTypeByState(string state)
{
if (state == Const.DriverRun_Compile) //无是否同意
{
ListItem[] lis = new ListItem[1];
lis[0] = new ListItem("开车负责人审批", Const.DriverRun_Audit1);
return lis;
}
else if (state == Const.DriverRun_Audit1)//有是否同意
{
ListItem[] lis = new ListItem[1];
lis[0] = new ListItem("保运主任审批", Const.DriverRun_Audit2);//是 加载
return lis;
}
else if (state == Const.DriverRun_Audit2)//无是否同意
{
ListItem[] lis = new ListItem[1];
lis[0] = new ListItem("保运主任确认完成", Const.DriverRun_Audit3);
return lis;
}
else if (state == Const.DriverRun_Audit3)//无是否同意
{
ListItem[] lis = new ListItem[1];
lis[0] = new ListItem("开车负责人确认完成", Const.DriverRun_Audit4);
return lis;
}
else if (state == Const.DriverRun_Audit4)//有是否同意
{
ListItem[] lis = new ListItem[1];
lis[0] = new ListItem("流程闭环", Const.DriverRun_Complete);//是 加载
return lis;
}
else
return null;
}
public static List<Model.DriverRun_DriverRun> GetListDataForApi(string state, string projectId, int index, int page)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
{
IQueryable<Model.DriverRun_DriverRun> q = db.DriverRun_DriverRun;
List<string> ids = new List<string>();
if (!string.IsNullOrEmpty(projectId))
{
q = q.Where(e => e.ProjectId == projectId);
}
if (!string.IsNullOrEmpty(state))
{
q = q.Where(e => e.State == state);
}
var qq1 = from x in q
orderby x.Code descending
select new
{
x.DriverRunId,
x.ProjectId,
x.UnitId,
x.Code,
x.Descriptions,
x.InstallationId,
x.InstallationNames,
x.State,
x.Objective,
x.NeedCompletedDate,
x.AttachUrl,
};
var list = qq1.Skip(index * page).Take(page).ToList();
List<Model.DriverRun_DriverRun> listRes = new List<Model.DriverRun_DriverRun>();
for (int i = 0; i < list.Count; i++)
{
Model.DriverRun_DriverRun x = new Model.DriverRun_DriverRun();
x.DriverRunId = list[i].DriverRunId;
x.ProjectId = list[i].ProjectId;
x.Code = list[i].Code;
x.UnitId = list[i].UnitId + "$" + UnitService.GetUnitNameByUnitId(list[i].UnitId);
x.Descriptions = list[i].Descriptions;
x.State = list[i].State;
x.InstallationId = list[i].InstallationId;
x.InstallationNames = list[i].InstallationNames;
x.Objective = list[i].Objective;
x.NeedCompletedDate = list[i].NeedCompletedDate;
x.AttachUrl = list[i].AttachUrl;
listRes.Add(x);
}
return listRes;
}
}
public static void UpdateDriverRunForApi(Model.DriverRun_DriverRun DriverRun)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
{
Model.DriverRun_DriverRun newDriverRun = db.DriverRun_DriverRun.First(e => e.DriverRunId == DriverRun.DriverRunId);
if (!string.IsNullOrEmpty(DriverRun.Code))
newDriverRun.Code = DriverRun.Code;
if (!string.IsNullOrEmpty(DriverRun.UnitId))
newDriverRun.UnitId = DriverRun.UnitId;
if (!string.IsNullOrEmpty(DriverRun.Descriptions))
newDriverRun.Descriptions = DriverRun.Descriptions;
if (!string.IsNullOrEmpty(DriverRun.State))
newDriverRun.State = DriverRun.State;
if (DriverRun.NeedCompletedDate.HasValue)
newDriverRun.NeedCompletedDate = DriverRun.NeedCompletedDate;
if (DriverRun.RealCompletedDate.HasValue)
newDriverRun.RealCompletedDate = DriverRun.RealCompletedDate;
if (!string.IsNullOrEmpty(DriverRun.InstallationId))
newDriverRun.InstallationId = DriverRun.InstallationId;
if (!string.IsNullOrEmpty(DriverRun.InstallationNames))
newDriverRun.InstallationNames = DriverRun.InstallationNames;
if (!string.IsNullOrEmpty(DriverRun.Objective))
newDriverRun.Objective = DriverRun.Objective;
db.SubmitChanges();
}
}
public static int GetListCount(string projectId)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
{
IQueryable<Model.DriverRun_DriverRun> q = db.DriverRun_DriverRun;
if (!string.IsNullOrEmpty(projectId))
{
q = q.Where(e => e.ProjectId == projectId);
}
return q.Count();
}
}
}
}

View File

@ -1753,6 +1753,7 @@
<Content Include="TestRun\DriverRun\DriverRunEdit.aspx" />
<Content Include="TestRun\DriverRun\DriverRunPlan.aspx" />
<Content Include="TestRun\DriverRun\DriverRunPlanEdit.aspx" />
<Content Include="TestRun\DriverRun\DriverRunView.aspx" />
<Content Include="TestRun\DriverScheme.aspx" />
<Content Include="TestRun\DriverSchemeEdit.aspx" />
<Content Include="TestRun\DriverSub\DriverSub.aspx" />
@ -15819,6 +15820,13 @@
<Compile Include="TestRun\DriverRun\DriverRunPlanEdit.aspx.designer.cs">
<DependentUpon>DriverRunPlanEdit.aspx</DependentUpon>
</Compile>
<Compile Include="TestRun\DriverRun\DriverRunView.aspx.cs">
<DependentUpon>DriverRunView.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="TestRun\DriverRun\DriverRunView.aspx.designer.cs">
<DependentUpon>DriverRunView.aspx</DependentUpon>
</Compile>
<Compile Include="TestRun\DriverScheme.aspx.cs">
<DependentUpon>DriverScheme.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -21,6 +21,9 @@
<f:Toolbar ID="Toolbar4" ToolbarAlign="Right" runat="server">
<Items>
<f:TextBox ID="hdItemsString" runat="server" Hidden="true"></f:TextBox>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="" ToolTip="保存"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnSelect" runat="server" Icon="ShapeSquareSelect" ToolTip="模板库选择方案" OnClick="btnSelect_Click">
</f:Button>
<f:Button ID="btnNew" OnClick="btnNew_Click" Icon="Add" EnablePostBack="true" runat="server" ToolTip="新增方案">
@ -41,6 +44,25 @@
<f:RenderField HeaderText="方案名称" ColumnID="SolutionName" DataField="SolutionName" Width="740px" ExpandUnusedSpace="true"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="FileCode" DataField="FileCode" FieldType="String"
HeaderText="文件编号" HeaderTextAlign="Center" TextAlign="Center">
<Editor>
<f:TextBox runat="server" ID="txtFileCode"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="120px" ColumnID="CompileMan" DataField="CompileMan" FieldType="String"
HeaderText="编制责任人" HeaderTextAlign="Center" TextAlign="Center">
<Editor>
<f:TextBox runat="server" ID="txtCompileMan"></f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="PlanCompletedDate" DataField="PlanCompletedDate" FieldType="Date"
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划完成时间" HeaderTextAlign="Center">
<Editor>
<f:DatePicker ID="txtPlanCompletedDate" Required="true" runat="server">
</f:DatePicker>
</Editor>
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />

View File

@ -277,10 +277,18 @@ namespace FineUIPro.Web.TestRun.DriverPrepare
cell.SetCellValue(item.SolutionName);
cell = row.CreateCell(2);
cell.CellStyle = cellStyle;
cell.SetCellValue(string.Empty);
cell.SetCellValue(item.FileCode);
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
cell.SetCellValue(string.Empty);
cell.SetCellValue(item.CompileMan);
cell = row.CreateCell(4);
cell.CellStyle = cellStyle;
string date = string.Empty;
if (item.PlanCompletedDate != null)
{
date = string.Format("{0:yyyy-MM-dd}", item.PlanCompletedDate);
}
cell.SetCellValue(date);
i++;
}
// 第三步:写入文件流
@ -364,10 +372,18 @@ namespace FineUIPro.Web.TestRun.DriverPrepare
cell.SetCellValue(item.SolutionName);
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
cell.SetCellValue(string.Empty);
cell.SetCellValue(item.FileCode);
cell = row.CreateCell(4);
cell.CellStyle = cellStyle;
cell.SetCellValue(string.Empty);
cell.SetCellValue(item.CompileMan);
cell = row.CreateCell(5);
cell.CellStyle = cellStyle;
string date = string.Empty;
if (item.PlanCompletedDate != null)
{
date = string.Format("{0:yyyy-MM-dd}", item.PlanCompletedDate);
}
cell.SetCellValue(date);
if (type != item.SolutionType)
{
type = item.SolutionType;
@ -408,5 +424,28 @@ namespace FineUIPro.Web.TestRun.DriverPrepare
}
}
#endregion
protected void btnSave_Click(object sender, EventArgs e)
{
Model.SGGLDB db = Funs.DB;
var items = from x in db.DriverPrepare_SchemePlanItem
join y in db.DriverPrepare_SchemePlan on x.SchemePlanId equals y.SchemePlanId
where y.ProjectId == this.CurrUser.LoginProjectId
select x;
foreach (JObject mergedRow in Grid1.GetMergedData())
{
JObject values = mergedRow.Value<JObject>("values");
int i = mergedRow.Value<int>("index");
var item = items.FirstOrDefault(x => x.SchemePlanItemId == this.Grid1.Rows[i].DataKeys[0].ToString());
if (item != null)
{
item.FileCode = values.Value<string>("FileCode");
item.CompileMan = values.Value<string>("CompileMan");
item.PlanCompletedDate = Funs.GetNewDateTime(values.Value<string>("PlanCompletedDate"));
db.SubmitChanges();
}
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
}
}

View File

@ -66,6 +66,15 @@ namespace FineUIPro.Web.TestRun.DriverPrepare {
/// </remarks>
protected global::FineUIPro.TextBox hdItemsString;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSelect 控件。
/// </summary>
@ -102,6 +111,33 @@ namespace FineUIPro.Web.TestRun.DriverPrepare {
/// </remarks>
protected global::FineUIPro.Button btnDel;
/// <summary>
/// txtFileCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtFileCode;
/// <summary>
/// txtCompileMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCompileMan;
/// <summary>
/// txtPlanCompletedDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtPlanCompletedDate;
/// <summary>
/// Window1 控件。
/// </summary>

View File

@ -9,7 +9,7 @@
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1"/>
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="HBox" BoxConfigAlign="Stretch">
<Items>
@ -34,20 +34,38 @@
<f:RenderField ColumnID="Code" DataField="Code"
FieldType="String" HeaderText="序号" HeaderTextAlign="Center" Width="55px">
</f:RenderField>
<f:RenderField ColumnID="Implement" DataField="Implement"
FieldType="String" HeaderText="记录/报告/执行情况" HeaderTextAlign="Center" Width="200px">
</f:RenderField>
<f:RenderField ColumnID="UnitName" DataField="UnitName"
FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center" Width="250px">
FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center" Width="210px">
</f:RenderField>
<f:RenderField ColumnID="InstallationNames" DataField="InstallationNames"
FieldType="String" HeaderText="区域" HeaderTextAlign="Center" Width="150px">
</f:RenderField>
<f:RenderField ColumnID="Descriptions" DataField="Descriptions"
FieldType="String" HeaderText="情况说明" HeaderTextAlign="Center" Width="200px" ExpandUnusedSpace="true">
FieldType="String" HeaderText="内容" HeaderTextAlign="Center" Width="300px" ExpandUnusedSpace="true">
</f:RenderField>
<f:RenderField ColumnID="Remark" DataField="Remark"
FieldType="String" HeaderText="备注" HeaderTextAlign="Center" Width="120px" ExpandUnusedSpace="true">
<f:RenderField ColumnID="Objective" DataField="Objective"
FieldType="String" HeaderText="目的" HeaderTextAlign="Center" Width="200px" >
</f:RenderField>
<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="80px" CommandName="AttachUrl" ColumnID="AttachUrl"
TextAlign="Center" ToolTip="附件查看" Icon="Find" />
<f:RenderField Width="100px" ColumnID="NeedCompletedDate" DataField="NeedCompletedDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="需完成时间" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="120px" ColumnID="RealCompletedDate" DataField="RealCompletedDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="实际完成时间" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="State" Width="150px" HeaderText="审批状态" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblState" runat="server" Text='<%# ConvertState(Eval("State")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="AuditMan" Width="80px" HeaderText="办理人" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblAuditMan" runat="server" Text='<%# ConvertMan(Eval("DriverRunId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<%--<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="80px" CommandName="AttachUrl" ColumnID="AttachUrl"
TextAlign="Center" ToolTip="附件查看" Icon="Find" />--%>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
@ -70,7 +88,7 @@
</f:Panel>
<f:Window ID="Window1" Title="开车保运管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="520px">
Width="900px" Height="620px">
</f:Window>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
@ -80,6 +98,9 @@
<Items>
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil" OnClick="btnMenuModify_Click">
</f:MenuButton>
<f:MenuButton ID="btnMenuView" EnablePostBack="true" runat="server" Text="查看" Icon="ApplicationViewIcons"
OnClick="btnMenuView_Click">
</f:MenuButton>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click">
</f:MenuButton>

View File

@ -30,9 +30,15 @@ namespace FineUIPro.Web.TestRun.DriverRun
driverRun.ProjectId,
driverRun.Code,
driverRun.UnitId,
driverRun.State,
driverRun.Implement,
driverRun.Descriptions,
driverRun.AttachUrl,
driverRun.InstallationId,
driverRun.InstallationNames,
driverRun.Objective,
driverRun.NeedCompletedDate,
driverRun.RealCompletedDate,
driverRun.Remark,
Unit.UnitName AS UnitName"
+ @" FROM DriverRun_DriverRun AS driverRun"
@ -135,7 +141,51 @@ namespace FineUIPro.Web.TestRun.DriverRun
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DriverRunEdit.aspx?id={0}", Grid1.SelectedRowID, "编辑 - ")));
string id = Grid1.SelectedRowID;
Model.DriverRun_DriverRun data = BLL.DriverRunService.GetDriverRunById(id);
Model.DriverRun_DriverRunApprove approve = BLL.DriverRunApproveService.GetDriverRunApproveByDriverRunId(id);
if (approve != null)
{
if (!string.IsNullOrEmpty(approve.ApproveMan))
{
if (this.CurrUser.UserId == approve.ApproveMan || CurrUser.UserId == Const.sysglyId)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DriverRunEdit.aspx?id={0}", id, "编辑 - ")));
return;
}
else if (data.State == BLL.Const.DriverRun_Complete)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DriverRunView.aspx?id={0}", id, "编辑 - ")));
return;
}
else
{
Alert.ShowInTop("您不是当前办理人,无法编辑,请右键查看!", MessageBoxIcon.Warning);
return;
}
}
}
else
{
Alert.ShowInTop("流程闭环,请右键查看!", MessageBoxIcon.Warning);
return;
}
}
protected void btnMenuView_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string id = Grid1.SelectedRowID;
Model.DriverRun_DriverRun data = BLL.DriverRunService.GetDriverRunById(id);
if (data != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DriverRunView.aspx?id={0}", id, "编辑 - ")));
}
}
#endregion
@ -150,6 +200,7 @@ namespace FineUIPro.Web.TestRun.DriverRun
var info = BLL.DriverRunService.GetDriverRunById(rowID);
if (info != null)
{
BLL.DriverRunApproveService.DeleteDriverRunApprovesByDriverRunId(rowID);
BLL.DriverRunService.DeleteDriverRunById(rowID);
}
}
@ -200,5 +251,70 @@ namespace FineUIPro.Web.TestRun.DriverRun
}
}
#endregion
/// <summary>
/// 把状态转换代号为文字形式
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected string ConvertState(object state)
{
if (state != null)
{
if (state.ToString() == BLL.Const.DriverRun_Compile)
{
return "编制";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit1)
{
return "开车负责人审批";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit2)
{
return "保运主任审批";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit3)
{
return "保运主任确认完成";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit4)
{
return "开车负责人确认完成";
}
else if (state.ToString() == BLL.Const.DriverRun_Complete)
{
return "流程闭环";
}
else
{
return "";
}
}
return "";
}
//<summary>
//获取办理人姓名
//</summary>
//<param name="state"></param>
//<returns></returns>
protected string ConvertMan(object DriverRunId)
{
if (DriverRunId != null)
{
Model.DriverRun_DriverRunApprove a = BLL.DriverRunApproveService.GetDriverRunApproveByDriverRunId(DriverRunId.ToString());
if (a != null)
{
if (a.ApproveMan != null)
{
return BLL.UserService.GetUserByUserId(a.ApproveMan).UserName;
}
}
else
{
return "";
}
}
return "";
}
}
}

View File

@ -84,6 +84,24 @@ namespace FineUIPro.Web.TestRun.DriverRun {
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// lblState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblState;
/// <summary>
/// lblAuditMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblAuditMan;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@ -147,6 +165,15 @@ namespace FineUIPro.Web.TestRun.DriverRun {
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuModify;
/// <summary>
/// btnMenuView 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuView;
/// <summary>
/// btnMenuDel 控件。
/// </summary>

View File

@ -20,9 +20,9 @@
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpUnitId" runat="server" Label="单位名称" LabelAlign="Right" LabelWidth="130px" Width="400px"></f:DropDownList>
<f:DropDownList ID="drpUnitId" runat="server" Label="单位名称" Hidden="true" LabelAlign="Right" LabelWidth="130px" Width="400px"></f:DropDownList>
<f:Button ID="btnSearch" Icon="SystemSearch" ToolTip="搜索"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
EnablePostBack="true" runat="server" OnClick="btnSearch_Click" Hidden="true">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnNew" Icon="Add" ToolTip="新增" EnablePostBack="false" runat="server" Hidden="true">
@ -38,16 +38,13 @@
FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center" Width="240px">
</f:RenderField>
<f:RenderField ColumnID="Contact" DataField="Contact"
FieldType="String" HeaderText="单位联络人/电话" HeaderTextAlign="Center" Width="200px">
FieldType="String" HeaderText="单位联络人/电话" HeaderTextAlign="Center" Width="250px">
</f:RenderField>
<f:RenderField ColumnID="HeadMan" DataField="HeadMan"
FieldType="String" HeaderText="五环负责人/电话" HeaderTextAlign="Center" Width="200px">
FieldType="String" HeaderText="五环负责人/电话" HeaderTextAlign="Center" Width="250px">
</f:RenderField>
<f:RenderField ColumnID="Contents" DataField="Contents"
FieldType="String" HeaderText="联络内容" HeaderTextAlign="Center" Width="200px">
</f:RenderField>
<f:RenderField ColumnID="ResultDef" DataField="ResultDef"
FieldType="String" HeaderText="结果描述" HeaderTextAlign="Center" Width="200px">
FieldType="String" HeaderText="保运责任区域" HeaderTextAlign="Center" Width="300px">
</f:RenderField>
<f:RenderField ColumnID="Remark" DataField="Remark"
FieldType="String" HeaderText="备注" HeaderTextAlign="Center" Width="180px" ExpandUnusedSpace="true">

View File

@ -60,13 +60,13 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtContents" runat="server" Label="联络内容" LabelAlign="Right" LabelWidth="150px" MaxLength="500">
<f:TextBox ID="txtContents" runat="server" Label="保运责任区域" LabelAlign="Right" LabelWidth="150px" MaxLength="500">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtResultDef" runat="server" Label="结果描述" LabelAlign="Right" LabelWidth="150px" MaxLength="500">
<f:TextBox ID="txtResultDef" runat="server" Label="结果描述" LabelAlign="Right" LabelWidth="150px" MaxLength="500" Hidden="true">
</f:TextBox>
</Items>
</f:FormRow>

View File

@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑开车保运管理</title>
</head>
<body>
@ -19,6 +19,8 @@
</f:ToolbarFill>
<f:Button ID="btnSave" OnClick="btnSave_Click" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1">
</f:Button>
<f:Button ID="btnSubmit" OnClick="btnSubmit_Click" Icon="SystemSaveNew" runat="server" ToolTip="提交" ValidateForms="SimpleForm1">
</f:Button>
<f:HiddenField ID="hdAttachUrl" runat="server">
</f:HiddenField>
<f:HiddenField ID="hdId" runat="server"></f:HiddenField>
@ -33,15 +35,10 @@
runat="server">
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpImplement" runat="server" Label="记录/报告/执行情况" LabelAlign="Right" LabelWidth="150px" Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpImplement_SelectedIndexChanged"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtCode" runat="server" Label="序号" LabelAlign="Right" LabelWidth="150px" MaxLength="50" Readonly="true">
<f:TextBox ID="txtCode" runat="server" Label="序号" LabelAlign="Right" ShowRedStar="true" Required="true" LabelWidth="150px" MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow>
@ -52,17 +49,32 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtDescriptions" runat="server" Label="情况说明" LabelAlign="Right" LabelWidth="150px" MaxLength="500">
<f:DropDownList ID="drpUnitWorkIds" runat="server" Label="区域" ShowRedStar="true" LabelAlign="Right" LabelWidth="150px"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtDescriptions" runat="server" Label="内容" LabelAlign="Right" LabelWidth="150px" MaxLength="500">
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtRemark" runat="server" Label="备注" LabelAlign="Right" LabelWidth="150px" MaxLength="500">
<f:TextArea ID="txtObjective" runat="server" Label="目的" LabelAlign="Right" LabelWidth="150px" MaxLength="500">
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<f:FormRow>
<Items>
<f:DatePicker ID="txtNeedCompletedDate" ShowRedStar="true" runat="server" Label="需完成时间" LabelWidth="150px" Required="true" LabelAlign="Right"
EnableEdit="true">
</f:DatePicker>
<f:DatePicker ID="txtRealCompletedDate" ShowRedStar="true" runat="server" Label="实际完成时间" LabelWidth="150px" LabelAlign="Right"
EnableEdit="true">
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow runat="server" Hidden="true">
<Items>
<f:Panel ID="Panel3" Width="300px" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
<Items>
@ -75,6 +87,57 @@
</f:Panel>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:ContentPanel ID="ContentPanel5" Title="审批流程" runat="server" ShowHeader="true" EnableCollapse="true"
BodyPadding="0px">
<f:Form ID="Form5" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpHandleType" runat="server" Label="办理步骤" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpHandleMan" runat="server" Label="办理人员" Required="true" LabelAlign="Right" EnableEdit="true">
</f:DropDownList>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</f:ContentPanel>
</Items>
</f:FormRow>
<f:FormRow ID="plApprove1">
<Items>
<f:TextArea ID="txtOpinions" runat="server" Label="我的意见" MaxLength="3000">
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow ID="plApprove2">
<Items>
<f:ContentPanel Title="开车保运委托单审批列表" ShowBorder="true"
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
runat="server">
<f:Grid ID="gvApprove" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="false"
DataKeyNames="DriverRunApproveId" EnableColumnLines="true" ForceFit="true">
<Columns>
<f:RowNumberField Width="20px" />
<f:TemplateField ColumnID="State" Width="250px" HeaderText="办理类型" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lbtype" runat="server" Text='<%# ConvertState(Eval("ApproveType")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField Width="180px" DataField="ApproveMan" HeaderTextAlign="Center" HeaderText="办理人员" TextAlign="Center" />
<f:BoundField Width="200px" DataField="ApproveDate" HeaderTextAlign="Center" TextAlign="Center" DataFormatString="{0:yyyy-MM-dd}" HeaderText="办理时间" />
<f:BoundField Width="180px" DataField="ApproveIdea" HeaderTextAlign="Center" TextAlign="Center" HeaderText="办理意见" />
</Columns>
</f:Grid>
</f:ContentPanel>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</f:ContentPanel>
@ -88,4 +151,4 @@
</f:Window>
</form>
</body>
</html>
</html>

View File

@ -5,6 +5,21 @@ namespace FineUIPro.Web.TestRun.DriverRun
{
public partial class DriverRunEdit : PageBase
{
/// <summary>
/// 办理类型
/// </summary>
public string State
{
get
{
return (string)ViewState["State"];
}
set
{
ViewState["State"] = value;
}
}
#region
/// <summary>
/// 页面加载
@ -16,32 +31,104 @@ namespace FineUIPro.Web.TestRun.DriverRun
if (!IsPostBack)
{
BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
this.drpImplement.DataTextField = "Text";
this.drpImplement.DataValueField = "Value";
this.drpImplement.DataSource = BLL.DropListService.drpDriverRunImplementItemList();
this.drpImplement.DataBind();
Funs.FineUIPleaseSelect(this.drpImplement);
BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, true);
plApprove1.Hidden = true;
plApprove2.Hidden = true;
txtRealCompletedDate.Hidden = true;
string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id))
{
Model.DriverRun_DriverRun data = BLL.DriverRunService.GetDriverRunById(id);
if (data != null)
{
plApprove1.Hidden = false;
plApprove2.Hidden = false;
var dt = DriverRunApproveService.getListData(id);
gvApprove.DataSource = dt;
gvApprove.DataBind();
this.hdId.Text = id;
this.txtCode.Text = data.Code;
if (!string.IsNullOrEmpty(data.UnitId))
{
this.drpUnitId.SelectedValue = data.UnitId;
}
if (!string.IsNullOrEmpty(data.Code))
{
this.drpImplement.SelectedValue = data.Code;
}
this.drpUnitWorkIds.SelectedValueArray = data.InstallationId.Split(',');
this.txtDescriptions.Text = data.Descriptions;
this.txtRemark.Text = data.Remark;
this.txtObjective.Text = data.Objective;
if (data.NeedCompletedDate != null)
{
this.txtNeedCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", data.NeedCompletedDate);
}
if (data.RealCompletedDate != null)
{
this.txtRealCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", data.RealCompletedDate);
}
if (!string.IsNullOrEmpty(data.State))
{
State = data.State;
}
else
{
State = BLL.Const.DriverRun_Compile;
}
if (State != BLL.Const.DriverRun_Complete)
{
DriverRunService.Init(drpHandleType, State, false);
}
if (State == BLL.Const.DriverRun_Compile)
{
UserService.Init2(drpHandleMan, CurrUser.LoginProjectId, false);
this.drpHandleMan.SelectedIndex = 1;
}
else
{
if (State == BLL.Const.DriverRun_Audit2)
{
Model.DriverRun_DriverRunApprove approve = BLL.DriverRunApproveService.GetAudit2(id);
if (approve != null)
{
ListItem[] list = new ListItem[1];
list[0] = new ListItem(BLL.UserService.GetUserByUserId(approve.ApproveMan).UserName ?? "", approve.ApproveMan);
drpHandleMan.DataValueField = "Value";
drpHandleMan.DataTextField = "Text";
drpHandleMan.DataSource = list;
drpHandleMan.DataBind();
}
}
else if (State == BLL.Const.DriverRun_Audit3)
{
txtRealCompletedDate.Hidden = false;
Model.DriverRun_DriverRunApprove approve = BLL.DriverRunApproveService.GetAudit1(id);
if (approve != null)
{
ListItem[] list = new ListItem[1];
list[0] = new ListItem(BLL.UserService.GetUserByUserId(approve.ApproveMan).UserName ?? "", approve.ApproveMan);
drpHandleMan.DataValueField = "Value";
drpHandleMan.DataTextField = "Text";
drpHandleMan.DataSource = list;
drpHandleMan.DataBind();
}
}
else if (State == BLL.Const.DriverRun_Audit4)
{
txtRealCompletedDate.Hidden = false;
drpHandleMan.Items.Clear();
drpHandleMan.Enabled = false;
}
else
{
UserService.Init2(drpHandleMan, CurrUser.LoginProjectId, false);
}
}
this.txtOpinions.Text = "同意";
}
}
else
{
State = Const.DriverRun_Compile;
DriverRunService.Init(drpHandleType, State, false);
UserService.Init2(drpHandleMan, CurrUser.LoginProjectId, false);
}
}
}
#endregion
@ -62,7 +149,7 @@ namespace FineUIPro.Web.TestRun.DriverRun
}
#endregion
#region
#region /
/// <summary>
/// 保存按钮
/// </summary>
@ -70,16 +157,50 @@ namespace FineUIPro.Web.TestRun.DriverRun
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.drpImplement.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择记录/报告/执行情况!", MessageBoxIcon.Warning);
return;
}
if (this.drpUnitId.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择单位名称!", MessageBoxIcon.Warning);
return;
}
if (this.drpUnitWorkIds.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择区域!", MessageBoxIcon.Warning);
return;
}
if (State == BLL.Const.DriverRun_Audit4 && string.IsNullOrEmpty(this.txtRealCompletedDate.Text.Trim()))
{
Alert.ShowInTop("请选择实际完成时间!", MessageBoxIcon.Warning);
return;
}
SaveData("save");
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (this.drpUnitId.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择单位名称!", MessageBoxIcon.Warning);
return;
}
if (this.drpUnitWorkIds.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("请选择区域!", MessageBoxIcon.Warning);
return;
}
if (State == BLL.Const.DriverRun_Audit4 && string.IsNullOrEmpty(this.txtRealCompletedDate.Text.Trim()))
{
Alert.ShowInTop("请选择实际完成时间!", MessageBoxIcon.Warning);
return;
}
SaveData("submit");
ShowNotify("提交成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
private void SaveData(string saveType)
{
string id = Request.Params["id"];
Model.DriverRun_DriverRun newData = new Model.DriverRun_DriverRun();
newData.Code = this.txtCode.Text.Trim();
@ -87,15 +208,77 @@ namespace FineUIPro.Web.TestRun.DriverRun
{
newData.UnitId = this.drpUnitId.SelectedValue;
}
if (this.drpImplement.SelectedValue != BLL.Const._Null)
if (!string.IsNullOrEmpty(this.drpUnitWorkIds.SelectedValue))
{
newData.Implement = this.drpImplement.SelectedItem.Text;
newData.InstallationId = GetStringByArray(this.drpUnitWorkIds.SelectedValueArray);
string unitWorkNames = string.Empty;
foreach (var item in this.drpUnitWorkIds.SelectedValueArray)
{
var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(item);
if (unitWork != null)
{
unitWorkNames += unitWork.UnitWorkName + ",";
}
}
if (!string.IsNullOrEmpty(unitWorkNames))
{
newData.InstallationNames = unitWorkNames.Substring(0, unitWorkNames.LastIndexOf(","));
}
}
newData.Descriptions = this.txtDescriptions.Text.Trim();
newData.Remark = this.txtRemark.Text.Trim();
newData.Objective = this.txtObjective.Text.Trim();
newData.NeedCompletedDate = Funs.GetNewDateTime(this.txtNeedCompletedDate.Text.Trim());
newData.ProjectId = this.CurrUser.LoginProjectId;
newData.RealCompletedDate = Funs.GetNewDateTime(this.txtRealCompletedDate.Text.Trim());
if (saveType == "submit")
{
newData.State = drpHandleType.SelectedValue.Trim();
}
else
{
Model.DriverRun_DriverRun newData1 = BLL.DriverRunService.GetDriverRunById(id);
if (newData1 != null)
{
if (string.IsNullOrEmpty(newData1.State))
{
newData.State = BLL.Const.DriverRun_Compile;
}
else
{
newData.State = newData1.State;
}
}
else
{
newData.State = BLL.Const.DriverRun_Compile;
}
}
if (!string.IsNullOrEmpty(id))
{
Model.DriverRun_DriverRunApprove approve1 = BLL.DriverRunApproveService.GetDriverRunApproveByDriverRunId(id);
if (approve1 != null && saveType == "submit")
{
approve1.ApproveDate = DateTime.Now;
approve1.ApproveIdea = txtOpinions.Text.Trim();
BLL.DriverRunApproveService.UpdateDriverRunApprove(approve1);
}
if (saveType == "submit" && !string.IsNullOrEmpty(this.drpHandleMan.SelectedValue))
{
Model.DriverRun_DriverRunApprove approve = new Model.DriverRun_DriverRunApprove();
approve.DriverRunId = id;
if (!string.IsNullOrEmpty(this.drpHandleMan.SelectedValue))
{
approve.ApproveMan = this.drpHandleMan.SelectedValue;
}
approve.ApproveType = this.drpHandleType.SelectedValue;
if (this.drpHandleType.SelectedValue == BLL.Const.DriverRun_Complete)
{
approve.ApproveDate = DateTime.Now;
}
BLL.DriverRunApproveService.AddDriverRunApprove(approve);
APICommonService.SendSubscribeMessage(approve.ApproveMan, "开车保运委托单待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now));
}
newData.DriverRunId = id;
BLL.DriverRunService.UpdateDriverRun(newData);
}
@ -110,25 +293,97 @@ namespace FineUIPro.Web.TestRun.DriverRun
newData.DriverRunId = SQLHelper.GetNewID(typeof(Model.DriverRun_DriverRun));
this.hdId.Text = newData.DriverRunId;
}
newData.CompileMan = this.CurrUser.UserId;
newData.CompileDate = DateTime.Now;
BLL.DriverRunService.AddDriverRun(newData);
if (saveType == "submit")
{
Model.DriverRun_DriverRunApprove approve1 = new Model.DriverRun_DriverRunApprove();
approve1.DriverRunId = newData.DriverRunId;
approve1.ApproveDate = DateTime.Now;
approve1.ApproveMan = this.CurrUser.UserId;
approve1.ApproveType = BLL.Const.DriverRun_Compile;
BLL.DriverRunApproveService.AddDriverRunApprove(approve1);
Model.DriverRun_DriverRunApprove approve = new Model.DriverRun_DriverRunApprove();
approve.DriverRunId = newData.DriverRunId;
if (this.drpHandleMan.SelectedValue != "0")
{
approve.ApproveMan = this.drpHandleMan.SelectedValue;
}
approve.ApproveType = this.drpHandleType.SelectedValue;
BLL.DriverRunApproveService.AddDriverRunApprove(approve);
APICommonService.SendSubscribeMessage(approve.ApproveMan, "开车保运委托单待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now));
}
else
{
Model.DriverRun_DriverRunApprove approve1 = new Model.DriverRun_DriverRunApprove();
approve1.DriverRunId = newData.DriverRunId;
approve1.ApproveMan = this.CurrUser.UserId;
approve1.ApproveType = BLL.Const.DriverRun_Compile;
BLL.DriverRunApproveService.AddDriverRunApprove(approve1);
}
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
private string GetStringByArray(string[] array)
{
string str = string.Empty;
foreach (var item in array)
{
if (item != BLL.Const._Null)
{
str += item + ",";
}
}
if (!string.IsNullOrEmpty(str))
{
str = str.Substring(0, str.LastIndexOf(","));
}
return str;
}
#endregion
#region DropDownList下拉选择事件
protected void drpImplement_SelectedIndexChanged(object sender, EventArgs e)
/// <summary>
/// 把状态转换代号为文字形式
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected string ConvertState(object state)
{
if (this.drpImplement.SelectedValue == BLL.Const._Null)
if (state != null)
{
this.txtCode.Text = string.Empty;
}
else
{
this.txtCode.Text = this.drpImplement.SelectedValue;
if (state.ToString() == BLL.Const.DriverRun_Compile)
{
return "编制";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit1)
{
return "开车负责人审批";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit2)
{
return "保运主任审批";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit3)
{
return "保运主任确认完成";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit4)
{
return "开车负责人确认完成";
}
else if (state.ToString() == BLL.Const.DriverRun_Complete)
{
return "流程闭环";
}
else
{
return "";
}
}
return "";
}
#endregion
}
}

View File

@ -66,6 +66,15 @@ namespace FineUIPro.Web.TestRun.DriverRun {
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary>
/// hdAttachUrl 控件。
/// </summary>
@ -102,15 +111,6 @@ namespace FineUIPro.Web.TestRun.DriverRun {
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// drpImplement 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpImplement;
/// <summary>
/// txtCode 控件。
/// </summary>
@ -129,6 +129,15 @@ namespace FineUIPro.Web.TestRun.DriverRun {
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
/// <summary>
/// drpUnitWorkIds 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitWorkIds;
/// <summary>
/// txtDescriptions 控件。
/// </summary>
@ -139,13 +148,31 @@ namespace FineUIPro.Web.TestRun.DriverRun {
protected global::FineUIPro.TextArea txtDescriptions;
/// <summary>
/// txtRemark 控件。
/// txtObjective 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtRemark;
protected global::FineUIPro.TextArea txtObjective;
/// <summary>
/// txtNeedCompletedDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtNeedCompletedDate;
/// <summary>
/// txtRealCompletedDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtRealCompletedDate;
/// <summary>
/// Panel3 控件。
@ -174,6 +201,87 @@ namespace FineUIPro.Web.TestRun.DriverRun {
/// </remarks>
protected global::FineUIPro.Button btnAttach;
/// <summary>
/// ContentPanel5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel5;
/// <summary>
/// Form5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form5;
/// <summary>
/// drpHandleType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpHandleType;
/// <summary>
/// drpHandleMan 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpHandleMan;
/// <summary>
/// plApprove1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow plApprove1;
/// <summary>
/// txtOpinions 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtOpinions;
/// <summary>
/// plApprove2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow plApprove2;
/// <summary>
/// gvApprove 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid gvApprove;
/// <summary>
/// lbtype 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbtype;
/// <summary>
/// WindowAtt 控件。
/// </summary>

View File

@ -20,9 +20,9 @@
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpUnitId" runat="server" Label="单位名称" LabelAlign="Right" LabelWidth="130px" Width="400px"></f:DropDownList>
<f:DropDownList ID="drpUnitId" runat="server" Hidden="true" Label="单位名称" LabelAlign="Right" LabelWidth="130px" Width="400px"></f:DropDownList>
<f:Button ID="btnSearch" Icon="SystemSearch" ToolTip="搜索"
EnablePostBack="true" runat="server" OnClick="btnSearch_Click">
EnablePostBack="true" runat="server" OnClick="btnSearch_Click" Hidden="true">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnNew" Icon="Add" ToolTip="新增" EnablePostBack="false" runat="server" Hidden="true">

View File

@ -0,0 +1,124 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DriverRunView.aspx.cs" Inherits="FineUIPro.Web.TestRun.DriverRun.DriverRunView" %>
<!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="SimpleForm1" runat="server" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:HiddenField ID="hdAttachUrl" runat="server">
</f:HiddenField>
<f:HiddenField ID="hdId" runat="server"></f:HiddenField>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:ContentPanel ID="ContentPanel2" ShowBorder="true"
BodyPadding="10px" EnableCollapse="true" ShowHeader="false" AutoScroll="true"
runat="server">
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="txtCode" runat="server" Label="序号" LabelAlign="Right" LabelWidth="150px" MaxLength="50" Readonly="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnitId" runat="server" Label="单位名称" LabelAlign="Right" LabelWidth="150px" Required="true" Readonly="true" ShowRedStar="true"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnitWorkIds" runat="server" Label="区域" ShowRedStar="true" LabelAlign="Right" LabelWidth="150px" Readonly="true"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtDescriptions" runat="server" Label="内容" LabelAlign="Right" LabelWidth="150px" MaxLength="500" Readonly="true">
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextArea ID="txtObjective" runat="server" Label="目的" LabelAlign="Right" LabelWidth="150px" MaxLength="500" Readonly="true">
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker ID="txtNeedCompletedDate" ShowRedStar="true" runat="server" Label="需完成时间" Readonly="true" LabelWidth="150px" Required="true" LabelAlign="Right"
EnableEdit="true">
</f:DatePicker>
<f:DatePicker ID="txtRealCompletedDate" ShowRedStar="true" runat="server" Label="实际完成时间" Readonly="true" LabelWidth="150px" LabelAlign="Right"
EnableEdit="true">
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow runat="server" Hidden="true">
<Items>
<f:Panel ID="Panel3" Width="300px" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
<Items>
<f:Label ID="lblAttach" runat="server" Label="上传附件"
LabelWidth="150px">
</f:Label>
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
</f:Button>
</Items>
</f:Panel>
</Items>
</f:FormRow>
<f:FormRow ID="plApprove2">
<Items>
<f:ContentPanel Title="开车保运委托单审批列表" ShowBorder="true"
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
runat="server">
<f:Grid ID="gvApprove" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="false"
DataKeyNames="DriverRunApproveId" EnableColumnLines="true" ForceFit="true">
<Columns>
<f:RowNumberField Width="20px" />
<f:TemplateField ColumnID="State" Width="250px" HeaderText="办理类型" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lbtype" runat="server" Text='<%# ConvertState(Eval("ApproveType")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField Width="180px" DataField="ApproveMan" HeaderTextAlign="Center" HeaderText="办理人员" TextAlign="Center" />
<f:BoundField Width="200px" DataField="ApproveDate" HeaderTextAlign="Center" TextAlign="Center" DataFormatString="{0:yyyy-MM-dd}" HeaderText="办理时间" />
<f:BoundField Width="180px" DataField="ApproveIdea" HeaderTextAlign="Center" TextAlign="Center" HeaderText="办理意见" />
</Columns>
</f:Grid>
</f:ContentPanel>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</f:ContentPanel>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
</form>
</body>
</html>

View File

@ -0,0 +1,136 @@
using BLL;
using System;
namespace FineUIPro.Web.TestRun.DriverRun
{
public partial class DriverRunView : PageBase
{
/// <summary>
/// 办理类型
/// </summary>
public string State
{
get
{
return (string)ViewState["State"];
}
set
{
ViewState["State"] = value;
}
}
#region
/// <summary>
/// 页面加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, true);
string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id))
{
Model.DriverRun_DriverRun data = BLL.DriverRunService.GetDriverRunById(id);
if (data != null)
{
var dt = DriverRunApproveService.getListData(id);
gvApprove.DataSource = dt;
gvApprove.DataBind();
this.hdId.Text = id;
this.txtCode.Text = data.Code;
if (!string.IsNullOrEmpty(data.UnitId))
{
this.drpUnitId.SelectedValue = data.UnitId;
}
this.drpUnitWorkIds.SelectedValueArray = data.InstallationId.Split(',');
this.txtDescriptions.Text = data.Descriptions;
this.txtObjective.Text = data.Objective;
if (data.NeedCompletedDate != null)
{
this.txtNeedCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", data.NeedCompletedDate);
}
if (data.RealCompletedDate != null)
{
this.txtRealCompletedDate.Text = string.Format("{0:yyyy-MM-dd}", data.RealCompletedDate);
}
if (!string.IsNullOrEmpty(data.State))
{
State = data.State;
}
else
{
State = BLL.Const.DriverRun_Compile;
}
}
}
else
{
State = Const.DriverRun_Compile;
}
}
}
#endregion
#region
/// <summary>
/// 附件上传
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttach_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
{
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.DriverRun_DriverRun));
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/TestRun/DriverRun/DriverRun&menuId={1}", this.hdId.Text, BLL.Const.DriverRunMenuId)));
}
#endregion
/// <summary>
/// 把状态转换代号为文字形式
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected string ConvertState(object state)
{
if (state != null)
{
if (state.ToString() == BLL.Const.DriverRun_Compile)
{
return "编制";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit1)
{
return "开车负责人审批";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit2)
{
return "保运主任审批";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit3)
{
return "保运主任确认完成";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit4)
{
return "开车负责人确认完成";
}
else if (state.ToString() == BLL.Const.DriverRun_Complete)
{
return "流程闭环";
}
else
{
return "";
}
}
return "";
}
}
}

View File

@ -0,0 +1,222 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.TestRun.DriverRun {
public partial class DriverRunView {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// hdAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdAttachUrl;
/// <summary>
/// hdId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdId;
/// <summary>
/// ContentPanel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel2;
/// <summary>
/// Form2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// txtCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCode;
/// <summary>
/// drpUnitId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitId;
/// <summary>
/// drpUnitWorkIds 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnitWorkIds;
/// <summary>
/// txtDescriptions 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtDescriptions;
/// <summary>
/// txtObjective 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtObjective;
/// <summary>
/// txtNeedCompletedDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtNeedCompletedDate;
/// <summary>
/// txtRealCompletedDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtRealCompletedDate;
/// <summary>
/// Panel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel3;
/// <summary>
/// lblAttach 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lblAttach;
/// <summary>
/// btnAttach 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttach;
/// <summary>
/// plApprove2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FormRow plApprove2;
/// <summary>
/// gvApprove 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid gvApprove;
/// <summary>
/// lbtype 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbtype;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}

View File

@ -77,7 +77,7 @@
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<compilation debug="true" targetFramework="4.6.1"/>
<compilation debug="false" targetFramework="4.6.1"/>
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>

View File

@ -770,6 +770,9 @@ namespace Model
partial void InsertDriverRun_DriverRun(DriverRun_DriverRun instance);
partial void UpdateDriverRun_DriverRun(DriverRun_DriverRun instance);
partial void DeleteDriverRun_DriverRun(DriverRun_DriverRun instance);
partial void InsertDriverRun_DriverRunApprove(DriverRun_DriverRunApprove instance);
partial void UpdateDriverRun_DriverRunApprove(DriverRun_DriverRunApprove instance);
partial void DeleteDriverRun_DriverRunApprove(DriverRun_DriverRunApprove instance);
partial void InsertDriverRun_DriverRunContact(DriverRun_DriverRunContact instance);
partial void UpdateDriverRun_DriverRunContact(DriverRun_DriverRunContact instance);
partial void DeleteDriverRun_DriverRunContact(DriverRun_DriverRunContact instance);
@ -4533,6 +4536,14 @@ namespace Model
}
}
public System.Data.Linq.Table<DriverRun_DriverRunApprove> DriverRun_DriverRunApprove
{
get
{
return this.GetTable<DriverRun_DriverRunApprove>();
}
}
public System.Data.Linq.Table<DriverRun_DriverRunContact> DriverRun_DriverRunContact
{
get
@ -127179,6 +127190,12 @@ namespace Model
private string _SolutionType;
private string _FileCode;
private string _CompileMan;
private System.Nullable<System.DateTime> _PlanCompletedDate;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -127193,6 +127210,12 @@ namespace Model
partial void OnSortIndexChanged();
partial void OnSolutionTypeChanging(string value);
partial void OnSolutionTypeChanged();
partial void OnFileCodeChanging(string value);
partial void OnFileCodeChanged();
partial void OnCompileManChanging(string value);
partial void OnCompileManChanged();
partial void OnPlanCompletedDateChanging(System.Nullable<System.DateTime> value);
partial void OnPlanCompletedDateChanged();
#endregion
public DriverPrepare_SchemePlanItem()
@ -127300,6 +127323,66 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FileCode", DbType="NVarChar(100)")]
public string FileCode
{
get
{
return this._FileCode;
}
set
{
if ((this._FileCode != value))
{
this.OnFileCodeChanging(value);
this.SendPropertyChanging();
this._FileCode = value;
this.SendPropertyChanged("FileCode");
this.OnFileCodeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
public string CompileMan
{
get
{
return this._CompileMan;
}
set
{
if ((this._CompileMan != value))
{
this.OnCompileManChanging(value);
this.SendPropertyChanging();
this._CompileMan = value;
this.SendPropertyChanged("CompileMan");
this.OnCompileManChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanCompletedDate", DbType="DateTime")]
public System.Nullable<System.DateTime> PlanCompletedDate
{
get
{
return this._PlanCompletedDate;
}
set
{
if ((this._PlanCompletedDate != value))
{
this.OnPlanCompletedDateChanging(value);
this.SendPropertyChanging();
this._PlanCompletedDate = value;
this.SendPropertyChanged("PlanCompletedDate");
this.OnPlanCompletedDateChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@ -127343,10 +127426,28 @@ namespace Model
private string _Remark;
private string _InstallationId;
private string _InstallationNames;
private string _Objective;
private System.Nullable<System.DateTime> _NeedCompletedDate;
private string _CompileMan;
private System.Nullable<System.DateTime> _CompileDate;
private string _State;
private System.Nullable<System.DateTime> _RealCompletedDate;
private EntityRef<Base_Project> _Base_Project;
private EntityRef<Base_Unit> _Base_Unit;
private EntitySet<DriverRun_DriverRunApprove> _DriverRun_DriverRunApprove;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -127367,12 +127468,29 @@ namespace Model
partial void OnAttachUrlChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
partial void OnInstallationIdChanging(string value);
partial void OnInstallationIdChanged();
partial void OnInstallationNamesChanging(string value);
partial void OnInstallationNamesChanged();
partial void OnObjectiveChanging(string value);
partial void OnObjectiveChanged();
partial void OnNeedCompletedDateChanging(System.Nullable<System.DateTime> value);
partial void OnNeedCompletedDateChanged();
partial void OnCompileManChanging(string value);
partial void OnCompileManChanged();
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
partial void OnCompileDateChanged();
partial void OnStateChanging(string value);
partial void OnStateChanged();
partial void OnRealCompletedDateChanging(System.Nullable<System.DateTime> value);
partial void OnRealCompletedDateChanged();
#endregion
public DriverRun_DriverRun()
{
this._Base_Project = default(EntityRef<Base_Project>);
this._Base_Unit = default(EntityRef<Base_Unit>);
this._DriverRun_DriverRunApprove = new EntitySet<DriverRun_DriverRunApprove>(new Action<DriverRun_DriverRunApprove>(this.attach_DriverRun_DriverRunApprove), new Action<DriverRun_DriverRunApprove>(this.detach_DriverRun_DriverRunApprove));
OnCreated();
}
@ -127544,6 +127662,166 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InstallationId", DbType="NVarChar(500)")]
public string InstallationId
{
get
{
return this._InstallationId;
}
set
{
if ((this._InstallationId != value))
{
this.OnInstallationIdChanging(value);
this.SendPropertyChanging();
this._InstallationId = value;
this.SendPropertyChanged("InstallationId");
this.OnInstallationIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InstallationNames", DbType="NVarChar(500)")]
public string InstallationNames
{
get
{
return this._InstallationNames;
}
set
{
if ((this._InstallationNames != value))
{
this.OnInstallationNamesChanging(value);
this.SendPropertyChanging();
this._InstallationNames = value;
this.SendPropertyChanged("InstallationNames");
this.OnInstallationNamesChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Objective", DbType="NVarChar(500)")]
public string Objective
{
get
{
return this._Objective;
}
set
{
if ((this._Objective != value))
{
this.OnObjectiveChanging(value);
this.SendPropertyChanging();
this._Objective = value;
this.SendPropertyChanged("Objective");
this.OnObjectiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NeedCompletedDate", DbType="DateTime")]
public System.Nullable<System.DateTime> NeedCompletedDate
{
get
{
return this._NeedCompletedDate;
}
set
{
if ((this._NeedCompletedDate != value))
{
this.OnNeedCompletedDateChanging(value);
this.SendPropertyChanging();
this._NeedCompletedDate = value;
this.SendPropertyChanged("NeedCompletedDate");
this.OnNeedCompletedDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
public string CompileMan
{
get
{
return this._CompileMan;
}
set
{
if ((this._CompileMan != value))
{
this.OnCompileManChanging(value);
this.SendPropertyChanging();
this._CompileMan = value;
this.SendPropertyChanged("CompileMan");
this.OnCompileManChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")]
public System.Nullable<System.DateTime> CompileDate
{
get
{
return this._CompileDate;
}
set
{
if ((this._CompileDate != value))
{
this.OnCompileDateChanging(value);
this.SendPropertyChanging();
this._CompileDate = value;
this.SendPropertyChanged("CompileDate");
this.OnCompileDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Char(1)")]
public string State
{
get
{
return this._State;
}
set
{
if ((this._State != value))
{
this.OnStateChanging(value);
this.SendPropertyChanging();
this._State = value;
this.SendPropertyChanged("State");
this.OnStateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealCompletedDate", DbType="DateTime")]
public System.Nullable<System.DateTime> RealCompletedDate
{
get
{
return this._RealCompletedDate;
}
set
{
if ((this._RealCompletedDate != value))
{
this.OnRealCompletedDateChanging(value);
this.SendPropertyChanging();
this._RealCompletedDate = value;
this.SendPropertyChanged("RealCompletedDate");
this.OnRealCompletedDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DriverRun_DriverRun_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@ -127612,6 +127890,302 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DriverRun_DriverRunApprove_DriverRun_DriverRun", Storage="_DriverRun_DriverRunApprove", ThisKey="DriverRunId", OtherKey="DriverRunId", DeleteRule="NO ACTION")]
public EntitySet<DriverRun_DriverRunApprove> DriverRun_DriverRunApprove
{
get
{
return this._DriverRun_DriverRunApprove;
}
set
{
this._DriverRun_DriverRunApprove.Assign(value);
}
}
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));
}
}
private void attach_DriverRun_DriverRunApprove(DriverRun_DriverRunApprove entity)
{
this.SendPropertyChanging();
entity.DriverRun_DriverRun = this;
}
private void detach_DriverRun_DriverRunApprove(DriverRun_DriverRunApprove entity)
{
this.SendPropertyChanging();
entity.DriverRun_DriverRun = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.DriverRun_DriverRunApprove")]
public partial class DriverRun_DriverRunApprove : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _DriverRunApproveId;
private string _DriverRunId;
private string _ApproveMan;
private System.Nullable<System.DateTime> _ApproveDate;
private System.Nullable<bool> _IsAgree;
private string _ApproveIdea;
private string _ApproveType;
private string _AttachUrl;
private EntityRef<DriverRun_DriverRun> _DriverRun_DriverRun;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnDriverRunApproveIdChanging(string value);
partial void OnDriverRunApproveIdChanged();
partial void OnDriverRunIdChanging(string value);
partial void OnDriverRunIdChanged();
partial void OnApproveManChanging(string value);
partial void OnApproveManChanged();
partial void OnApproveDateChanging(System.Nullable<System.DateTime> value);
partial void OnApproveDateChanged();
partial void OnIsAgreeChanging(System.Nullable<bool> value);
partial void OnIsAgreeChanged();
partial void OnApproveIdeaChanging(string value);
partial void OnApproveIdeaChanged();
partial void OnApproveTypeChanging(string value);
partial void OnApproveTypeChanged();
partial void OnAttachUrlChanging(string value);
partial void OnAttachUrlChanged();
#endregion
public DriverRun_DriverRunApprove()
{
this._DriverRun_DriverRun = default(EntityRef<DriverRun_DriverRun>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DriverRunApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string DriverRunApproveId
{
get
{
return this._DriverRunApproveId;
}
set
{
if ((this._DriverRunApproveId != value))
{
this.OnDriverRunApproveIdChanging(value);
this.SendPropertyChanging();
this._DriverRunApproveId = value;
this.SendPropertyChanged("DriverRunApproveId");
this.OnDriverRunApproveIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DriverRunId", DbType="NVarChar(50)")]
public string DriverRunId
{
get
{
return this._DriverRunId;
}
set
{
if ((this._DriverRunId != value))
{
if (this._DriverRun_DriverRun.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnDriverRunIdChanging(value);
this.SendPropertyChanging();
this._DriverRunId = value;
this.SendPropertyChanged("DriverRunId");
this.OnDriverRunIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")]
public string ApproveMan
{
get
{
return this._ApproveMan;
}
set
{
if ((this._ApproveMan != value))
{
this.OnApproveManChanging(value);
this.SendPropertyChanging();
this._ApproveMan = value;
this.SendPropertyChanged("ApproveMan");
this.OnApproveManChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")]
public System.Nullable<System.DateTime> ApproveDate
{
get
{
return this._ApproveDate;
}
set
{
if ((this._ApproveDate != value))
{
this.OnApproveDateChanging(value);
this.SendPropertyChanging();
this._ApproveDate = value;
this.SendPropertyChanged("ApproveDate");
this.OnApproveDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")]
public System.Nullable<bool> IsAgree
{
get
{
return this._IsAgree;
}
set
{
if ((this._IsAgree != value))
{
this.OnIsAgreeChanging(value);
this.SendPropertyChanging();
this._IsAgree = value;
this.SendPropertyChanged("IsAgree");
this.OnIsAgreeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")]
public string ApproveIdea
{
get
{
return this._ApproveIdea;
}
set
{
if ((this._ApproveIdea != value))
{
this.OnApproveIdeaChanging(value);
this.SendPropertyChanging();
this._ApproveIdea = value;
this.SendPropertyChanged("ApproveIdea");
this.OnApproveIdeaChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="Char(1)")]
public string ApproveType
{
get
{
return this._ApproveType;
}
set
{
if ((this._ApproveType != value))
{
this.OnApproveTypeChanging(value);
this.SendPropertyChanging();
this._ApproveType = value;
this.SendPropertyChanged("ApproveType");
this.OnApproveTypeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(200)")]
public string AttachUrl
{
get
{
return this._AttachUrl;
}
set
{
if ((this._AttachUrl != value))
{
this.OnAttachUrlChanging(value);
this.SendPropertyChanging();
this._AttachUrl = value;
this.SendPropertyChanged("AttachUrl");
this.OnAttachUrlChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DriverRun_DriverRunApprove_DriverRun_DriverRun", Storage="_DriverRun_DriverRun", ThisKey="DriverRunId", OtherKey="DriverRunId", IsForeignKey=true)]
public DriverRun_DriverRun DriverRun_DriverRun
{
get
{
return this._DriverRun_DriverRun.Entity;
}
set
{
DriverRun_DriverRun previousValue = this._DriverRun_DriverRun.Entity;
if (((previousValue != value)
|| (this._DriverRun_DriverRun.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._DriverRun_DriverRun.Entity = null;
previousValue.DriverRun_DriverRunApprove.Remove(this);
}
this._DriverRun_DriverRun.Entity = value;
if ((value != null))
{
value.DriverRun_DriverRunApprove.Add(this);
this._DriverRunId = value.DriverRunId;
}
else
{
this._DriverRunId = default(string);
}
this.SendPropertyChanged("DriverRun_DriverRun");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;