提交代码
This commit is contained in:
@@ -123,16 +123,49 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
string strList = Request.Params["strList"];
|
||||
List<string> list = Funs.GetStrListByStr(strList, '|');
|
||||
if (list.Count() == 2)
|
||||
if (list.Count() == 3)
|
||||
{
|
||||
this.UnitWorkId = list[0];
|
||||
TaskDate = list[1];
|
||||
string unitId = list[1];
|
||||
TaskDate = list[2];
|
||||
|
||||
InitDropList();
|
||||
|
||||
Model.WBS_UnitWork UnitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(this.UnitWorkId);
|
||||
BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, UnitWork.UnitId, false);//单位
|
||||
this.drpUnit.SelectedValue = unitId;
|
||||
if (!string.IsNullOrEmpty(TaskDate))
|
||||
{
|
||||
txtTaskDate.Text = TaskDate;
|
||||
txtTaskDate.Enabled = false;
|
||||
var task = (from x in Funs.DB.HJGL_WeldTask
|
||||
where x.UnitWorkId == UnitWorkId && x.UnitId == unitId
|
||||
&& x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd")
|
||||
select x).FirstOrDefault();
|
||||
if (task != null)
|
||||
{
|
||||
txtTaskCode.Text = task.TaskCode;
|
||||
//drpUnit.SelectedValue = task.UnitId;
|
||||
}
|
||||
txtTaskCode.Enabled = false;
|
||||
}
|
||||
string projectId = string.Empty;
|
||||
|
||||
if (UnitWorkId != null)
|
||||
{
|
||||
|
||||
projectId = UnitWork.ProjectId;
|
||||
this.txtUnitWorkName.Text = UnitWork.UnitWorkName;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.UnitWorkId = list[0];
|
||||
TaskDate = list[1];
|
||||
InitDropList();
|
||||
|
||||
Model.WBS_UnitWork UnitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(this.UnitWorkId);
|
||||
BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, UnitWork.UnitId, false);//单位
|
||||
if (!string.IsNullOrEmpty(TaskDate))
|
||||
{
|
||||
txtTaskDate.Text = TaskDate;
|
||||
@@ -144,7 +177,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (task != null)
|
||||
{
|
||||
txtTaskCode.Text = task.TaskCode;
|
||||
drpUnit.SelectedValue = task.UnitId;
|
||||
//drpUnit.SelectedValue = task.UnitId;
|
||||
}
|
||||
txtTaskCode.Enabled = false;
|
||||
}
|
||||
@@ -464,7 +497,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
else
|
||||
{
|
||||
var task = from x in Funs.DB.HJGL_WeldTask
|
||||
where x.UnitWorkId == UnitWorkId
|
||||
where x.UnitWorkId == UnitWorkId && x.UnitId == this.drpUnit.SelectedValue
|
||||
&& x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd")
|
||||
select x;
|
||||
if (task.Count() > 0)
|
||||
|
||||
Reference in New Issue
Block a user