Esempio n. 1
0
        /// <summary>
        /// 上传批次记录
        /// </summary>
        public static void UploadBatchTable()
        {
            try
            {
                LBatchNoDAL ldal = new LBatchNoDAL();
                //获取本地批次信息
                DataTable table = ldal.GetList("").Tables[0];
                if (table == null || table.Rows.Count == 0)
                {
                    return;
                }
                BatchNoDAL dal = new BatchNoDAL();

                string IDs = dal.Upload(table);

                if (!string.IsNullOrEmpty(IDs))
                {
                    ldal.DeleteList(IDs);//上传后删除本地数据
                    CLog.WriteStationLog("Sys", "UploadBatchTable:TID->{" + IDs + "},Time:{" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "}");
                    //string[] str = IDs.Split(',');
                }
            }
            catch (Exception ex)
            {
                CLog.WriteErrLog(ex.Message);
            }
        }