public ActionResult PostDoctorData(DoctorViewModel model)
        {
            int mid = Convert.ToInt32(Session["MemberId"]);

            using (ProjectEntities db = new ProjectEntities())
            {
                var getdata = db.Doctors.FirstOrDefault(a => a.MemberId == mid);
                if (getdata == null)
                {
                    // insert
                    db.InsertDoctor(model.FirstName, model.LastName, model.TotalExperience,
                                    model.SpecializedId, model.Gender, mid);

                    ViewBag.Message = "Inserted";
                }
                else
                {
                    // update
                    db.UpdateDoctor(mid, model.FirstName, model.LastName, model.TotalExperience,
                                    model.SpecializedId, model.Gender);
                    ViewBag.Message = "Updated";
                }
            }

            List <SelectListItem> lst = new List <SelectListItem>();

            using (ProjectEntities db = new ProjectEntities())
            {
                var getdata = db.SpecializedDatas.ToList();
                foreach (var item in getdata)
                {
                    lst.Add(new SelectListItem
                    {
                        Value = item.SpecializedId.ToString(),
                        Text  = item.SpecializedName
                    });
                }
            }

            DoctorViewModel model1 = new DoctorViewModel();

            model1.lstSpecialization = lst;
            return(View("EditProfile", model1));
        }