Ejemplo n.º 1
0
      public JsonResult GetReorderNoticount()
      {
          var role    = System.Web.HttpContext.Current.Session["RoleName"].ToString();
          var isadmin = System.Web.HttpContext.Current.Session["isAdmin"].ToString();

          if (role == "Inventory Manager")
          {
              ReqList          obj     = new ReqList();
              DataSet          ds      = obj.Show_Reordernoticounts();
              List <RequestVM> listreq = new List <RequestVM>();

              foreach (DataRow dr in ds.Tables[0].Rows)
              {
                  listreq.Add(new RequestVM
                    {
                        count = Convert.ToInt32(dr["Totalcount"])
                    });
              }
              return(Json(listreq, JsonRequestBehavior.AllowGet));
          }
          return(Json(JsonRequestBehavior.AllowGet));
      }