public virtual ActionResult AddBusinessType(BusinessTypeEditModel owner)
 {
     if (ModelState.IsValid)
     {
         var newtype = new BussinessType();
         UpdateModel(newtype);
         Repository.Add(newtype);
         Repository.Save();
         return RedirectToAction(MVC.AppSetting.BusinessTypeList());
     }
     return View(owner);
 }
        private void FixupBussinessType(BussinessType previousValue)
        {
            if (previousValue != null && previousValue.PartnerCompanies.Contains(this))
            {
                previousValue.PartnerCompanies.Remove(this);
            }

            if (BussinessType != null)
            {
                if (!BussinessType.PartnerCompanies.Contains(this))
                {
                    BussinessType.PartnerCompanies.Add(this);
                }
                if (BusinessType != BussinessType.TypeId)
                {
                    BusinessType = BussinessType.TypeId;
                }
            }
            else if (!_settingFK)
            {
                BusinessType = null;
            }
        }