private bool RetrieveParameters(ref OlymarsDemo.DataClasses.Parameters.spI_tblSupplierProduct 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["@Spr_GuidProductID"].Value != System.DBNull.Value) { try { parameters.Param_Spr_GuidProductID = (System.Data.SqlTypes.SqlGuid)sqlCommand.Parameters["@Spr_GuidProductID"].Value; } catch (System.InvalidCastException) { parameters.Param_Spr_GuidProductID = (System.Guid)sqlCommand.Parameters["@Spr_GuidProductID"].Value; } } else { parameters.Param_Spr_GuidProductID = System.Data.SqlTypes.SqlGuid.Null; } parameters.internal_Param_Spr_GuidProductID_UseDefaultValue = false; if (sqlCommand.Parameters["@Spr_GuidSupplierID"].Value != System.DBNull.Value) { try { parameters.Param_Spr_GuidSupplierID = (System.Data.SqlTypes.SqlGuid)sqlCommand.Parameters["@Spr_GuidSupplierID"].Value; } catch (System.InvalidCastException) { parameters.Param_Spr_GuidSupplierID = (System.Guid)sqlCommand.Parameters["@Spr_GuidSupplierID"].Value; } } else { parameters.Param_Spr_GuidSupplierID = System.Data.SqlTypes.SqlGuid.Null; } parameters.internal_Param_Spr_GuidSupplierID_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_tblSupplierProduct parameters) { parameters.internal_Set_RETURN_VALUE(System.Data.SqlTypes.SqlInt32.Null); }