Skip to main content

storeprocedure

ALTER PROCEDURE USP_IDFU_Customers
(@CustomerId int = null,
@Name varchar(30) = null,
@PhoneNo varchar(50)=null,
@EmailId Varchar(30)=null,
@Address varchar(50)=null,
@City varchar(30)=null,
@state varchar(30)=null,
@Pincode varchar(30)=null,
@IsActive bit = null,
@Type char(1)
)
as
if(@Type = 'I')
begin
insert into Customer(Name,PhoneNo,EmailId,Address,City,State,PinCode,IsActive)values(@Name,@PhoneNo,@EmailId,@Address,@City,@State,@PinCode,@IsActive)
end
if(@Type = 'D')
begin
Delete from Customer where CustomerId=@CustomerId
end
if(@Type = 'F')
begin
select * from Customer
end
if(@Type = 'U')
begin
update Customer set Name=@Name,PhoneNo=@PhoneNo,EmailId=@EmailId,Address=@Address,City=@City,State=@State,PinCode=@PinCode,IsActive=@IsActive where CustomerId=@CustomerId
end

Comments

Popular posts from this blog

Drawing Line Charts In asp.net

LineChart.cs import the following namespaces using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Collections; public class LineChart { public Bitmap Bitmapb; public string strTitle = "Default Title"; public ArrayList ArrayListchartValues = new ArrayList(); public float ftXorigin = 0, ftYorigin = 0; public float ftScaleX, ftScaleY; public float ftXdivs = 2, ftYdivs = 2; private int intWidth, intHeight; private Graphics Graphicsg; private Page Pagep; struct datapoint { public float ftx; public float fty; public bool bolvalid; } //initialize public LineChart(int intmyWidth, int intmyHeight, Page myPage) { intWidth = intmyWidth; intHeight = intmyHeight; ftScaleX = intmyWidth; ftScaleY = intmyHeight; Bitmapb = new Bitmap(intmyWidth, intmyHeight); Graphicsg = Graphics.FromImage(Bitmapb); Pagep = myPage; } pu...