|
|
@ -163,19 +163,19 @@ namespace WeighAndGrading |
|
|
return; |
|
|
return; |
|
|
select = weightGrid.CurrentRow.DataBoundItem as GradeAndWeight_Detail; |
|
|
select = weightGrid.CurrentRow.DataBoundItem as GradeAndWeight_Detail; |
|
|
old = new GradeAndWeight_Detail { Order = select.Order, OrderDetail_ID = select.OrderDetail_ID, Technics = select.Technics }; |
|
|
old = new GradeAndWeight_Detail { Order = select.Order, OrderDetail_ID = select.OrderDetail_ID, Technics = select.Technics }; |
|
|
if (e.ColumnIndex==1||e.ColumnIndex == 2 || e.ColumnIndex == 5) |
|
|
|
|
|
|
|
|
if (e.ColumnIndex==3||e.ColumnIndex == 4 || e.ColumnIndex == 7) |
|
|
{ |
|
|
{ |
|
|
var keyBoard = new NumberPad(); |
|
|
var keyBoard = new NumberPad(); |
|
|
if (keyBoard.ShowDialog() == true) |
|
|
if (keyBoard.ShowDialog() == true) |
|
|
{ |
|
|
{ |
|
|
var num = keyBoard.Result; |
|
|
var num = keyBoard.Result; |
|
|
if (e.ColumnIndex == 1) |
|
|
|
|
|
|
|
|
if (e.ColumnIndex == 3) |
|
|
{ |
|
|
{ |
|
|
if (string.IsNullOrEmpty(num)) |
|
|
if (string.IsNullOrEmpty(num)) |
|
|
throw new Exception("请输入序号"); |
|
|
throw new Exception("请输入序号"); |
|
|
select.Index = int.Parse(num); |
|
|
select.Index = int.Parse(num); |
|
|
} |
|
|
} |
|
|
else if (e.ColumnIndex == 2) |
|
|
|
|
|
|
|
|
else if (e.ColumnIndex == 4) |
|
|
select.Order = string.IsNullOrEmpty(num) ? 0 : int.Parse(num); |
|
|
select.Order = string.IsNullOrEmpty(num) ? 0 : int.Parse(num); |
|
|
else |
|
|
else |
|
|
select.Weight = string.IsNullOrEmpty(num) ? 0 : decimal.Parse(num); |
|
|
select.Weight = string.IsNullOrEmpty(num) ? 0 : decimal.Parse(num); |
|
|
|