Esempio n. 1
0
 public bool AddToWishlist(string studentEmail, int flatId, int score)
 {
     MdlApplication mdlApplicationObj = GetApplicationObj(studentEmail, flatId, score);
     DbApplications dbApplicationsObj = new DbApplications();
     CtrApplications ctrApplicationObj = new CtrApplications();
     //Get current Application table for specific flat
     DataSet ds = dbApplicationsObj.GetApplicationsDataSet(mdlApplicationObj.StudentEmail, mdlApplicationObj.FlatId);
     if (ds.Tables.Count == 0)
         return false;
     //Update dataset - add current application and order queue
     ds = ctrApplicationObj.UpdateDataSet(ds, mdlApplicationObj);
     //update dataset
     return dbApplicationsObj.UpdateApplications(ds, mdlApplicationObj);
     //return false;
 }