public ActionResult Create(AddrBk_IndustryAffliation addrbk_industryaffliation, Guid organizationId, String orgName, bool isOrganization = true)
        {
            try
            {
                addrbk_industryaffliation.ContactBasis_LCID = Utils.GetLookUpBasisId(isOrganization);
                addrbk_industryaffliation.CreatedDt = addrbk_industryaffliation.LastUpdatedDt = DateTime.Now;
                addrbk_industryaffliation.ActiveRec = true;
                addrbk_industryaffliation.Id = Guid.NewGuid();

                if (isOrganization)
                    addrbk_industryaffliation.OrgID = organizationId;
                else
                    addrbk_industryaffliation.IndivID = organizationId;

                db.AddrBk_IndustryAffliation.Add(addrbk_industryaffliation);
                db.SaveChanges();

                return RedirectToAction("Index", new { organizationId = organizationId, orgName = orgName, isOrganization = isOrganization });
            }
            catch
            {
                ModelState.AddModelError(String.Empty, Utils.errorMsg);
            }

            ViewBag.isOrganization = Convert.ToString(isOrganization);
            ViewBag.orgName = orgName;
            ViewBag.organizationId = organizationId;
            ViewBag.MainTitle = Utils.AddrBkOrganizationIndustryAffliation + " / " + orgName;
            ViewBag.IndustrySector_LCID = new SelectList(db.Lookup_IndustrySector.Where(a => a.ActiveRec == true), "Id", "Title", addrbk_industryaffliation.IndustrySector_LCID);
            return PartialView("_Create", addrbk_industryaffliation);
        }
        //
        // GET: /AddrBkIndustryAffliation/Create
        public ActionResult Create(Guid organizationId, String orgName, bool isOrganization = true)
        {
            ViewBag.isOrganization = Convert.ToString(isOrganization);
            ViewBag.orgName = orgName;
            ViewBag.organizationId = organizationId;
            ViewBag.MainTitle = Utils.AddrBkOrganizationIndustryAffliation + " / " + orgName;
            ViewBag.IndustrySector_LCID = new SelectList(db.Lookup_IndustrySector.Where(a => a.ActiveRec == true), "Id", "Title");

            var addrbk_industryaffliation = new AddrBk_IndustryAffliation();
            addrbk_industryaffliation.EffDt = DateTime.Now;
            return PartialView("_Create", addrbk_industryaffliation);
        }
        public ActionResult Edit(AddrBk_IndustryAffliation addrbk_industryaffliation, Guid organizationId, String orgName, bool isOrganization = true)
        {
            try
            {
                addrbk_industryaffliation.LastUpdatedDt = DateTime.Now;
                db.Entry(addrbk_industryaffliation).State = EntityState.Modified;
                db.SaveChanges();

                return RedirectToAction("Index", new { organizationId = organizationId, orgName = orgName, isOrganization = isOrganization });
            }
            catch (DbUpdateConcurrencyException ex)
            {
                var entry = ex.Entries.Single();
                var databaseValues = (AddrBk_IndustryAffliation)entry.GetDatabaseValues().ToObject();
                ModelState.AddModelError(string.Empty, Utils.concurrencyMsg);
                addrbk_industryaffliation.Concurrency = databaseValues.Concurrency;
            }
            catch
            {
                ModelState.AddModelError(String.Empty, Utils.errorMsg);
            }

            ViewBag.isOrganization = Convert.ToString(isOrganization);
            ViewBag.orgName = orgName;
            ViewBag.organizationId = organizationId;
            ViewBag.MainTitle = Utils.AddrBkOrganizationIndustryAffliation + " / " + orgName + " / " + Utils.GetIndustrySectorFromId(addrbk_industryaffliation.IndustrySector_LCID);
            ViewBag.IndustrySector_LCID = new SelectList(db.Lookup_IndustrySector.Where(a => a.ActiveRec == true), "Id", "Title", addrbk_industryaffliation.IndustrySector_LCID);
            return PartialView("_Edit", addrbk_industryaffliation);
        }