Exemple #1
0
        public override Info_UFs_Larguras Get_Info_UFs_Larguras(long depositoID, IDbConnection conn)
        {
            Info_UFs_Larguras ret = new Info_UFs_Larguras();

            using (SqlCommand command = new SqlCommand("", (SqlConnection)conn))
            {
                command.CommandText = this.Build_SQL_GetTotalUFs(depositoID);
                SqlDataReader reader = command.ExecuteReader();
                if (reader.Read())
                {
                    if (reader.GetValue(0) != DBNull.Value)
                    {
                        ret.TotalUFs = Convert.ToInt64(reader.GetValue(0));
                    }
                    if (reader.GetValue(1) != DBNull.Value)
                    {
                        ret.TotalUFs_semLargura = Convert.ToInt64(reader.GetValue(1));
                    }
                    if (reader.GetValue(2) != DBNull.Value)     // Media da largura
                    {
                        ret.Media_largura = Convert.ToDouble(reader.GetValue(2));
                    }
                }
                reader.Close();
            }

            return(ret);
        }
        public override Info_UFs_Larguras Get_Info_UFs_Larguras(long depositoID, IDbConnection conn)
        {
            Info_UFs_Larguras ret = new Info_UFs_Larguras();

            using (SqlCommand command = new SqlCommand("", (SqlConnection)conn))
            {
                command.CommandText = this.Build_SQL_GetTotalUFs(depositoID);
                SqlDataReader reader = command.ExecuteReader();
                if (reader.Read())
                {
                    if (reader.GetValue(0) != DBNull.Value)
                        ret.TotalUFs = Convert.ToInt64(reader.GetValue(0));
                    if (reader.GetValue(1) != DBNull.Value)
                        ret.TotalUFs_semLargura = Convert.ToInt64(reader.GetValue(1));
                    if (reader.GetValue(2) != DBNull.Value)     // Media da largura
                        ret.Media_largura = Convert.ToDouble(reader.GetValue(2));
                }
                reader.Close();
            }

            return ret;
        }