void clicked()
{
Usmf_CustomerTable _CustomerTable;
Usmf_CustDetails _Usmf_CustDetails;
date date1,date2;
str cust;
super();
delete_from Usmf_CustDetails;
date1 = Fromdate.dateValue();
date2 = Todate.dateValue();
cust = custGroup.valueStr();
if(date1 != dateNull() && date2 != dateNull() && cust !="")
{
insert_recordset Usmf_CustDetails(UsmfID,TransDate,CustomerGroup,CustName)
select UsmfID,TransDate,CustomerGroup,CustName from _CustomerTable
where _CustomerTable.TransDate >= date1
&& _CustomerTable.TransDate <= date2
&& _CustomerTable.CustomerGroup == custGroup.valueStr();
}
else if(date1 != dateNull() && date2 != dateNull())
{
insert_recordset Usmf_CustDetails (UsmfID,TransDate,CustomerGroup,CustName)
select UsmfID,TransDate,CustomerGroup,CustName from _CustomerTable
where _CustomerTable.TransDate >= date1
&& _CustomerTable.TransDate <= date2 ;
}
else if(date1 == dateNull() && date2 == dateNull() && cust != " ")
{
insert_recordset Usmf_CustDetails (UsmfID,TransDate,CustomerGroup,CustName)
select UsmfID,TransDate,CustomerGroup,CustName from _CustomerTable
where _CustomerTable.CustomerGroup == custGroup.valueStr();
}
Usmf_CustDetails_ds.research();
}
//Second Example
//insert record set....
insert_recordset Usmf_CustDetails (UsmfID,TransDate,CustomerGroup,CustName)
select UsmfID,TransDate,CustomerGroup,CustName
from _CustomerTable
where _CustomerTable.CustomerGroup == custGroup.valueStr();
//insert record set.....
{
Usmf_CustomerTable _CustomerTable;
Usmf_CustDetails _Usmf_CustDetails;
date date1,date2;
str cust;
super();
delete_from Usmf_CustDetails;
date1 = Fromdate.dateValue();
date2 = Todate.dateValue();
cust = custGroup.valueStr();
if(date1 != dateNull() && date2 != dateNull() && cust !="")
{
insert_recordset Usmf_CustDetails(UsmfID,TransDate,CustomerGroup,CustName)
select UsmfID,TransDate,CustomerGroup,CustName from _CustomerTable
where _CustomerTable.TransDate >= date1
&& _CustomerTable.TransDate <= date2
&& _CustomerTable.CustomerGroup == custGroup.valueStr();
}
else if(date1 != dateNull() && date2 != dateNull())
{
insert_recordset Usmf_CustDetails (UsmfID,TransDate,CustomerGroup,CustName)
select UsmfID,TransDate,CustomerGroup,CustName from _CustomerTable
where _CustomerTable.TransDate >= date1
&& _CustomerTable.TransDate <= date2 ;
}
else if(date1 == dateNull() && date2 == dateNull() && cust != " ")
{
insert_recordset Usmf_CustDetails (UsmfID,TransDate,CustomerGroup,CustName)
select UsmfID,TransDate,CustomerGroup,CustName from _CustomerTable
where _CustomerTable.CustomerGroup == custGroup.valueStr();
}
Usmf_CustDetails_ds.research();
}
//Second Example
//insert record set....
insert_recordset Usmf_CustDetails (UsmfID,TransDate,CustomerGroup,CustName)
select UsmfID,TransDate,CustomerGroup,CustName
from _CustomerTable
where _CustomerTable.CustomerGroup == custGroup.valueStr();
//insert record set.....
No comments:
Post a Comment