Esempio n. 1
0
        /// <summary>
        /// 查询仓储属性表上报
        /// </summary>
        public string FindIbasSorting()
        {
            string tag = "上报仓储属性表成功!";

            using (PersistentManager dbpm = new PersistentManager("ZYDB2Connection"))
            {
                UploadDao dao = new UploadDao();
                dao.SetPersistentManager(dbpm);
                DataTable ibasSortingTable = this.QueryIbasSorting();
                if (ibasSortingTable.Rows.Count > 0)
                {
                    try
                    {
                        dbpm.BeginTransaction();
                        dao.InsertIbasSorting(ibasSortingTable);
                        this.UpdateIbasSorting("");
                        dbpm.Commit();
                    }
                    catch (Exception exp)
                    {
                        dbpm.Rollback();
                        throw new Exception(exp.Message);
                    }
                }
                else
                {
                    tag = "没有新的仓储属性表要上报!";
                }
            }
            return(tag);
        }