public async Task <IActionResult> Create([Bind("Id,IdCode,FullName,PhoneNumber,Address,Gender,Status")] CustomerEntities customerEntities) { if (ModelState.IsValid) { _context.Add(customerEntities); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(customerEntities)); }
public async Task <IActionResult> Create([Bind("Id,Password")] Bos bos) { if (ModelState.IsValid) { _context.Add(bos); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(bos)); }
public async Task <IActionResult> Create([Bind("IdPesanan,NamaCustomer,Tipe,BeratTotal,HrgSatuan,HrgTotal,TglPesanan")] Pesanan pesanan) { if (ModelState.IsValid) { _context.Add(pesanan); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(pesanan)); }
public async Task <IActionResult> Create([Bind("Id,IdCode,CustomerId,LaundryTypeId,AmountUnit,OrderType,Description,TotalPayment,Status")] OrderEntities orderEntities) { if (ModelState.IsValid) { _context.Add(orderEntities); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(orderEntities)); }
public async Task <IActionResult> Create([Bind("IdKaryawan,IdPesanan")] DetailPelayanan detailPelayanan) { if (ModelState.IsValid) { _context.Add(detailPelayanan); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(detailPelayanan)); }
public async Task <IActionResult> Create([Bind("IdKaryawan,NamaKaryawan,JnsKelamin,Alamat")] Karyawan karyawan) { if (ModelState.IsValid) { _context.Add(karyawan); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(karyawan)); }
public async Task <IActionResult> Create([Bind("ID,Name")] DeliveryEntities deliveryEntities) { if (ModelState.IsValid) { _context.Add(deliveryEntities); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(deliveryEntities)); }
public async Task <IActionResult> Create([Bind("ID,IdCode,LaundryName,Price,Init,Status")] LaudryTypeEnitites laudryTypeEnitites) { if (ModelState.IsValid) { _context.Add(laudryTypeEnitites); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(laudryTypeEnitites)); }
public async Task <IActionResult> Create([Bind("ID,IdCode,DateCreate,TotalExpenses,Status")] BillEntities billEntities) { if (ModelState.IsValid) { _context.Add(billEntities); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(billEntities)); }
public async Task <bool> AddBookingSession(AddBookingSessionModel addBookingSession) { var bookingSession = _mapper.Map <BookingSession>(addBookingSession); await _laundryContext.BookingSessions.AddAsync(bookingSession); var success = await _laundryContext.SaveChangesAsync(); return(success > 0); }
public async Task <ApiResultCode> Complete() { try { await _context.SaveChangesAsync(); return(new ApiResultCode(ApiResultType.Success, 1, "Save successfully")); } catch (Exception ex) { ErrorTrace.Logger(LogArea.ApplicationTier, ex); return(new ApiResultCode(ApiResultType.ExceptionDuringOpration, 3, "Exception during saveing")); } }