Example #1
0
        /// <summary>
        /// 获取物料毛重
        /// </summary>
        /// <param name="coll"></param>
        /// <returns></returns>
        private decimal GetGrossWeight(DynamicObjectCollection coll)
        {
            decimal weight = 0;

            if (coll != null && coll.Count > 0)
            {
                var obj = coll.ElementAt(0) as DynamicObject;
                weight = Convert.ToDecimal(SQLUtils.GetFieldValue(obj, "GROSSWEIGHT"));
            }
            return(weight);
        }
Example #2
0
        /// <summary>
        /// 获取单位编码
        /// </summary>
        /// <param name="coll"></param>
        /// <returns></returns>
        private string GetSaleUnitId(DynamicObjectCollection coll)
        {
            if (coll != null && coll.Count() > 0)
            {
                var obj  = coll.ElementAt(0) as DynamicObject;
                var obj_ = obj["SaleUnitId"] as DynamicObject;
                return(SQLUtils.GetFieldValue(obj_, "Number"));
            }

            return(null);
        }