public string Login(string sqlIP, int sqlPort, string userName, string passWord) { string info = string.Empty; try { info = login.Login(sqlIP, sqlPort, userName, passWord); curUser = login.curUser; sqlMethod = login.sqlMethod; frmMain.curUser = curUser; //taskCfg.curUser = curUser; } catch (Exception ex) { throw new Exception(ex.Message); } return(info); }