private bool RetrieveParameters(ref OlymarsDemo.DataClasses.Parameters.spI_tblProduct parameters, ref System.Data.SqlClient.SqlCommand sqlCommand) { try { if (sqlCommand.Parameters["@RETURN_VALUE"].Value != System.DBNull.Value) { parameters.internal_Set_RETURN_VALUE((System.Int32)sqlCommand.Parameters["@RETURN_VALUE"].Value); } else { parameters.internal_Set_RETURN_VALUE(System.Data.SqlTypes.SqlInt32.Null); } if (sqlCommand.Parameters["@Pro_GuidID"].Value != System.DBNull.Value) { try { parameters.Param_Pro_GuidID = (System.Data.SqlTypes.SqlGuid)sqlCommand.Parameters["@Pro_GuidID"].Value; } catch (System.InvalidCastException) { parameters.Param_Pro_GuidID = (System.Guid)sqlCommand.Parameters["@Pro_GuidID"].Value; } } else { parameters.Param_Pro_GuidID = System.Data.SqlTypes.SqlGuid.Null; } parameters.internal_Param_Pro_GuidID_UseDefaultValue = false; return(true); } catch (System.Data.SqlClient.SqlException sqlException) { parameters.internal_UpdateExceptionInformation(sqlException); return(false); } catch (System.Exception exception) { parameters.internal_UpdateExceptionInformation(exception); return(false); } }
private void ResetParameter(ref OlymarsDemo.DataClasses.Parameters.spI_tblProduct parameters) { parameters.internal_Set_RETURN_VALUE(System.Data.SqlTypes.SqlInt32.Null); }