public ActionResult Edit(Tenan tenan) { try { TenanEditedMessage msg = new TenanEditedMessage() { TenanId = tenan.TenanId, TenanName = tenan.TenanName, Alamat = tenan.Alamat, LocationId = tenan.LocationId, Nppkp = tenan.Nppkp, Npwp = tenan.Npwp, TerminalId = tenan.TerminalId, SubTerminalId = tenan.SubTerminalId, TanggalBergabung = tenan.TanggalBergabung, Tarif = tenan.Tarif, CategoryId = tenan.CategoryId, TenanTypeId = tenan.TenanTypeId, ProductTypeId = tenan.ProductTypeId, Gate = tenan.Gate, Target = tenan.Target, CcyCode = tenan.CcyCode, FormulaKonsesi = tenan.FormulaKonsesi.ToLower() }; new RabbitHelper().SendTenanEditedMessage(msg); return View("update"); } catch (Exception) { throw; } }
private void SetViewBagHeader(string bulan, string tahun, Tenan tenan) { //TenanType tenanType = MasterDataRepository().FindTenanTypeById(tenan.TenanTypeId); ProductType productType = MasterDataRepository().FindProductTypeById(tenan.ProductTypeId); if (productType != null) ViewBag.JenisJasa = productType.ProductTypeName; else ViewBag.JenisJasa = "KONSESI"; ViewBag.Tahun = tahun; ViewBag.Bulan = bulan; ViewBag.Tenant = tenan.TenanId; ViewBag.TenanName = tenan.TenanName; ViewBag.Address = tenan.Alamat; }
private void LoadDataForEditing(Tenan t) { ViewBag.TenanTypeId = new SelectList(MasterDataRepository().FindTenanType(), "TenanTypeId", "TenanTypeName", t.TenanTypeId); ViewBag.ProductTypeId = new SelectList(MasterDataRepository().FindProductType(), "ProductTypeId", "ProductTypeName", t.ProductTypeId); ViewBag.CcyCode = new SelectList(MasterDataRepository().FindCcyCode(), "CcyCode", "CcyCode", t.CcyCode); }
public decimal TotalKonsesi(decimal totalPenjualan, Tenan tenan) { if (totalPenjualan < tenan.Target) { return tenan.Target; } return totalPenjualan; }