Beispiel #1
0
        public ActionResult DefectList()
        {
            ViewBag.Title = "DANTE Pilot";
            List <Defect> lst_Defect = Utiltity.getDefectList();

            return(View(lst_Defect.AsEnumerable()));
        }
Beispiel #2
0
        public static void InitDBInfo(string server)
        {
            if (String.IsNullOrEmpty(DatabaseFactory.ConnectionString))
            {
                int    sp         = server.IndexOf(";");
                string type       = server.Substring(5, sp - 5);
                int    sp1        = server.IndexOf(";", sp + 1);
                string datasource = server.Substring(sp + 10, sp1 - sp - 10);
                int    sp2        = server.IndexOf(";", sp1 + 1);
                string username   = server.Substring(sp1 + 10, sp2 - sp1 - 10);
                string password   = server.Substring(sp2 + 10);

                DatabaseFactory.ConnectionString = Utiltity.GetConnectionString(type, datasource, username, password);
            }
        }