提交代码
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user