public ActionResult AddMatterOrganization() { var matterOrg = new MatterOrganization(); matterOrg.Number = MyMatter.Number; matterOrg.AddOrganization = true; return(View("MatterOrganizations", matterOrg)); }
public ActionResult MatterOrganizations() { var matterOrg = new MatterOrganization(); matterOrg.Number = MyMatter.Number; matterOrg.Organizations = MyMatter.Organizations; matterOrg.AddOrganization = false; return(View("MatterOrganizations", matterOrg)); }
public ActionResult SearchOrganizations(MatterOrganization mo) { var orgs = dbContext.Organizations.Where(o => o.BillingRegion == mo.OrganizationSearchInfo.BillingRegion); if (!string.IsNullOrEmpty(mo.OrganizationSearchInfo.Name)) { orgs = orgs.Where(o => o.Name.ToUpper().Contains(mo.OrganizationSearchInfo.Name.ToUpper())); } if (!string.IsNullOrEmpty(mo.OrganizationSearchInfo.VendorNumber)) { orgs = orgs.Where(o => o.VendorNumber.ToUpper().Contains(mo.OrganizationSearchInfo.VendorNumber.ToUpper())); } var matterOrg = new MatterOrganization(); matterOrg.Number = MyMatter.Number; matterOrg.AddOrganization = true; matterOrg.Organizations = orgs.ToList(); return(View("MatterOrganizations", matterOrg)); }