public ActionResult EditPurchaseOrderDelivery(PurchaseOrderObject deliveryObject) { try { var mainOutlet = new StoreItemStockServices().GetStoreDefaultOutlet(); if (mainOutlet == null || mainOutlet.StoreOutletId < 1) { return(Json(new List <ItemPriceObject>(), JsonRequestBehavior.AllowGet)); } //var status = new PurchaseOrderServices().EditPurchaseOrderDelivery(deliveryObject); //return Json(status, JsonRequestBehavior.AllowGet); return(Json(new List <ItemPriceObject>(), JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(new List <StoreItemStockObject>(), JsonRequestBehavior.AllowGet)); } }
private StoreSettingObject GetInfo(string subdomain) { try { if (string.IsNullOrEmpty(subdomain)) { return(new StoreSettingObject()); } var domainOj = new StoreSettingServices().GetStoreSettingByAlias(subdomain); if (domainOj.StoreId < 1) { return(new StoreSettingObject()); } var sqlConnection = DbContextSwitcherServices.SwitchSqlDatabase(domainOj); var entityConnection = DbContextSwitcherServices.SwitchEntityDatabase(domainOj); if (string.IsNullOrEmpty(sqlConnection) || string.IsNullOrEmpty(entityConnection)) { return(new StoreSettingObject()); } domainOj.EntityConnectionString = entityConnection; domainOj.SqlConnectionString = sqlConnection; domainOj.StoreLogoPath = string.IsNullOrEmpty(domainOj.StoreLogoPath) ? "/Content/images/noImage.png" : domainOj.StoreLogoPath.Replace("~", ""); SetCurrentSession("mySetting", domainOj); var defaultCurrency = new StoreItemStockServices().GetStoreDefaultCurrency(); if (defaultCurrency != null && defaultCurrency.StoreCurrencyId > 0) { domainOj.DefaultCurrency = defaultCurrency.Name; domainOj.DefaultCurrencySymbol = defaultCurrency.Symbol; } return(domainOj); } catch (Exception) { return(new StoreSettingObject()); } }
public ActionResult GetProducts(int page, int itemsPerPage) { try { var mainOutlet = new StoreItemStockServices().GetStoreDefaultOutlet(); if (mainOutlet == null || mainOutlet.StoreOutletId < 1) { return(Json(new List <ItemPriceObject>(), JsonRequestBehavior.AllowGet)); } var storeItems = new ItemPriceServices().GetProducts(page, itemsPerPage); if (!storeItems.Any()) { return(Json(new List <StoreItemStockObject>(), JsonRequestBehavior.AllowGet)); } return(Json(storeItems, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(new List <StoreItemStockObject>(), JsonRequestBehavior.AllowGet)); } }