public async Task <ActionResult> Create([Bind(Include = "MasterID,MasterText,MasterTable,CreatedBy,CreatedDate,ModifiedBy,ModifiedDate,Active")] M_MasterInfo m_MasterInfo) { if (ModelState.IsValid) { db.M_MasterInfo.Add(m_MasterInfo); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(m_MasterInfo)); }
public async Task <ActionResult> Create([Bind(Include = "MasterText,MasterTable")] M_MasterInfo m_MasterInfo) { if (ModelState.IsValid) { m_MasterInfo.CreatedBy = Resources.RamRajyaResources.DefaultLoginUser; m_MasterInfo.ModifiedBy = Resources.RamRajyaResources.DefaultLoginUser; m_MasterInfo.CreatedDate = DateTime.Now; m_MasterInfo.ModifiedDate = DateTime.Now; m_MasterInfo.Active = true; db.M_MasterInfo.Add(m_MasterInfo); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(m_MasterInfo)); }
public async Task <ActionResult> Create([Bind(Include = "Name,ParantName,DOB,Qualification,Occupation,ContactNo,Email,P_Address,Permanent_Address,Interest_Achievement,PurposeOfJoining,OtherNGO_Member,OtherNGOMembersDetails,MembershipCategory,Fax,Website,Organization,Position,OrganizationPhone,OrganizationFax,OrganizationEmail,OrganizationWebsite")] M_MembersMaster m_MembersMaster) { if (ModelState.IsValid) { m_MembersMaster.MemberID = CommonFunctionRR.GenerateMemberCode(); m_MembersMaster.CreatedBy = Resources.RamRajyaResources.DefaultLoginUser; m_MembersMaster.CreatedDate = DateTime.Now; m_MembersMaster.ModifiedBy = Resources.RamRajyaResources.DefaultLoginUser; m_MembersMaster.ModifiedDate = DateTime.Now; m_MembersMaster.Active = true; db.M_MembersMaster.Add(m_MembersMaster); await db.SaveChangesAsync(); TempData["SuccessMessage"] = "Thank you for Apply Membership for CRASMIB Ram Rajya. Your Member ID : " + m_MembersMaster.MemberID + ". Further you will use for More Details. also we will Shortly Connect you. "; return(RedirectToAction("Index", "Home", null)); } ViewBag.Qualification = new SelectList(db.M_MasterInfo, "MasterID", "MasterText", m_MembersMaster.Qualification); ViewBag.MembershipCategory = new SelectList(db.M_MasterInfo, "MasterID", "MasterText", m_MembersMaster.MembershipCategory); return(View(m_MembersMaster)); }