Esempio n. 1
0
        /// <summary>
        /// 保存商家的基本信息
        /// 1.信息保存到ECStore.dbo.StoreBasicInfo
        /// 2.信息同步到IPP3.dbo.Vendor
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public static int SaveStoreBasicInfo(StoreBasicInfo info)
        {
            using (var trans = TransactionManager.Create())
            {
                if (info.SysNo.HasValue)
                {
                    StoreDA.UpdateStoreBasicInfo(info);
                }
                else
                {
                    StoreDA.InsertStoreBasicInfo(info);
                }

                var basicInfo = StoreDA.QueryStoreBasicInfoBySellerSysNo(info.SellerSysNo.Value);

                StoreDA.SaveStoreBasicInfoToIPP3Vendor(ConvertStoreBasicToIPP3Vendor(basicInfo), info.InUserSysNo.Value);

                trans.Complete();
            }
            return(1);
        }