コード例 #1
0
        public async Task <IActionResult> Edit(string id, [Bind("HandyMan_ID,VendorID,HandyMan_FirstName,HandyMan_LastName,PrimaryContactNo,SecondaryContactNo,Address,Gender,DOJ,DOR,Experties,Prvs_Org,Govt_ID_Proof,DocsSubmitted,Rating,Remarks,Photograph")] Vendors_HandyMan_Details vendors_HandyMan_Details)
        {
            if (id != vendors_HandyMan_Details.HandyMan_ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(vendors_HandyMan_Details);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Vendors_HandyMan_DetailsExists(vendors_HandyMan_Details.HandyMan_ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            return(View(vendors_HandyMan_Details));
        }
コード例 #2
0
        public async Task <IActionResult> Create([Bind("HandyMan_ID,VendorID,HandyMan_FirstName,HandyMan_LastName,PrimaryContactNo,SecondaryContactNo,Address,Gender,DOJ,DOR,Experties,Prvs_Org,Govt_ID_Proof,DocsSubmitted,Rating,Remarks,Photograph")] Vendors_HandyMan_Details vendors_HandyMan_Details)
        {
            if (ModelState.IsValid)
            {
                _context.Add(vendors_HandyMan_Details);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(vendors_HandyMan_Details));
        }