public async Task <IActionResult> Create([Bind("TruckId,TruckNumber,OwnerName,ChasisNo,EngineNo,DateofRegistration,InsuranceExpiryDate,LastServiceDate,IsHired")] Truck truck) { if (ModelState.IsValid) { _context.Add(truck); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(truck)); }
public async Task <IActionResult> Create([Bind("StaffId,StaffName,DateofBirth,JoiningDate,MonthlySalary,IsWorking,LeavingDate")] Staff staff) { if (ModelState.IsValid) { _context.Add(staff); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(staff)); }
public async Task <IActionResult> Create([Bind("BasicExpenseId,OnDate,Particular,PaidBy,PaidTo,Amount,Remarks")] BasicExpense basicExpense) { if (ModelState.IsValid) { _context.Add(basicExpense); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(basicExpense)); }
public async Task <IActionResult> Create([Bind("BolderId,OnDate,VendorName,Qty,Rate,Payment,PaymentDate,Remarks,TruckNo,IsOwnTruck")] Bolder bolder) { if (ModelState.IsValid) { _context.Add(bolder); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(bolder)); }
public async Task <IActionResult> Create([Bind("ChipSalesId,OnDate,PartyName,TruckNumber,PartyMobileNo,DriverName,DriverMobileNo,Size,Quantity,Rate,Amount,PaidAmount,ClearDate,Remarks,BillMaker,SlipNo")] ChipSales chipSales) { if (ModelState.IsValid) { _context.Add(chipSales); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(chipSales)); }
public async Task <IActionResult> Create([Bind("DailyLaborId,Name,OnDate,IsPresent,IsDailyBillable,Amount,ExtraAmount,Remarks")] DailyLabor dailyLabor) { if (ModelState.IsValid) { _context.Add(dailyLabor); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(dailyLabor)); }
public async Task <IActionResult> Create([Bind("FuelConsumtionId,Qty,OnDate,AreaOfUse,Remark")] FuelConsumtion fuelConsumtion) { if (ModelState.IsValid) { _context.Add(fuelConsumtion); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(fuelConsumtion)); }
public async Task <IActionResult> Create([Bind("FuelId,OnDate,PartyName,Qty,Amount,PaymentDate,Remarks,IsOnVechile")] Fuel fuel) { if (ModelState.IsValid) { _context.Add(fuel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(fuel)); }
public async Task <IActionResult> Create([Bind("StaffSalaryId,OnDate,StaffId,PaidAmount,CalcualteAmount,Remarks")] StaffSalary staffSalary) { if (ModelState.IsValid) { _context.Add(staffSalary); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["StaffId"] = new SelectList(_context.Staff, "StaffId", "StaffId", staffSalary.StaffId); return(View(staffSalary)); }
public async Task <IActionResult> Create([Bind("HiredTruckId,TruckId,HiredFrom,Rate,HiredDate,SurrenderDate")] HiredTruck hiredTruck) { if (ModelState.IsValid) { _context.Add(hiredTruck); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["TruckId"] = new SelectList(_context.Truck, "TruckId", "TruckId", hiredTruck.TruckId); return(View(hiredTruck)); }