double iQty= dt.Compute("sum(数量)", string.Format("编码='{0}' and 型号='{1}'", matCode, atch)) == DBNull.Value ? 0.000 : Convert.ToDouble(dt.Compute("sum(数量)", string.Format("编码='{0}' and 型号='{1}'", matCode, atch)));