public static bool BALInsertOtherFule(OtherFuelModel model) { try { foreach (var item in model.listFuel) { if (item.FuelQuantity > 0) { FuelOtherSale chitmodel = new FuelOtherSale() { VechileNumber = model.VechileNumber, //ChitNo = model.ChitNo, Comment = model.Comment, OtherFule = "", OtherPrice = 00, FuelStationID = model.FuelStationID, InsertedBy = model.InsertedBy, // DieselBookno = model.DieselBookno, Fueltype = item.Fueltype, FuelQuantity = item.FuelQuantity, Price = item.Price }; DataRepository.FuelRepository.InsertOtherFule(chitmodel); } } } catch (Exception) { return(false); } return(true); }
public ActionResult SaveOtherFuelDetails(OtherFuelModel model) { var user = ((UserValidation.CustomPrincipal)(HttpContext.Request.RequestContext.HttpContext.User)).User; model.InsertedBy = user.LoginEmpID; var data = BusinessAccessLayer.BALFuel.BALInsertOtherFule(model); return(Json(data, JsonRequestBehavior.AllowGet)); }