Exemplo n.º 1
0
        /// <summary>
        /// zys_2011-06-21
        /// </summary>
        /// <param name="productCode"></param>
        /// <returns></returns>
        internal string FindProductBarUnitCode(string productCode)
        {
            string sql = @"SELECT U.UNITCODE FROM WMS_UNIT U 
                               LEFT JOIN WMS_PRODUCT P ON U.UNITCODE= P.TIAOCODE WHERE P.PRODUCTCODE='{0}'";
            sql = string.Format(sql, productCode);

            using (PersistentManager persistentManager = new PersistentManager())
            {
                AllotDao dao = new AllotDao();
                return dao.ExecScaler(sql).ToString();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// zys_2011-06-21
        /// </summary>
        /// <param name="unitCode"></param>
        /// <returns></returns>
        internal string FindUnitName(string unitCode)
        {
            string sql = @"SELECT UNITNAME FROM WMS_UNIT WHERE UNITCODE='{0}'";
            sql = string.Format(sql, unitCode);

            using (PersistentManager persistentManager = new PersistentManager())
            {
                AllotDao dao = new AllotDao();
                string returnVal = dao.ExecScaler(sql).ToString();
                return returnVal;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// zys_2011-06-21
        /// </summary>
        /// <param name="productCode"></param>
        /// <returns></returns>
        internal decimal FindProductMaxQuantity(string productCode)
        {
            string sql = @"SELECT MAXCELLPIECE FROM WMS_PRODUCT WHERE PRODUCTCODE = '{0}'";
            sql = string.Format(sql, productCode);

            using (PersistentManager persistentManager = new PersistentManager())
            {
                AllotDao dao = new AllotDao();
                decimal returnVal = 0;
                decimal.TryParse(dao.ExecScaler(sql).ToString(), out returnVal);                
                return returnVal;
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// zys_2011-06-21
        /// </summary>
        /// <param name="unitCode"></param>
        /// <returns></returns>
        internal decimal FindUnitStandardRate(string unitCode)
        {
            string sql = @"SELECT STANDARDRATE FROM WMS_UNIT WHERE UNITCODE='{0}'";
            sql = string.Format(sql,unitCode);

            using (PersistentManager persistentManager = new PersistentManager())
            {
                AllotDao dao = new AllotDao();
                decimal returnVal = 0;
                decimal.TryParse(dao.ExecScaler(sql).ToString(), out returnVal);
                return returnVal;
            }
        }