C#技术百科
问问你的心你有没有信心 做事情要专一坚定,执着
alter proc Proc_UpdateInfomation(@C_ID varchar(50),@State int output) as begin declare @Tran varchar(50) set @State=0 begin tran @Tran delete from companyinfo where C_ID=@C_ID if @@error<>0 or @@rowcount>1 begin rollback tran @Tran set @State=0 end delete from EnterpriseContent where C_ID=@C_ID if @@error<>0 or @@rowcount>1 begin rollback tran @Tran set @State=0 end insert into companyinfo([C_ID],[CompanyName],[GenderID],[Introduce],[LogoPath],[CompanyPath],[PurchaseProduct],[MainProduct],[DealType],[CompanyType],[Sort],[SortOrder],[regMoney],[regTime],[regPlace],[CompanyAdderss],[FoundTime],[PPerson],[PSex],[PDept],[PDuty],[PAddress],[PZip],[PTel],[PEmail],[PPhone],[PMobile],[PFax],[PQQ],[PMSN],[PWebSite],[KeyWord],[KeyStartTime],[KeyEndTime],[AddTime],[Scores],[Award],[IsPass],[PassTime],[PassAdmin],[OpenedMonth],[IsPayment],[isdelete]) select [C_ID],[CompanyName],[GenderID],[Introduce],[LogoPath],[CompanyPath],[PurchaseProduct],[MainProduct],[DealType],[CompanyType],[Sort],[SortOrder],[regMoney],[regTime],[regPlace],[CompanyAdderss],[FoundTime],[PPerson],[PSex],[PDept],[PDuty],[PAddress],[PZip],[PTel],[PEmail],[PPhone],[PMobile],[PFax],[PQQ],[PMSN],[PWebSite],[KeyWord],[KeyStartTime],[KeyEndTime],[AddTime],[Scores],[Award],[IsPass],[PassTime],[PassAdmin],[OpenedMonth],[IsPayment],[isdelete] from UpdateCompanyInfo where C_ID=@C_ID if @@error<>0 or @@rowcount>1 begin rollback tran @Tran set @State=0 end insert into EnterpriseContent([C_ID],[LegalPerson],[DeveloperNum],[WorkerNum],[InCome],[MainMarket],[MainPlace],[IsOem],[PlantArea],[BrandName],[Turnover],[Import],[Export],[QualityControl],[ManagementSystem],[OurBank],[BankAccount]) select [C_ID],[LegalPerson],[DeveloperNum],[WorkerNum],[InCome],[MainMarket],[MainPlace],[IsOem],[PlantArea],[BrandName],[Turnover],[Import],[Export],[QualityControl],[ManagementSystem],[OurBank],[BankAccount] from UpdateCompanyInfo where C_ID=@C_ID if @@error<>0 or @@rowcount>1 begin rollback tran @Tran set @State=0 end delete from UpdateCompanyInfo where C_ID=@C_ID if @@error<>0 or @@rowcount>1 begin rollback tran @Tran set @State=0 end if @@error=0 and @@rowcount>0 begin commit tran @Tran set @State=1 end else begin rollback tran @Tran set @State=0 end end go
posted on 2008-06-12 00:08  王德田  阅读(203)  评论(0编辑  收藏  举报