public ActionResult executefiles(uidata sample) { crud objj2 = new crud(); string storeserver = TempData["storeserver"].ToString(); string path = sample.path; objj2.setconn(storeserver, "master"); ViewBag.hello = objj2.ExecuteSequentialFile(path, storeserver); return(View("home")); }
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)); }