//GET: /SupportingMaterial/Create/OrgID
        public ActionResult Create(int id, string URL, string Description, int AddedBy, string AddedDate, string Type)
        {
            SupportingMaterial newSupport = new SupportingMaterial();

            newSupport.MatURL = URL;
            newSupport.MatDescription = Description;
            newSupport.MatAddDate = DateTime.Now;
            newSupport.MatType = Type;
            newSupport.MatIsActive = 1;
            newSupport.OrgID = id;
            string name = User.Identity.Name;
            var model = supportingMaterialModel.GetId(name);
            newSupport.UserID = model.UserID;

            supportingMaterialModel.Insert(newSupport);

            //ViewBag.Text = "Create successful";
            ViewBag.Alert = "true";
            ViewBag.Message = "Action success!";
            ViewBag.URL = "/Organisation/Amend/" + newSupport.OrgID+"#tabs-5";

            return View("../Shared/Redirect");
            //return View("Close");
        }
 public void Insert(SupportingMaterial subMe)
 {
     dataAccess.SupportingMaterials.InsertOnSubmit(subMe);
     dataAccess.SubmitChanges();
 }
		private void detach_SupportingMaterials(SupportingMaterial entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
 partial void DeleteSupportingMaterial(SupportingMaterial instance);
 partial void UpdateSupportingMaterial(SupportingMaterial instance);
 partial void InsertSupportingMaterial(SupportingMaterial instance);
		private void attach_SupportingMaterials(SupportingMaterial entity)
		{
			this.SendPropertyChanging();
			entity.Organisation = this;
		}