2024-02-19 试车分包管理修改

This commit is contained in:
2024-02-19 10:32:15 +08:00
parent 4d854a854a
commit 1180cda1a6
26 changed files with 1203 additions and 1290 deletions
@@ -18,10 +18,15 @@ namespace FineUIPro.Web.TestRun.DriverSub
//BLL.UnitService.InitUnitDownList(this.drpSubUnitId, this.CurrUser.LoginProjectId, true);
//BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, true);
string id = Request.Params["id"];
DriverSubName.DataSource=DropListService.drpDriverSubNameList();
DriverSubName.DataTextField = "Text";
DriverSubName.DataValueField = "Value";
DriverSubName.DataBind();
SubcontractingTypes.DataSource=DropListService.drpDriverSubNameList();
SubcontractingTypes.DataTextField = "Text";
SubcontractingTypes.DataValueField = "Value";
SubcontractingTypes.DataBind();
drpstate.DataSource = DropListService.drpDriverSubPlanStateList();
drpstate.DataTextField = "Text";
drpstate.DataValueField = "Value";
drpstate.DataBind();
if (!string.IsNullOrEmpty(id))
{
Model.DriverSub_DriverSubPlan data = BLL.DriverSubPlanService.GetDriverSubPlanById(id);
@@ -29,7 +34,8 @@ namespace FineUIPro.Web.TestRun.DriverSub
{
this.hdId.Text = id;
this.txtCode.Text = data.Code;
this.DriverSubName.SelectedValueArray= data.DriverSubNames.Split(',');
this.SubcontractingTypes.SelectedValueArray= data.SubcontractingTypes.Split(',');
this.drpstate.SelectedValue= data.State.ToString();
//if (!string.IsNullOrEmpty(data.SubUnitId))
//{
// this.drpSubUnitId.SelectedValue = data.SubUnitId;
@@ -70,41 +76,12 @@ namespace FineUIPro.Web.TestRun.DriverSub
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
//if (this.drpSubUnitId.SelectedValue==BLL.Const._Null)
//{
// Alert.ShowInTop("请选择开车分包单位!", MessageBoxIcon.Warning);
// return;
//}
string id = Request.Params["id"];
Model.DriverSub_DriverSubPlan newData = new Model.DriverSub_DriverSubPlan();
newData.Code = this.txtCode.Text.Trim();
newData.DriverSubNames= GetStringByArray(this.DriverSubName.SelectedValueArray);
//if (this.drpSubUnitId.SelectedValue != BLL.Const._Null)
//{
// newData.SubUnitId = this.drpSubUnitId.SelectedValue;
//}
//newData.Introductions = this.txtIntroductions.Text.Trim();
//newData.Achievement = this.txtAchievement.Text.Trim();
//newData.Cooperation = this.txtCooperation.Text.Trim();
//if (!string.IsNullOrEmpty(this.drpUnitWorkIds.SelectedValue))
//{
// newData.InstallationIds = 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.IsInvited = Convert.ToBoolean(this.rblIsInvited.SelectedValue);
//newData.Remark = this.txtRemark.Text.Trim();
newData.SubcontractingTypes = GetStringByArray(this.SubcontractingTypes.SelectedValueArray);
newData.State = int.Parse(drpstate.SelectedValue);
newData.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(id))
{