Esempio n. 1
0
        public ActionResult SearchProduct(string itemcode)
        {
            try
            {
                if (string.IsNullOrEmpty(itemcode) == false)
                {
                    //Search the Database for the ProductCode
                    var itemcoderesults = ((from m in db.iICE_Staging
                                            where m.ItemCode == itemcode
                                            select m).ToList());


                    if (itemcoderesults.Count() > 0)
                    {
                        iICE_Staging pdm = new iICE_Staging();

                        return(Json("Found", JsonRequestBehavior.AllowGet));
                    }
                    else
                    {
                        return(Json("Not Found", JsonRequestBehavior.AllowGet));
                    }
                }
                else
                {
                    return(Json("Error! - No ItemCode"));
                }
            }
            catch (Exception ex)
            {
                return(View("Error", new HandleErrorInfo(ex, "iICEStaging", "SearchProduct")));
            }
        }
Esempio n. 2
0
 //Passing Empty Model to Bind to the View
 public ActionResult iICE_Staging()
 {
     try
     {
         iICE_Staging model = new iICE_Staging();
         return(View());
     }
     catch (Exception ex)
     {
         return(View("Error", new HandleErrorInfo(ex, "iICEStaging", "iICE_Staging")));
     }
 }