public List <STOP> STOP_Find(List <STOP> list) { List <SqlParameter> parameters = new List <SqlParameter>(); STOPTableSet set = new STOPTableSet(list); parameters.AddInputParameter("@ENP", SqlDbType.Structured, set.STOPResultTable); List <STOP> result = Execute_GetList(NomernikSTOPMaterializer.Instance, "STOP_Find", parameters); return(result); }
public void STOP_Save(IEnumerable <STOP> listSTOP, Nomernik.History nompHistory) { List <SqlParameter> parameters = new List <SqlParameter>(); STOPTableSet set = new STOPTableSet(listSTOP); parameters.AddInputParameter("@stopTable", SqlDbType.Structured, set.STOPResultTable); parameters.AddInputParameter("@LoadDate", SqlDbType.DateTime, nompHistory.LoadDate); parameters.AddInputParameter("@FileDate", SqlDbType.DateTime, nompHistory.FileDate); parameters.AddInputParameter("@UserID", SqlDbType.BigInt, nompHistory.UserID); parameters.AddInputParameter("@CountAll", SqlDbType.BigInt, nompHistory.CountAll); parameters.AddInputParameter("@CountOur", SqlDbType.BigInt, nompHistory.CountOur); parameters.AddInputParameter("@CountChange", SqlDbType.BigInt, listSTOP.Count()); //в процедуре идет запись данных в таблицу STOP и истории в STOPHistory Execute_StoredProcedure("STOP_Save", parameters); }