Browse Source

master
yibo 8 years ago
parent
commit
04999ba6c9
2 changed files with 15 additions and 13 deletions
  1. +2
    -0
      BO/Utils/BillRpc/GradeAndWeightRpc.cs
  2. +13
    -13
      WeighAndGrading/GradeFrom.cs

+ 2
- 0
BO/Utils/BillRpc/GradeAndWeightRpc.cs View File

@ -237,6 +237,7 @@ namespace BO.Utils.BillRpc
var delete = new DQDeleteDom(typeof(GradeAndWeight_Detail)); var delete = new DQDeleteDom(typeof(GradeAndWeight_Detail));
delete.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", true), DQCondition.EQ("ID", 0))); delete.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", true), DQCondition.EQ("ID", 0)));
session.ExecuteNonQuery(delete); session.ExecuteNonQuery(delete);
session.Commit();
} }
} }
@ -247,6 +248,7 @@ namespace BO.Utils.BillRpc
var delete = new DQDeleteDom(typeof(GradeAndWeight_Detail)); var delete = new DQDeleteDom(typeof(GradeAndWeight_Detail));
delete.Where.Conditions.Add(DQCondition.EQ("SID", sid)); delete.Where.Conditions.Add(DQCondition.EQ("SID", sid));
session.ExecuteNonQuery(delete); session.ExecuteNonQuery(delete);
session.Commit();
} }
} }


+ 13
- 13
WeighAndGrading/GradeFrom.cs View File

@ -550,17 +550,17 @@ namespace WeighAndGrading
row.DefaultCellStyle.BackColor = Color.Red; row.DefaultCellStyle.BackColor = Color.Red;
} }
InitScrollBar2(); InitScrollBar2();
if (lastSelectID.HasValue)
{
foreach (DataGridViewRow row in historyGrid.Rows)
{
if ((long)row.Cells["H_SID"].Value == lastSelectID)
{
historyGrid.CurrentCell = row.Cells[row.Cells.Count - 1];
break;
}
}
}
//if (lastSelectID.HasValue)
//{
// foreach (DataGridViewRow row in historyGrid.Rows)
// {
// if ((long)row.Cells["H_SID"].Value == lastSelectID)
// {
// historyGrid.CurrentCell = row.Cells[row.Cells.Count - 1];
// break;
// }
// }
//}
try try
{ {
if (rightRoll != -1) if (rightRoll != -1)
@ -1465,13 +1465,13 @@ namespace WeighAndGrading
private long? maxLockID; private long? maxLockID;
GradeAndWeight_Detail lastCheckItem, mCurrentSlectItem; GradeAndWeight_Detail lastCheckItem, mCurrentSlectItem;
long? lastSelectID = null;
//long? lastSelectID = null;
private void historyGrid_CellClick(object sender, DataGridViewCellEventArgs e) private void historyGrid_CellClick(object sender, DataGridViewCellEventArgs e)
{ {
if (e.RowIndex < 0) if (e.RowIndex < 0)
return; return;
var currentRow = historyGrid.CurrentRow.DataBoundItem as GradeAndWeight_Detail; var currentRow = historyGrid.CurrentRow.DataBoundItem as GradeAndWeight_Detail;
lastSelectID = currentRow.SID;
// lastSelectID = currentRow.SID;
mCurrentSlectItem = currentRow; mCurrentSlectItem = currentRow;


Loading…
Cancel
Save