public static int GetLastPanelNumber() { Pallet pl = new Pallet(); string query = "select max(PalletNo) Last from Pallet"; pl.LoadFromRawSql(query); return Convert.ToInt32(pl.DataRow["Last"]); }
public static int GetLastPanelNumber() { Pallet pl = new Pallet(); string query = "select max(PalletNo) Last from Pallet"; pl.LoadFromRawSql(query); return(Convert.ToInt32(pl.DataRow["Last"])); }
/// <summary> /// Gets the last pallet number /// </summary> /// <returns></returns> public static int GetLastPanelNumber() { Pallet pl = new Pallet(); string query = HCMIS.Repository.Queries.Pallet.SelectGetLastPanelNumber(); pl.LoadFromRawSql(query); if (pl.RowCount == 0 || pl.DataRow["Last"] == DBNull.Value) { return 0; } return Convert.ToInt32(pl.DataRow["Last"]); }
/// <summary> /// Gets the last pallet number /// </summary> /// <returns></returns> public static int GetLastPanelNumber() { Pallet pl = new Pallet(); string query = HCMIS.Repository.Queries.Pallet.SelectGetLastPanelNumber(); pl.LoadFromRawSql(query); if (pl.RowCount == 0 || pl.DataRow["Last"] == DBNull.Value) { return(0); } return(Convert.ToInt32(pl.DataRow["Last"])); }