/Files/qanholas/SPGen_ReleaseCandidate1_Binaries.zip
?
?
--
-- Dropping stored procedure sp_費用表_SelectAll :
--
?
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[sp_費用表_SelectAll]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
? DROP PROCEDURE [dbo].[sp_費用表_SelectAll]
?
GO
?
-- ==========================================================================================
-- Entity Name:?? sp_費用表_SelectAll
-- Author: Mehdi Keramati
-- Create date:?? 2011-10-5 13:08:25
-- Description:?? This stored procedure is intended for selecting all rows from 費用表table
-- ==========================================================================================
Create Procedure sp_費用表_SelectAll
As
Begin
??? Select
?????? [費用ID],
?????? [費用類型],
?????? [戶號],
?????? [金額],
?????? [生成工號],
?????? [生成日期],
?????? [滯納金日期],
?????? [滯納金],
?????? [銷帳工號],
?????? [銷帳日期],
?????? [實收方式],
?????? [供水公司],
?????? [戶名],
?????? [地址],
?????? [表位號],
?????? [表身號],
?????? [口徑],
?????? [收費方式],
?????? [帳戶編號],
?????? [稅號],
?????? [打印發票],
?????? [標志],
?????? [備注],
?????? [滯納金結算日],
?????? [處理類型],
?????? [處理費用ID],
?????? [處理標志],
?????? [銷帳時間]
??? From 費用表
End
?
GO
?
?
--
-- Dropping stored procedure sp_費用表_SelectRow :
--
?
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[sp_費用表_SelectRow]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
? DROP PROCEDURE [dbo].[sp_費用表_SelectRow]
?
GO
?
-- ==========================================================================================
-- Entity Name:?? sp_費用表_SelectRow
-- Author: Mehdi Keramati
-- Create date:?? 2011-10-5 13:08:25
-- Description:?? This stored procedure is intended for selecting a specific row from 費用表table
-- ==========================================================================================
Create Procedure sp_費用表_SelectRow
?
As
Begin
??? Select
?????? [費用ID],
?????? [費用類型],
?????? [戶號],
?????? [金額],
?????? [生成工號],
?????? [生成日期],
?????? [滯納金日期],
?????? [滯納金],
?????? [銷帳工號],
?????? [銷帳日期],
?????? [實收方式],
?????? [供水公司],
?????? [戶名],
?????? [地址],
?????? [表位號],
?????? [表身號],
?????? [口徑],
?????? [收費方式],
?????? [帳戶編號],
?????? [稅號],
?????? [打印發票],
?????? [標志],
?????? [備注],
?????? [滯納金結算日],
?????? [處理類型],
?????? [處理費用ID],
?????? [處理標志],
?????? [銷帳時間]
??? From 費用表
??? Where
?
End
?
GO
?
?
--
-- Dropping stored procedure sp_費用表_Insert :
--
?
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[sp_費用表_Insert]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
? DROP PROCEDURE [dbo].[sp_費用表_Insert]
?
GO
?
-- ==========================================================================================
-- Entity Name:?? sp_費用表_Insert
-- Author: Mehdi Keramati
-- Create date:?? 2011-10-5 13:08:25
-- Description:?? This stored procedure is intended for inserting values to 費用表table
-- ==========================================================================================
Create Procedure sp_費用表_Insert
??? @費用ID decimal,
??? @費用類型char(2),
??? @戶號int,
??? @金額decimal,
??? @生成工號int,
??? @生成日期datetime,
??? @滯納金日期datetime,
??? @滯納金decimal,
??? @銷帳工號int,
??? @銷帳日期datetime,
??? @實收方式char(2),
??? @供水公司char(3),
??? @戶名varchar(60),
??? @地址varchar(60),
??? @表位號char(13),
??? @表身號varchar(10),
??? @口徑int,
??? @收費方式char(2),
??? @帳戶編號int,
??? @稅號varchar(20),
??? @打印發票bit,
??? @標志char(1),
??? @備注varchar(254),
??? @滯納金結算日datetime,
??? @處理類型varchar(50),
??? @處理費用ID decimal,
??? @處理標志varchar(2),
??? @銷帳時間datetime
As
Begin
??? Insert Into 費用表
?????? ([費用ID],[費用類型],[戶號],[金額],[生成工號],[生成日期],[滯納金日期],[滯納金],[銷帳工號],[銷帳日期],[實收方式],[供水公司],[戶名],[地址],[表位號],[表身號],[口徑],[收費方式],[帳戶編號],[稅號],[打印發票],[標志],[備注],[滯納金結算日],[處理類型],[處理費用ID],[處理標志],[銷帳時間])
??? Values
?????? (@費用ID,@費用類型,@戶號,@金額,@生成工號,@生成日期,@滯納金日期,@滯納金,@銷帳工號,@銷帳日期,@實收方式,@供水公司,@戶名,@地址,@表位號,@表身號,@口徑,@收費方式,@帳戶編號,@稅號,@打印發票,@標志,@備注,@滯納金結算日,@處理類型,@處理費用ID,@處理標志,@銷帳時間)
?
End
?
GO
?
?
--
-- Dropping stored procedure sp_費用表_Update :
--
?
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[sp_費用表_Update]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
? DROP PROCEDURE [dbo].[sp_費用表_Update]
?
GO
?
-- ==========================================================================================
-- Entity Name:?? sp_費用表_Update
-- Author: Mehdi Keramati
-- Create date:?? 2011-10-5 13:08:26
-- Description:?? This stored procedure is intended for updating 費用表table
-- ==========================================================================================
Create Procedure sp_費用表_Update
??? @費用ID decimal,
??? @費用類型char(2),
??? @戶號int,
??? @金額decimal,
??? @生成工號int,
??? @生成日期datetime,
??? @滯納金日期datetime,
??? @滯納金decimal,
??? @銷帳工號int,
??? @銷帳日期datetime,
??? @實收方式char(2),
??? @供水公司char(3),
??? @戶名varchar(60),
??? @地址varchar(60),
??? @表位號char(13),
??? @表身號varchar(10),
??? @口徑int,
??? @收費方式char(2),
??? @帳戶編號int,
??? @稅號varchar(20),
??? @打印發票bit,
??? @標志char(1),
??? @備注varchar(254),
??? @滯納金結算日datetime,
??? @處理類型varchar(50),
??? @處理費用ID decimal,
??? @處理標志varchar(2),
??? @銷帳時間datetime
As
Begin
??? Update 費用表
??? Set
?????? [費用ID] = @費用ID,
?????? [費用類型] = @費用類型,
?????? [戶號] = @戶號,
?????? [金額] = @金額,
?????? [生成工號] = @生成工號,
?????? [生成日期] = @生成日期,
?????? [滯納金日期] = @滯納金日期,
?????? [滯納金] = @滯納金,
?????? [銷帳工號] = @銷帳工號,
?????? [銷帳日期] = @銷帳日期,
?????? [實收方式] = @實收方式,
?????? [供水公司] = @供水公司,
?????? [戶名] = @戶名,
?????? [地址] = @地址,
?????? [表位號] = @表位號,
?????? [表身號] = @表身號,
?????? [口徑] = @口徑,
?????? [收費方式] = @收費方式,
?????? [帳戶編號] = @帳戶編號,
?????? [稅號] = @稅號,
?????? [打印發票] = @打印發票,
?????? [標志] = @標志,
?????? [備注] = @備注,
?????? [滯納金結算日] = @滯納金結算日,
?????? [處理類型] = @處理類型,
?????? [處理費用ID] = @處理費用ID,
?????? [處理標志] = @處理標志,
?????? [銷帳時間] = @銷帳時間
??? Where?????
?
End
?
GO
?
?
--
-- Dropping stored procedure sp_費用表_DeleteRow :
--
?
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[sp_費用表_DeleteRow]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
? DROP PROCEDURE [dbo].[sp_費用表_DeleteRow]
?
GO
?
-- ==========================================================================================
-- Entity Name:?? sp_費用表_DeleteRow
-- Author: Mehdi Keramati
-- Create date:?? 2011-10-5 13:08:26
-- Description:?? This stored procedure is intended for deleting a specific row from 費用表table
-- ==========================================================================================
Create Procedure sp_費用表_DeleteRow
?
As
Begin
??? Delete 費用表
??? Where
?
?
End
?
GO
?
?
?
?
using System;
using System.Data;
using System.Data.SqlClient;
using System.ComponentModel;
using NovinMedia.Data;
namespace NovinMedia.Data.Layer
{
??? [DataObject(true)]
??? public class 費用表2
??? {
??[DataObjectMethod(DataObjectMethodType.Fill)]
??public DataSet SelectAll()
??????? {
??????????? DbObject dbo = new DbObject();
??????????? SqlParameter[] parameters = new SqlParameter[]
??????????????? {
?
??????????????? };
??????????? return dbo.RunProcedure("sp_費用表2_SelectAll", parameters, "費用表2");
??????? }
??[DataObjectMethod(DataObjectMethodType.Fill)]
??public DataSet SelectRow()
??????? {
??????????? DbObject dbo = new DbObject();
??????????? SqlParameter[] parameters = new SqlParameter[]
??????????????? {
?
??????????????? };
??????????? return dbo.RunProcedure("sp_費用表2_SelectRow", parameters, "費用表2");
??????? }
??[DataObjectMethod(DataObjectMethodType.Insert)]
??public int InsertRow(string 費用ID,string 費用類型,int 戶號,string 金額,int 生成工號,DateTime 生成日期,DateTime 滯納金日期,string 滯納金,int 銷帳工號,DateTime 銷帳日期,string 實收方式,string 供水公司,string 戶名,string 地址,string 表位號,string 表身號,int 口徑,string 收費方式,int 帳戶編號,string 稅號,bool 打印發票,string 標志,string 備注,DateTime 滯納金結算日,string 處理類型,string 處理費用ID,string 處理標志,DateTime 銷帳時間)
??{
???int RowsAffected = 0;
???int Result = 0;
???DbObject dbo = new DbObject();
???SqlParameter[] parameters = new SqlParameter[]
????{
?????new SqlParameter("費用ID",費用ID),
?????new SqlParameter("費用類型",費用類型),
?????new SqlParameter("戶號",戶號),
?????new SqlParameter("金額",金額),
?????new SqlParameter("生成工號",生成工號),
?????new SqlParameter("生成日期",生成日期),
?????new SqlParameter("滯納金日期",滯納金日期),
?????new SqlParameter("滯納金",滯納金),
?????new SqlParameter("銷帳工號",銷帳工號),
?????new SqlParameter("銷帳日期",銷帳日期),
?????new SqlParameter("實收方式",實收方式),
?????new SqlParameter("供水公司",供水公司),
?????new SqlParameter("戶名",戶名),
?????new SqlParameter("地址",地址),
?????new SqlParameter("表位號",表位號),
?????new SqlParameter("表身號",表身號),
?????new SqlParameter("口徑",口徑),
?????new SqlParameter("收費方式",收費方式),
?????new SqlParameter("帳戶編號",帳戶編號),
?????new SqlParameter("稅號",稅號),
?????new SqlParameter("打印發票",打印發票),
?????new SqlParameter("標志",標志),
?????new SqlParameter("備注",備注),
?????new SqlParameter("滯納金結算日",滯納金結算日),
?????new SqlParameter("處理類型",處理類型),
?????new SqlParameter("處理費用ID",處理費用ID),
?????new SqlParameter("處理標志",處理標志),
?????new SqlParameter("銷帳時間",銷帳時間)
????};
???Result = dbo.RunProcedure("sp_費用表2_Insert", parameters, out RowsAffected);
???return Result;
??????? }
??[DataObjectMethod(DataObjectMethodType.Update)]
??public int UpdateRow(string 費用ID,string 費用類型,int 戶號,string 金額,int 生成工號,DateTime 生成日期,DateTime 滯納金日期,string 滯納金,int 銷帳工號,DateTime 銷帳日期,string 實收方式,string 供水公司,string 戶名,string 地址,string 表位號,string 表身號,int 口徑,string 收費方式,int 帳戶編號,string 稅號,bool 打印發票,string 標志,string 備注,DateTime 滯納金結算日,string 處理類型,string 處理費用ID,string 處理標志,DateTime 銷帳時間)
??{
???int RowsAffected = 0;
???int Result = 0;
???DbObject dbo = new DbObject();
???SqlParameter[] parameters = new SqlParameter[]
????{
?????new SqlParameter("費用ID",費用ID),
?????new SqlParameter("費用類型",費用類型),
?????new SqlParameter("戶號",戶號),
?????new SqlParameter("金額",金額),
?????new SqlParameter("生成工號",生成工號),
?????new SqlParameter("生成日期",生成日期),
?????new SqlParameter("滯納金日期",滯納金日期),
?????new SqlParameter("滯納金",滯納金),
?????new SqlParameter("銷帳工號",銷帳工號),
?????new SqlParameter("銷帳日期",銷帳日期),
?????new SqlParameter("實收方式",實收方式),
?????new SqlParameter("供水公司",供水公司),
?????new SqlParameter("戶名",戶名),
?????new SqlParameter("地址",地址),
?????new SqlParameter("表位號",表位號),
?????new SqlParameter("表身號",表身號),
?????new SqlParameter("口徑",口徑),
?????new SqlParameter("收費方式",收費方式),
?????new SqlParameter("帳戶編號",帳戶編號),
?????new SqlParameter("稅號",稅號),
?????new SqlParameter("打印發票",打印發票),
?????new SqlParameter("標志",標志),
?????new SqlParameter("備注",備注),
?????new SqlParameter("滯納金結算日",滯納金結算日),
?????new SqlParameter("處理類型",處理類型),
?????new SqlParameter("處理費用ID",處理費用ID),
?????new SqlParameter("處理標志",處理標志),
?????new SqlParameter("銷帳時間",銷帳時間)
????};
???Result = dbo.RunProcedure("sp_費用表2_Update", parameters, out RowsAffected);
???return Result;
??????? }
??[DataObjectMethod(DataObjectMethodType.Delete)]
??public int DeleteRow()
??{
???int RowsAffected = 0;
???int Result = 0;
???DbObject dbo = new DbObject();
???SqlParameter[] parameters = new SqlParameter[]
????{
?
????};
???Result = dbo.RunProcedure("sp_費用表2_DeleteRow", parameters, out RowsAffected);
???return Result;
??????? }
??? }
}
?