Ejemplo n.º 1
0
        /// <summary>
        /// 查询分拣订单主表上报
        /// </summary>
        public string FindIordMasterOrder()
        {
            string tag = "上报分拣订单主表成功!";

            using (PersistentManager dbpm = new PersistentManager("ZYDB2Connection"))
            {
                UploadDao dao = new UploadDao();
                dao.SetPersistentManager(dbpm);
                DataTable orderMasterTable = this.QueryIordMasterOrder();
                if (orderMasterTable.Rows.Count > 0)
                {
                    try
                    {
                        dbpm.BeginTransaction();
                        dao.InsertIordOrder(orderMasterTable);
                        this.UpdateOrderMaster("");
                        dbpm.Commit();
                    }
                    catch (Exception exp)
                    {
                        dbpm.Rollback();
                        throw new Exception(exp.Message);
                    }
                }
                else
                {
                    tag = "没有新的分拣订单主表要上报!";
                }
            }
            return(tag);
        }