void IAddModifyViewForm.Add(IDTO pNewCampaign) { this.txtTitle.Text = String.Empty; this.txtDescription.Text = String.Empty; this.Text = "Agregar nueva Campaña"; this.iOriginalCampaign = (CampaignDTO)pNewCampaign; }
void IAddModifyViewForm.Modify(IDTO pCampaign) { if (pCampaign == null) { throw new EntidadNulaException("La campaña indicada es nula"); //TODO excepcion argumentexception creo } else { this.iOriginalCampaign = (CampaignDTO)pCampaign; this.txtTitle.Text = iOriginalCampaign.Name; this.txtDescription.Text = iOriginalCampaign.Description; this.Text = "Modificar Campaña"; } }
private void btnAdd_Click(object sender, EventArgs e) { try { CampaignDTO campaign = new CampaignDTO(); AgregarModificarCampaña ventana = new AgregarModificarCampaña(); this.dgvCampaign.Add(ventana, campaign); iController.AddCampaign(campaign); this.CargarDataGrid(); } catch (Exception) { throw; } }
public CampaignDTO GetCampaign(int pId) { CampaignDTO lResult = new CampaignDTO(); return lResult; }
//TODO: update public void DeleteCampaign(CampaignDTO pDto) { }
public void ModifyCampaign(CampaignDTO pDto) { }
public void AddCampaign(CampaignDTO pDto) { }
internal void DeleteCampaign(CampaignDTO campaign) { throw new NotImplementedException(); }