Click here to Skip to main content
15,920,217 members
Home / Discussions / C#
   

C#

 
GeneralRe: Color of tab control. Pin
Martin#27-Feb-07 2:41
Martin#27-Feb-07 2:41 
QuestionCalling a Method in C# Pin
sivainfo27-Feb-07 1:06
sivainfo27-Feb-07 1:06 
AnswerRe: Calling a Method in C# Pin
Seishin#27-Feb-07 2:00
Seishin#27-Feb-07 2:00 
GeneralRe: Calling a Method in C# Pin
sivainfo27-Feb-07 17:32
sivainfo27-Feb-07 17:32 
GeneralRe: Calling a Method in C# Pin
Matglas27-Feb-07 21:26
Matglas27-Feb-07 21:26 
QuestionRunning SQL Files Pin
N a v a n e e t h27-Feb-07 0:58
N a v a n e e t h27-Feb-07 0:58 
AnswerRe: Running SQL Files Pin
andre_swnpl27-Feb-07 1:30
andre_swnpl27-Feb-07 1:30 
GeneralRe: Running SQL Files Pin
N a v a n e e t h27-Feb-07 2:15
N a v a n e e t h27-Feb-07 2:15 
I mean i am going to run this query in command object

CREATE PROCEDURE dbo.sp_getDefaultPendingInvoiceToSend_new

(
@company_code varchar(30)

)
AS

if EXISTS (select * from INFORMATION_SCHEMA.tables where table_name = 'orderstemp')
drop table orderstemp


Declare @qry varchar(1500)

Set @qry='select distinct top 50 o.order_no into orderstemp from order_main o, PO_Main p, PO_Receipt_Main r where o.company_code='+''''+@company_code+''''+' and '

set @qry=@qry+'invoice_status !='+''''+'Complete'+''''+' and p.po_Code=r.PO_Code and p.order_no=o.order_no and 1=1 order by o.order_no desc'
print @qry
Exec(@qry)

DECLARE orderno_cursor CURSOR
FOR
select order_no from orderstemp
OPEN orderno_cursor
DECLARE @OrderQty int
DECLARE @ShippedQty int
DECLARE @OrderNo int
if EXISTS (select * from INFORMATION_SCHEMA.tables where table_name = 'TempOrderNo')
drop table TempOrderNo
CREATE TABLE TempOrderNo(order_no int,order_date varchar(20),Login_id varchar(100),order_net_value varchar(20))

FETCH NEXT FROM orderno_cursor INTO @OrderNo
WHILE (@@FETCH_STATUS <> -1)
BEGIN
print 'fetch status = ' + convert(varchar, @@FETCH_STATUS)
IF (@@FETCH_STATUS <> -2)
BEGIN
select @OrderQty= sum(item_qty) from order_detail where order_no=@OrderNo and company_code=@company_code

select @ShippedQty=sum(prd.Qty_shipped) from PO_Receipt_Detail prd, PO_Receipt_Main prm,PO_Main pm, order_main om
where om.order_no=@OrderNo and pm.order_no=om.order_no and om.company_code=@company_code and
pm.PO_Code=prm.PO_Code and prd.POR_Code=prm.POR_Code and om.invoice_status!='Complete' and pm.company_code=@company_code
print 'shipped qty is' + convert(varchar, @ShippedQty)
print 'order qty is' + convert(varchar, @OrderQty)
IF(@OrderQty=@ShippedQty)
insert into TempOrderNo select order_no,convert(varchar(20),order_date,110) as order_date,Login_id,
convert(varchar(20),net_order_value) as order_net_value
from order_main where order_no=@OrderNo and company_code=@company_code

END
FETCH NEXT FROM orderno_cursor INTO @OrderNo
END
CLOSE orderno_cursor
DEALLOCATE orderno_cursor
select top 10 * from TempOrderNo
drop table TempOrderNo
GO

Cheers
Navaneeth!!

www.w3hearts.com

GeneralRe: Running SQL Files Pin
sam#27-Feb-07 2:55
sam#27-Feb-07 2:55 
GeneralRe: Running SQL Files Pin
N a v a n e e t h27-Feb-07 2:58
N a v a n e e t h27-Feb-07 2:58 
QuestionLinkButton click event in custom web control Pin
Matglas27-Feb-07 0:29
Matglas27-Feb-07 0:29 
AnswerRe: LinkButton click event in custom web control Pin
Stefan Troschuetz27-Feb-07 0:33
Stefan Troschuetz27-Feb-07 0:33 
GeneralRe: LinkButton click event in custom web control Pin
Matglas27-Feb-07 1:34
Matglas27-Feb-07 1:34 
GeneralRe: LinkButton click event in custom web control Pin
Stefan Troschuetz27-Feb-07 3:01
Stefan Troschuetz27-Feb-07 3:01 
GeneralRe: LinkButton click event in custom web control Pin
Tuwing.Sabado27-Feb-07 15:26
Tuwing.Sabado27-Feb-07 15:26 
GeneralRe: LinkButton click event in custom web control Pin
Matglas27-Feb-07 21:25
Matglas27-Feb-07 21:25 
Questiontreeview Pin
dtarunnayudu27-Feb-07 0:26
dtarunnayudu27-Feb-07 0:26 
AnswerRe: treeview Pin
alex.almeida27-Feb-07 2:16
alex.almeida27-Feb-07 2:16 
GeneralRe: treeview Pin
vasava18-Jan-09 23:08
vasava18-Jan-09 23:08 
Questioncapture a sound from my sound card and save it as Byte[] Pin
marwan_siala26-Feb-07 23:52
marwan_siala26-Feb-07 23:52 
QuestionFind Form, Find Button, And press It Pin
Jefis26-Feb-07 23:47
Jefis26-Feb-07 23:47 
AnswerRe: Find Form, Find Button, And press It Pin
Martin#26-Feb-07 23:56
Martin#26-Feb-07 23:56 
GeneralRe: Find Form, Find Button, And press It Pin
Jefis26-Feb-07 23:58
Jefis26-Feb-07 23:58 
GeneralRe: Find Form, Find Button, And press It Pin
Martin#27-Feb-07 0:08
Martin#27-Feb-07 0:08 
GeneralRe: Find Form, Find Button, And press It Pin
Jefis27-Feb-07 0:23
Jefis27-Feb-07 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.