public IActionResult Index() { StatusNames statusNames = new StatusNames(); ViewBag.StatusEs = new SelectList(statusNames.GetStatuses(), "Status", "Name"); return(View()); }
public IActionResult ViewDetails(int id) { StatusNames statusNames = new StatusNames(); ViewBag.StatusEs = new SelectList(statusNames.GetStatuses(), "Status", "Name"); var payement = paymentService.GetPayment(id); return(View(payement)); }
public void Load(string file) { if (!IsLoaded) { StatusNames.Clear(); JsonConvert.DeserializeObject <List <StatusNameJsonData> >(Resources.Load <TextAsset>(file).text) .ForEach(li => StatusNames.Add(li.status, new StatusNameData(li))); IsLoaded = true; } }
public static string GetStatusName(int status) { if (StatusNames.ContainsKey(status)) { return(StatusNames[status]); } else { return(String.Format("Display name for status {0} was not found.", status)); } }
public IActionResult TransactionView(Guid code, FindModel model) { if (model != null) { code = model.Code; } StatusNames statusNames = new StatusNames(); ViewBag.StatusEs = new SelectList(statusNames.GetStatuses().Where(s => s.Status != 1 && s.Status != 2), "Status", "Name"); decimal df = 0; var link = transactionLinkService.GetTransactionLinks().Where(s => s.LinkCode == code).FirstOrDefault(); var tr = transactionService.GetTransaction(link.TransactionID); TransactionDetails details = new TransactionDetails(); details.TransactionID = tr.Id; details.FirstName = tr.FirstName; details.LastName = tr.LastName; details.BuyerEmail = tr.BuyerEmail; details.ItemName = tr.ItemName; details.DescriptionOfItem = tr.DescriptionOfItem; details.Amount = tr.Amount; details.DeliveryType = tr.DeliveryTypeID == 1 ? "Free Delivery" : tr.DeliveryTypeID == 2 ? "Paid Delivery" : ""; details.Deliveryfee = tr.Deliveryfee != 0 ? tr.Deliveryfee : tr.Deliveryfee == 0 ? 0 : 0; details.DeliveryTime = tr.DeliveryTime; details.TermsOfReturns = tr.TermsOfReturns; details.ProductImageUrl = tr.ProductImageUrl; details.ProductImageUrl1 = tr.ProductImageUrl1; details.ProductImageUrl2 = tr.ProductImageUrl2; details.ProductImageUrl3 = tr.ProductImageUrl3; details.ProductImageUrl4 = tr.ProductImageUrl4; details.SellerName = tr.SellerName; details.SellerEmail = tr.SellerEmail; details.escrowfee = tr.escrowfee; details.Totalfee = tr.Totalfee; details.LinkCode = link.LinkCode; details.LinkID = link.Id; details.statusID = tr.Status; details.Status = tr.Status == 1 ? "<div style=\"color:red\">Pending<div>" : tr.Status == 2 ? "<div style=\"color:yellow\">Paid</div>" : tr.Status == 3 ? "<div style=\"color:purple\">Shipped</div>" : tr.Status == 4 ? "<div style=\"color:green\">Receieved</div>" : ""; return(View(details)); }
public IActionResult ExpiredDetails(int id) { StatusNames statusNames = new StatusNames(); ViewBag.StatusEs = new SelectList(statusNames.GetStatuses(), "Status", "Name"); var tr = transactionService.GetTransaction(id); var link = transactionLinkService.GetTransactionLinks().Where(s => s.TransactionID == tr.Id).FirstOrDefault(); TransactionDetails details = new TransactionDetails(); details.TransactionID = tr.Id; details.FirstName = tr.FirstName; details.LastName = tr.LastName; details.BuyerEmail = tr.BuyerEmail; details.ItemName = tr.ItemName; details.DescriptionOfItem = tr.DescriptionOfItem; details.Amount = tr.Amount; details.DeliveryType = tr.DeliveryTypeID == 1 ? "Free Delivery" : tr.DeliveryTypeID == 2 ? "Paid Delivery" : ""; details.Deliveryfee = tr.Deliveryfee != 0 ? tr.Deliveryfee : tr.Deliveryfee == 0 ? 0 : 0; details.DeliveryTime = tr.DeliveryTime; details.TermsOfReturns = tr.TermsOfReturns; details.ProductImageUrl = tr.ProductImageUrl; details.ProductImageUrl1 = tr.ProductImageUrl1; details.ProductImageUrl2 = tr.ProductImageUrl2; details.ProductImageUrl3 = tr.ProductImageUrl3; details.ProductImageUrl4 = tr.ProductImageUrl4; details.SellerName = tr.SellerName; details.SellerEmail = tr.SellerEmail; details.escrowfee = tr.escrowfee; details.Totalfee = tr.Totalfee; details.LinkCode = link.LinkCode; details.LinkID = link.Id; details.statusID = tr.Status; details.Status = "Expired"; return(View(details)); }
public OrdersIndex() { StatusNames = OrderStatus.StatusNames.ToList(); StatusNames.Insert(0, AllStatusName); }
public static bool IsValidStatusName(string status) { return(StatusNames.Contains(status)); }
public StatusNameData GetStatusName(int status) { return(StatusNames.ContainsKey(status) ? StatusNames[status] : null); }
public void Load() { Profiles.Load(kProfiles); Localization.Load(kLocalizationFiles); Generators.Load(kGeneratorFile); Managers.Load(kManagerFile); PlanetNameRepository.Load(kPlanetNameFile); ModuleNameRepository.Load(kModuleNameFile); GeneratorLocalData.Load(kGeneratorLocalDataFile); spritePathRepository.Load(kSprites); spritePathRepository.AddItems(spriteTempIcons.Values.ToList()); /* * foreach (var planet in PlanetNameRepository.Items) { * Sprites.AddPath(planet.GetBgImageSpriteKey(), planet.bg_image_path); * if(planet.ui_icon != null ) { * Sprites.AddPath(planet.ui_icon.id, planet.ui_icon.path); * } * if(planet.history_back != null ) { * Sprites.AddPath(planet.history_back.id, planet.history_back.path); * } * }*/ LocalProducts.Load(kLocalProducts); /* * foreach(var prod in LocalProducts.ProductCollection) { * if(prod.icon != null ) { * Sprites.AddPath(prod.icon.id, prod.icon.path); * } * }*/ ManagerLocalDataRepository.Load(kManagerLocalData); /* * foreach(var manager in ManagerLocalDataRepository.ManagerCollection ) { * foreach(var iconData in manager.icons ) { * if(iconData.active != null && !string.IsNullOrEmpty(iconData.active.path)) { * Sprites.AddPath(iconData.active.id, iconData.active.path); * } * if(iconData.disabled != null && !string.IsNullOrEmpty(iconData.disabled.path)) { * Sprites.AddPath(iconData.disabled.id, iconData.disabled.path); * } * } * }*/ CashUpgrades.Load(kCashUpgrades); SecuritiesUpgrades.Load(kSecurityUpgrades); CoinUpgrades.Load(kCoinUpgrades); PlayerIcons.Load(kPlayerIcons); /* * foreach(var spritePathData in PlayerIcons.IconPaths) { * Sprites.AddPath(spritePathData.id, spritePathData.path); * }*/ StatusNames.Load(kStatusNames); Products.Load(kProducts); PersonalProducts.Load(kPersonalProducts); RocketData.Load(kRocketProb); RocketUpgradeRepository.Load(kRocketUpgarde); StartCoroutine(LoadNetResourcesImpl()); //Debug.Log($"Count of module names => {ModuleNameRepository.ModuleNameCollection.Count()}".Colored(ConsoleTextColor.orange)); }
public GiftOrdersIndex() { //StatusNames = OrderStatus.StatusNames.ToList(); StatusNames = OrderStatus.GiftOrderStatusNames.ToList(); StatusNames.Insert(0, AllStatusName); }