// GetModel(int IDModel) public DocModel GetDocModel(int IDDocModel) { Dictionary <string, object> insaddr = new Dictionary <string, object>(); insaddr.Add("IDModel", IDDocModel); DocModel retour = base.GetOneDefault <DocModel>(insaddr); return(retour); }
public DocModel UpdateModel(DocModel model) { try { // la mise à jour directe de model en paramètre crash !!! DocModel docModel = this.GetDocModel(model.IDModel); docModel.Title = model.Title; docModel.IDAccount = model.IDAccount; docModel.IDCampaign = model.IDCampaign; base.SaveBubble(docModel); return(docModel); } catch (Exception ex) { throw new Exception("UpdateModel " + ex.Message, ex); } }
public DocModel CreateModel(Account account, Campaign campaign, string Title) { try { DocModel nouveau = new DocModel(); nouveau.Title = Title; nouveau.IDAccount = account.IDAccount; nouveau.IDCampaign = campaign.IDCampaign; nouveau["IDModel"] = DBNull.Value; // Insert base.InsertBubble(nouveau, false, true); return(nouveau); } catch (Exception ex) { throw new Exception("CreateModel " + ex.Message, ex); } }