public void DeleteOldSerialsQuantities(string operatorCode, out string error) { var dt = new ObjectParameter("TranDT", typeof(DateTime)); var result = new ObjectParameter("Result", typeof(int)); error = ""; try { using (var context = new MONITOREntities()) { context.usp_CreateRma_DeleteSerialsQuantitiesByOperator(operatorCode, dt, result); } } catch (Exception ex) { error = (ex.InnerException == null) ? ex.Message : ex.InnerException.Message; } }
public void DeleteOldSerialsQuantities(string operatorCode, out string error) { var dt = new ObjectParameter("TranDT", typeof(DateTime)); var result = new ObjectParameter("Result", typeof(int)); error = ""; try { using (var context = new MONITOREntities()) { context.usp_CreateRma_DeleteSerialsQuantitiesByOperator(operatorCode, dt, result); } } catch (Exception ex) { string errorMsg = (ex.InnerException == null) ? ex.Message : ex.InnerException.Message; error = String.Format("Failed to delete old RMA serials. Nothing was processed. Error: {0}", errorMsg); } }