Beispiel #1
0
        public IHttpActionResult PutArtistMaster(long id, ArtistMaster artistMaster)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != artistMaster.artist_info_id)
            {
                return(BadRequest());
            }

            db.InsertOrUpdate(artistMaster);

            try
            {
                db.Save();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ArtistMasterExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult PutArtistMaster(long id, ArtistMaster artistMaster)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != artistMaster.artist_info_id)
            {
                return BadRequest();
            }

            db.InsertOrUpdate(artistMaster);

            try
            {
                db.Save();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ArtistMasterExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
Beispiel #3
0
        public ActionResult DeleteConfirmed(long id)
        {
            ArtistMaster artistMaster = db.ArtistMasters.Find(id);

            db.ArtistMasters.Remove(artistMaster);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #4
0
 public ActionResult Edit([Bind(Include = "artist_info_id,frst_nm,mid_nm,last_nm,nick_nm,addr_ln_1_txt,addr_ln_2_txt,addr_city_nm,addr_state,addr_zip_cde,addr_ctry_nm,day_ph_nbr,evng_ph_nbr,cellph_nbr,pager_nbr,othr_ph_nbr,day_fax_nbr,evng_fax_nbr,login_id_txt,email_addr_txt,alt_email_addr_txt,rec_crt_ts,rec_crt_by,rec_upd_by,rec_upd_ts")] ArtistMaster artistMaster)
 {
     if (ModelState.IsValid)
     {
         db.Entry(artistMaster).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(artistMaster));
 }
Beispiel #5
0
        public IHttpActionResult GetArtistMaster(long id)
        {
            ArtistMaster artistMaster = db.Find(id);

            if (artistMaster == null)
            {
                return(NotFound());
            }

            return(Ok(artistMaster));
        }
Beispiel #6
0
        public IHttpActionResult PostArtistMaster(ArtistMaster artistMaster)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.InsertOrUpdate(artistMaster);
            db.Save();

            return(CreatedAtRoute("DefaultApi", new { id = artistMaster.artist_info_id }, artistMaster));
        }
        public IHttpActionResult PostArtistMaster(ArtistMaster artistMaster)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.InsertOrUpdate(artistMaster);
            db.Save();

            return CreatedAtRoute("DefaultApi", new { id = artistMaster.artist_info_id }, artistMaster);
        }
 public void InsertOrUpdate(ArtistMaster artistmaster)
 {
     if (artistmaster.artist_info_id == default(long))
     {
         // New entity
         context.ArtistMasters.Add(artistmaster);
     }
     else
     {
         // Existing entity
         context.Entry(artistmaster).State = System.Data.Entity.EntityState.Modified;
     }
 }
Beispiel #9
0
        public IHttpActionResult DeleteArtistMaster(long id)
        {
            ArtistMaster artistMaster = db.Find(id);

            if (artistMaster == null)
            {
                return(NotFound());
            }

            db.Delete(id);
            db.Save();

            return(Ok(artistMaster));
        }
Beispiel #10
0
        // GET: Dj/Details/5
        public ActionResult Details(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ArtistMaster artistMaster = db.ArtistMasters.Find(id);

            if (artistMaster == null)
            {
                return(HttpNotFound());
            }
            return(View(artistMaster));
        }
Beispiel #11
0
        public async Task <ActionResult> Book([Bind(Include = "artist_info_id,frst_nm,mid_nm,last_nm,nick_nm,addr_ln_1_txt,addr_ln_2_txt,addr_city_nm,addr_state,addr_zip_cde,addr_ctry_nm,day_ph_nbr,evng_ph_nbr,cellph_nbr,pager_nbr,othr_ph_nbr,day_fax_nbr,evng_fax_nbr,login_id_txt,email_addr_txt,alt_email_addr_txt,rec_crt_ts,rec_crt_by,rec_upd_by,rec_upd_ts")] ArtistMaster artistMaster)
        {
            if (ModelState.IsValid)
            {
                await UserManager.SendEmailAsync(
                    //artist.email_addr_txt,
                    "1f1e69a2-bfe2-4bac-ae3d-ae07bbb77aba",
                    "<br>Here is the Booking email for your Band</br>",
                    "Please contact them at 425-829-0230");

                return(RedirectToAction("Index"));
            }
            return(View(artistMaster));
        }
Beispiel #12
0
        public async Task <ActionResult> Book(long?id)
        {
            ArtistMaster artistMaster = db.ArtistMasters.Find(id);

            //string htmlbody = @"<html><head><title></title></head><body><h2>Hereyougo</h2><p>Please contact the band group directly at</p><ul><li>Name:" + artistMaster.frst_nm + "</li><li>Mobile#:" + @artistMaster.day_ph_nbr.ToString() + "</li></ul><p>Haveaniceday!</p><p>-mRingoTeam</p></body></html>";
            //htmlbody=System.Net.WebUtility.HtmlEncode(htmlbody);
            await UserManager.SendEmailAsync(
                //artist.email_addr_txt,
                "1f1e69a2-bfe2-4bac-ae3d-ae07bbb77aba",
                "Here is the Booking email for your Band",
                "Name: " + artistMaster.frst_nm + "  Mobile#:" + @artistMaster.day_ph_nbr.ToString() + "  Haveaniceday!        -mRingoTeam");

            return(RedirectToAction("Success"));
        }