Пример #1
0
        public About GetAbout()
        {
            DataTable   table = null;
            LoggingData data  = new LoggingData(ip, username, password, database);

            table = data.GetAbout();
            if (table == null)
            {
                CLog4net.LogError("快递表初始化错误");
                return(null);
            }

            About a = new About();

            foreach (System.Data.DataRow d in table.Rows)
            {
                /**
                 * 从数据库中读取未被取走的快递
                 * */
                a.Address         = Convert.ToString(d[TbAbout.address]);
                a.CabinetCode     = Convert.ToString(d[TbAbout.cabinetCode]);
                a.CompanyName     = Convert.ToString(d[TbAbout.companyName]);
                a.ConfigTime      = Convert.ToDateTime(d[TbAbout.configTime]);
                a.CreatedTime     = Convert.ToDateTime(d[TbAbout.createdTime]);
                a.Name            = Convert.ToString(d[TbAbout.name]);
                a.Remark          = Convert.ToString(d[TbAbout.remark]);
                a.TelNum          = Convert.ToString(d[TbAbout.telNum]);
                a.Version         = Convert.ToString(d[TbAbout.version]);
                a.ServerUrl       = Convert.ToString(d[TbAbout.serverUrl]);
                a.ManagerName     = Convert.ToString(d[TbAbout.managerName]);
                a.ManagerPassword = Convert.ToString(d[TbAbout.managerPassword]);
                a.Model           = Convert.ToString(d[TbAbout.model]);
            }
            return(a);
        }