Exemplo n.º 1
0
 public Recipient(RecipientDB rec)
 {
     if (rec != null)
     {
         this.Id        = rec.Id;
         this.FullName  = rec.FullName;
         this.CellPhone = rec.CellPhone;
     }
 }
Exemplo n.º 2
0
        public RecipientDB MapToRecipientDB()
        {
            RecipientDB recDb = new RecipientDB();

            recDb.Id        = this.Id;
            recDb.FullName  = this.FullName;
            recDb.CellPhone = this.CellPhone;

            return(recDb);
        }
Exemplo n.º 3
0
        public JsonResult AddRecipient(Recipient toAdd)
        {
            RecipientDB addedRec = this.recRep.InsertRecipient(toAdd.MapToRecipientDB());

            return(Json(addedRec, JsonRequestBehavior.AllowGet));
        }