I am creating a one list in which i am adding list of another item but it is giving me error Incompatible element type List for collection of Offer__c at line 25 column 10 I am Sharing my code with you.
public String sSliderField { get; set; }
public String s { get; set; }
public Opportunity objOpportunity {get;set;}
// public List<Opportunity > opp{get;set;}
public List<Offer__c> lstoffer{get;set;}
public Offer__c off{get;set;}
public PricingOptionCalculatorCtrl(ApexPages.StandardController controller) {
String oid = controller.getRecord().id;
lstoffer=new List<Offer__c>();
objOpportunity =new Opportunity();
// opp=new List<Opportunity>([select id,name,(select id,name,Opportunity__c,X15_of_Gross__c,Additional_Material_Needed__c,Avg_Monthly_Gross__c,AVG_Monthly_VMC__c,Cash_Wanted__c,Offer_Type__c,Reduced_UW_V_MC__c,WH_Withhold__c from Offers__r)from Opportunity where id=:oid ]);
objOpportunity =[select id,name,Term__c,Monthly_Gross_Sales__c,Adjusted_Monthly_Gross_Sale__c,Hybrid_Holdback__c,Gross__c,Hybrid_Amount_Payment__c,Adjusted_Monthly_CC_Sale__c,Holdback__c,Credit_Card_Processing_Volume_LM__c,Deal_Length__c,Max_Monthly_Payment__c,Daily_Payment__c,Factor__c,Factor_Rate__c,Funding_Amount__c,Payback_Amount__c,Program_Type__c,ForecastCategoryName,Gross_Annual_Sales__c,Max_Deal_Size__c,Amount_Requested__c from Opportunity where id =:oid];
List<Offer__c> lstTemp = new List<Offer__c>();
lstTemp=[select id,name,Opportunity__c,X15_of_Gross__c,Additional_Material_Needed__c,Avg_Monthly_Gross__c,AVG_Monthly_VMC__c,Cash_Wanted__c,Offer_Type__c,Reduced_UW_V_MC__c,WH_Withhold__c from Offer__c where Opportunity__c=:oid];
if(lstTemp!=null && lstTemp.size>0)
{
lstoffer.add(lsttemp);
}
system.debug('---Slider Range-'+s );
}
public void save(){
//update d;
}
public Pagereference addoffer()
{
off=new Offer__c();
lstoffer.add(off);
return null;
}
}