20240410 开车会议管理

This commit is contained in:
2024-04-10 14:37:59 +08:00
parent 00a325ba3a
commit 9bb7f02b83
135 changed files with 5027 additions and 552 deletions
@@ -1,5 +1,6 @@
using BLL;
using System;
using System.Collections.Generic;
namespace FineUIPro.Web.TestRun.DriverSummary
{
@@ -15,8 +16,7 @@ namespace FineUIPro.Web.TestRun.DriverSummary
{
if (!IsPostBack)
{
//BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkId, this.CurrUser.LoginProjectId, true);
BLL.UserService.InitUserDropDownList(this.drpSummaryPerson, this.CurrUser.LoginProjectId, false);
string id = Request.Params["id"];
if (!string.IsNullOrEmpty(id))
{
@@ -24,21 +24,18 @@ namespace FineUIPro.Web.TestRun.DriverSummary
if (data != null)
{
this.hdId.Text = id;
//if (!string.IsNullOrEmpty(data.UnitWorkId))
//{
// this.drpUnitWorkId.SelectedValue = data.UnitWorkId;
//}
this.txtDriverSummaryCode.Text = data.DriverSummaryCode;
this.txtSummary.Text = data.Summary;
this.txtSummaryPerson.Text = BLL.UserService.GetUserNameByUserId(data.SummaryPerson);
this.txtSubmitDate.Text = data.SubmitDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.SubmitDate) : "";
this.txtRemark.Text = data.Remark;
if (!string.IsNullOrEmpty(data.SummaryPerson))
{
this.drpSummaryPerson.SelectedValue = data.SummaryPerson;
}
WindowAtt_Close(null, null);
WindowAtt2_Close(null, null);
}
}
else
{
this.txtSummaryPerson.Text = this.CurrUser.UserName;
this.txtSubmitDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.drpSummaryPerson.SelectedValue = this.CurrUser.UserId;
}
}
}
@@ -56,7 +53,64 @@ namespace FineUIPro.Web.TestRun.DriverSummary
{
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.Driver_DriverSummary));
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/TestRun/DriverSummary/CompleteSummary&menuId={1}", this.hdId.Text, BLL.Const.CompleteSummaryMenuId)));
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/TestRun/DriverSummary/CompleteSummary&menuId={1}&strParam=1", this.hdId.Text, BLL.Const.CompleteSummaryMenuId)));
}
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
{
this.lbtnAttach.Text = string.Empty;
string url = string.Empty;
var attLists = BLL.AttachFileService.Getfiles(this.hdId.Text + "#1", BLL.Const.CompleteSummaryMenuId);
if (attLists != null)
{
List<string> lists = Funs.GetStrListByStr(attLists.AttachUrl, ',');
if (lists.Count > 0)
{
foreach (var item in lists)
{
url += item.Substring(item.IndexOf('_') + 1) + "\r\n";
}
}
if (!string.IsNullOrEmpty(url))
{
this.lbtnAttach.Text = url;
}
}
}
/// <summary>
/// 签字版附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttach2_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
{
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.Driver_DriverSummary));
}
PageContext.RegisterStartupScript(WindowAtt2.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/TestRun/DriverSummary/CompleteSummary&menuId={1}&strParam=2", this.hdId.Text, BLL.Const.CompleteSummaryMenuId)));
}
protected void WindowAtt2_Close(object sender, WindowCloseEventArgs e)
{
this.lbtnAttach2.Text = string.Empty;
string url = string.Empty;
var attLists = BLL.AttachFileService.Getfiles(this.hdId.Text + "#2", BLL.Const.CompleteSummaryMenuId);
if (attLists != null)
{
List<string> lists = Funs.GetStrListByStr(attLists.AttachUrl, ',');
if (lists.Count > 0)
{
foreach (var item in lists)
{
url += item.Substring(item.IndexOf('_') + 1) + "\r\n";
}
}
if (!string.IsNullOrEmpty(url))
{
this.lbtnAttach2.Text = url;
}
}
}
#endregion
@@ -68,17 +122,16 @@ namespace FineUIPro.Web.TestRun.DriverSummary
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.drpSummaryPerson.SelectedValue))
{
Alert.ShowInTop("请选择总结人", MessageBoxIcon.Warning);
return;
}
string id = Request.Params["id"];
Model.Driver_DriverSummary newData = new Model.Driver_DriverSummary();
//if (this.drpUnitWorkId.SelectedValue != BLL.Const._Null)
//{
// newData.UnitWorkId = this.drpUnitWorkId.SelectedValue;
//}
newData.DriverSummaryCode = this.txtDriverSummaryCode.Text.Trim();
newData.Summary = this.txtSummary.Text.Trim();
newData.SummaryPerson = this.CurrUser.UserId;
newData.SubmitDate = Funs.GetNewDateTime(this.txtSubmitDate.Text.Trim());
newData.Remark = this.txtRemark.Text.Trim();
newData.SummaryPerson = this.drpSummaryPerson.SelectedValue;
newData.SubmitDate = DateTime.Now;
newData.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(id))
{
@@ -87,7 +140,7 @@ namespace FineUIPro.Web.TestRun.DriverSummary
}
else
{
newData.SummaryType = "2";
newData.SummaryType = "3";
if (!string.IsNullOrEmpty(this.hdId.Text))
{
newData.DriverSummaryId = this.hdId.Text.Trim();