public Customer()
 {
     Orders = new List<Order>();
     Comments = new List<Comment>();
     PersonalInfo = new PersonalInfo();
     Contacts = new ContactInfo();
 }
Exemple #2
0
        public void SaveContactInfo(ContactInfo ContactInfo)
        {
            if (ContactInfo.Id == 0)
            {

                _RContactInfo.Add(ContactInfo);
            }
            else
            {
                _uow.Entry(ContactInfo).State = EntityState.Modified;
            }
            _uow.SaveChanges();
        }
Exemple #3
0
 public ActionResult ContactInfo(ContactInfo ContactInfo, string ckEditor)
 {
     if (IsValidSessions())
     {
         int LanguageId = Convert.ToInt32(Session["Language"]);
         var EditContactInfo = _RContactInfo.ContactInfos.FirstOrDefault(x => x.LanguageId == LanguageId);
         EditContactInfo.Address = ContactInfo.Address;
         EditContactInfo.Map = ContactInfo.Map;
         EditContactInfo.FormTopText = ckEditor;
         EditContactInfo.Tell = ContactInfo.Tell;
         EditContactInfo.Fax = ContactInfo.Fax;
         EditContactInfo.Email = ContactInfo.Email;
         _RContactInfo.SaveContactInfo(EditContactInfo);
         TempData["result"] = "OK";
         TempData["Message"] = "عملیات با موفقیت انجام شد .";
         return RedirectToAction("SuccWrittenBy");
     }
     else
         return RedirectToAction("Login", "Home");
 }
Exemple #4
0
 public void DeleteContactInfo(ContactInfo ContactInfo)
 {
     _RContactInfo.Remove(ContactInfo);
     _uow.SaveChanges();
 }