Пример #1
0
        /// <summary>
        /// 獲取未拋賬的工單
        /// </summary>
        /// <param name="wo"></param>
        /// <param name="confirmed_flag"></param>
        /// <param name="sfcdb"></param>
        /// <returns></returns>
        public R_STOCK_GT GetNotGTbjByWO(string wo, string confirmed_flag, OleExec sfcdb)
        {
            string    sql = $@"select * from R_STOCK_GT where workorderno='{wo}' and sap_flag='0' and confirmed_flag='{confirmed_flag}' and backflush_time is null ";
            DataTable dt  = sfcdb.ExecSelect(sql).Tables[0];

            if (dt.Rows.Count > 0)
            {
                Row_R_STOCK_GT rowObj = (Row_R_STOCK_GT)this.NewRow();
                rowObj.loadData(dt.Rows[0]);
                return(rowObj.GetDataObject());
            }
            else
            {
                return(null);
            }
        }
Пример #2
0
        /// <summary>
        /// 獲取未拋賬的工單list
        /// </summary>
        /// <param name="confirmed_flag"></param>
        /// <param name="sfcdb"></param>
        /// <returns></returns>
        public List <R_STOCK_GT> GetNotGTListByConfirmedFlag(string confirmed_flag, OleExec sfcdb)
        {
            string            sql    = $@"select * from R_STOCK_GT where 1=1 and sap_flag='0' and confirmed_flag='{confirmed_flag}' ";
            List <R_STOCK_GT> GTList = new List <R_STOCK_GT>();
            DataTable         dt     = sfcdb.ExecSelect(sql).Tables[0];

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    Row_R_STOCK_GT rowObj = (Row_R_STOCK_GT)this.NewRow();
                    rowObj.loadData(row);
                    GTList.Add(rowObj.GetDataObject());
                }
            }
            return(GTList);
        }