public ActionResult DeleteUOM(string lookupCode) { var result = false; string message = string.Empty; try { result = new NetStock.BusinessFactory.LookupBO().DeleteLookup(new NetStock.Contract.Lookup { LookupCode = lookupCode }); TempData["isSaved"] = result; if (result) { TempData["resultMessage"] = string.Format("UOM [{0}] Deleted Successfully", lookupCode); } else { TempData["resultMessage"] = "Unable to DELETE the Record!"; } } catch (Exception ex) { TempData["isSaved"] = false; TempData["resultMessage"] = string.Format("Error Occurred {0}", ex.Message.ToString()); ModelState.AddModelError("Error", ex.Message); } return(RedirectToAction("UOMList", "MasterData")); }
public ActionResult AddProduct(string productCode, string uom = "") { var product = new NetStock.Contract.Product(); if (productCode != null && productCode.Length > 0) { if (productCode == "NEW") { product = new NetStock.Contract.Product(); product.Status = true; } else { product = new NetStock.BusinessFactory.ProductBO().GetProduct(new Contract.Product { ProductCode = productCode, UOM = uom }); product.Photo = new NetStock.BusinessFactory.ProductImageBO().GetProductImage(product.ProductCode); } } product.UOMList = Utility.GetLookupItemList("UOM"); // product.ProductCategoryList = Utility.GetProductCategory(); var PrductCategoryList = new NetStock.BusinessFactory.LookupBO().GetList().Where(x => x.Category == "PRODUCTCATEGORY" && x.Status == true).Select(y => new SelectListItem { Value = y.LookupCode, Text = y.Description }); product.ProductCategoryList = PrductCategoryList; product.LocationList = Utility.GetLookupItemList("LOCATION"); return(View("AddProduct", product)); }
public ActionResult EditIncoTerm(string lookupCode) { var uom = new NetStock.Contract.Lookup(); if (lookupCode != null && lookupCode.Length > 0) { uom = new NetStock.BusinessFactory.LookupBO().GetList().Where(dt => dt.Category == "INCOTERM" && dt.LookupCode == lookupCode).FirstOrDefault(); } return(PartialView("IncoTerm", uom)); }
public ActionResult EditPaymentType(string lookupCode) { var location = new NetStock.Contract.Lookup(); if (lookupCode != null && lookupCode.Length > 0) { location = new NetStock.BusinessFactory.LookupBO().GetList().Where(dt => dt.Category == "PAYMENTTYPE" && dt.LookupCode == lookupCode).FirstOrDefault(); } return(PartialView("PaymentType", location)); }
public ActionResult EditLocation(string lookupCode) { var location = new NetStock.Contract.Lookup(); if (lookupCode != null && lookupCode.Length > 0) { location = new NetStock.BusinessFactory.LookupBO().GetList().Where(dt => dt.Category == "LOCATION" && dt.LookupCode == lookupCode).FirstOrDefault(); } return(PartialView("WareHouseLocation", location)); }
public static IEnumerable <SelectListItem> GetLookupItemList(string lookupCategory) { var lstLookUp = new NetStock.BusinessFactory.LookupBO().GetList().Where(lk => lk.Status == true && lk.Category == lookupCategory).ToList(); if (lstLookUp == null) { return(null); } var selectList = lstLookUp.Select(c => new SelectListItem { Value = c.LookupCode, Text = c.Description }); return(new SelectList(selectList, "Value", "Text", "PAYMENT-CASH")); }
public static IEnumerable <SelectListItem> GetReceiptTypeList(string cbCategory) { var lstLookUp = new NetStock.BusinessFactory.LookupBO().GetList().Where(lk => lk.Category == cbCategory).ToList(); if (lstLookUp == null) { return(null); } var selectList = lstLookUp.Select(c => new SelectListItem { Value = c.LookupCode, Text = c.Description }); return(new SelectList(selectList, "Value", "Text")); }
public ActionResult SaveIncoTerm(NetStock.Contract.Lookup uomItem) { try { if (uomItem == null) { return(new HttpStatusCodeResult(System.Net.HttpStatusCode.BadRequest)); } uomItem.Status = true; uomItem.Category = "INCOTERM"; uomItem.Description2 = ""; var result = new NetStock.BusinessFactory.LookupBO().SaveLookup(uomItem); } catch (Exception ex) { ModelState.AddModelError("Error", ex.Message); } return(RedirectToAction("IncoTermList")); }
public ActionResult SavePaymentType(NetStock.Contract.Lookup paymentTypeItem) { try { if (paymentTypeItem == null) { return(new HttpStatusCodeResult(System.Net.HttpStatusCode.BadRequest)); } paymentTypeItem.Status = true; paymentTypeItem.Category = "PAYMENTTYPE"; paymentTypeItem.Description2 = ""; var result = new NetStock.BusinessFactory.LookupBO().SaveLookup(paymentTypeItem); } catch (Exception ex) { ModelState.AddModelError("Error", ex.Message); } return(RedirectToAction("PaymentTypeList")); }
public ActionResult SaveLocation(NetStock.Contract.Lookup locationItem) { try { if (locationItem == null) { return(new HttpStatusCodeResult(System.Net.HttpStatusCode.BadRequest)); } locationItem.Status = true; locationItem.Category = "LOCATION"; locationItem.Description2 = ""; var result = new NetStock.BusinessFactory.LookupBO().SaveLookup(locationItem); } catch (Exception ex) { ModelState.AddModelError("Error", ex.Message); } return(RedirectToAction("LocationList")); }
public ActionResult IncoTermList() { var lstUOM = new NetStock.BusinessFactory.LookupBO().GetList().Where(dt => dt.Category == "INCOTERM" && dt.Status == true).ToList(); return(View("IncoTermList", lstUOM)); }
public ActionResult PaymentTypeList() { var lstLookup = new NetStock.BusinessFactory.LookupBO().GetList().Where(dt => dt.Category == "PAYMENTTYPE" && dt.Status == true).ToList(); return(View("PaymentTypeList", lstLookup)); }
public ActionResult LocationList() { var lstLookup = new NetStock.BusinessFactory.LookupBO().GetList().Where(dt => dt.Category == "LOCATION" && dt.Status == true).ToList(); return(View("LocationList", lstLookup)); }