Esempio n. 1
0
        //MainGmsEntity entities = new MainGmsEntity();
        //GET: DropdownPartial
        //[HttpPost]
        public ActionResult DDClient()
        {
            List <DDClients_get_Result> ClientRes = new List <DDClients_get_Result>();

            if (Session["ProfileId"] != null)
            {
                if (Convert.ToString(Session["ProfileId"]) == "1" || Convert.ToString(Session["ProfileId"]) == "2")
                {
                    using (SecurityDBEntities entities = new SecurityDBEntities())
                    {
                        ClientRes = entities.DDClients_get(0).ToList();
                    }
                }
                else
                {
                    DDClients_get_Result dDClients = new DDClients_get_Result();
                    dDClients.ClientName = Convert.ToString(Session["ClientName"]);
                    dDClients.ClientId   = Convert.ToInt32(Session["ClientId"]);
                    ClientRes.Add(dDClients);
                }
            }

            return(Json(ClientRes));
        }