Ejemplo n.º 1
0
        public JsonResult GetActiveProducts()
        {
            try
            {
                List <HCM_Product> list_Hcm_Product_Obj = new List <HCM_Product>();
                ModifyProductData  productData_Obj      = new ModifyProductData();
                list_Hcm_Product_Obj = productData_Obj.GetActiveProducts();

                var jsonResult = Json(list_Hcm_Product_Obj, JsonRequestBehavior.AllowGet);
                jsonResult.MaxJsonLength = int.MaxValue;
                return(jsonResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        public JsonResult AssignClient(int ClientID)
        {
            try
            {
                Session["ClientID"]  = Convert.ToString(ClientID);
                Session["VersionID"] = Convert.ToString(Versions_Obj.GetActiveVersions().Where(X => X.IsDefault == true).First().VersionID);
                Session["ProductID"] = Convert.ToInt32(Products_Obj.GetActiveProducts().First().ProductID);

                var jsonResult = Json("Success", JsonRequestBehavior.AllowGet);
                jsonResult.MaxJsonLength = int.MaxValue;
                return(jsonResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }