ClarkeDBDataContext context = new ClarkeDBDataContext();
Item_SubContractor updateItemSubContractor = new Item_SubContractor();
updateItemSubContractor.Item_id = tempBoqId;
updateItemSubContractor.SubContract_id = subContractorId;
//code to access rows and columns in spreadsheet
Item_SubContractor Item_SC = (from Isc in db.Item_SubContractors
where Isc.SubContract_id == subContractorId
&& Isc.Item_id == tempBoqId
select Isc).ToList().FirstOrDefault();
editPriceForSubcontractors = Convert.ToDecimal(r.ItemArray[4]);
if (!(Item_SC.Price_Per_Unit == editPriceForSubcontractors))
{
Item_SC.Price_Per_Unit = editPriceForSubcontractors;
}
}
//then at the bottom try and update changes I was using insert on submit but I think I have to use get?? Not sure, any ideas?context.BOQ_SubContractors.Insertonsubmit(newBoqSubContractor); context.SubmitChanges(); UpdatePage();

New Topic/Question
Reply


MultiQuote


|