Exemplo n.º 1
0
        public ActionResult connectservercall(uidata sample)
        {
            List <SelectListItem> filelist = new List <SelectListItem>();

            filelist.Add(new SelectListItem
            {
                Text  = "",
                Value = ""
            });


            uidata uidata = new uidata();

            uidata.filename = filelist;

            crud objj = new crud();

            int result = Int32.Parse(sample.at);

            if (sample.servername != null)
            {
                TempData["storeserver"] = sample.servername;
                if (result == 1)
                {
                    objj.setconn(sample.servername, "master");
                }
                else
                {
                    objj.setsqlconn(sample.servername, "master", sample.username, sample.password);
                }
            }
            ViewBag.connmessage = "Conncetion established successfully!!!";
            objj.giveservernametobll(sample.servername);

            return(View("home", uidata));
        }