Example #1
0
        public JsonResult ShowAllProductSupplier()
        {
            BL_ProductSupplier db = new BL_ProductSupplier();

            return(new JsonResult {
                Data = db.ShowAllProductSupplier(), JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Example #2
0
        public JsonResult EditProductSupplier(int id)
        {
            BL_ProductSupplier db = new BL_ProductSupplier();

            ModelState.Clear();
            return(new JsonResult {
                Data = db.GetProductSupplier(id), JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Example #3
0
        public JsonResult DeleteProductSupplier(int ProductSupplierID)
        {
            BL_ProductSupplier db   = new BL_ProductSupplier();
            string             _Del = null;

            try
            {
                string DependaincyName = db.Delete(Convert.ToInt32(ProductSupplierID));
                _Del = "ProductSupplier Deleted Successfully";
            }
            catch (Exception)
            {
                throw;
            }
            return(new JsonResult {
                Data = _Del, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Example #4
0
        public ActionResult AjaxMethod(string City)
        {
            KeystoneProject.Buisness_Logic.PharmacyMaster.BL_ProductSupplier BL_obj = new BL_ProductSupplier();
            KeystoneProject.Models.PharmacyMaster.ProductSupplier            obj    = new ProductSupplier();
            List <string> searchList = new List <string>();

            DataTable td = new DataTable();
            DataSet   ds = objbl.GetCity(City, "%");

            td = objbl.GetCountryStateID(Convert.ToInt16(ds.Tables[0].Rows[0]["CityID"].ToString()));

            obj.State     = td.Rows[0]["StateName"].ToString();
            obj.Country   = td.Rows[0]["CountryName"].ToString();
            obj.StateID   = td.Rows[0]["StateID"].ToString();
            obj.CountryID = td.Rows[0]["CountryID"].ToString();


            searchList.Add(obj.State);
            searchList.Add(obj.Country);
            searchList.Add(obj.StateID);
            searchList.Add(obj.CountryID);

            return(Json(searchList));
        }