public ActionResult GetOfferFromPhotographer(MemberRequests req,int pid,int ddlGenre,int ddlCity,string tarih,bool cbAllday,bool cbAlbum,bool cbVideo,bool cbOutdoor,bool cbDvd,bool cbEdition)
        {
            Members member = MemberBml.GetMembersList().OrderByDescending(v => v.MemberId).Take(1).FirstOrDefault();

            req.MemberId = member.MemberId;
            req.Allday = cbAllday;
            req.Album = cbAlbum;
            req.Video = cbVideo;
            req.Outdoor = cbOutdoor;
            req.Dvd = cbDvd;
            req.Edition = cbEdition;
            if (!String.IsNullOrEmpty(tarih))
                req.ActivityTime = Convert.ToDateTime(tarih);
            else
                req.ActivityTime = DateTime.Now;
            req.PhotographerId = pid;
            req.GenreId = ddlGenre;
            req.CityId = ddlCity;
            req.CreateTime = DateTime.Now;
            req.DistrictId = DistrictBml.GetDistrictsList(ddlCity).Take(1).FirstOrDefault().DistrictId;
            req.MaxOfferCount = 10;
            req.ShowGsm = false;
            req.Status = 0;
            bool result = MemberRequestBml.Insert(req);
            if (result)
                return RedirectToAction("PhotographerDetails", new { pid = pid });
            else
                return RedirectToAction("GetOfferFromPhotographer", new { pid = pid });
        }
 public static bool Update(MemberRequests mr)
 {
     try
     {
         db.Entry(mr).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return true;
     }
     catch (Exception ex)
     {
         return false;
         throw;
     }
 }
 public static bool Insert(MemberRequests mr)
 {
     try
     {
         mr.Status = 0;
         mr.CreateTime = DateTime.Now;
         db.MemberRequests.Add(mr);
         db.SaveChanges();
         return true;
     }
     catch (Exception ex)
     {
         return false;
         throw;
     }
 }