private static void LoadDataCommon() { Config_Common.LoadConfigCommon(); ThongTinCauHinh.LayThongTinCauHinh(); CommonBL.LoadDrivers_Active(); CommonBL.LoadVehicles(); //CommonBL.LoadStaxiLoaiXe(); if (Config_Common.NhapTuyenDuongDai || Config_Common.App_DieuXeHopDong) { CommonBL.LoadTuyenDuongDai(); } try { using (DataTable dt = QuanTriCauHinh.G5_GetLines_LoaiXeOfPCDienThoai(IpAddress)) { if (dt.Rows != null && dt.Rows.Count > 0) { LineVung = dt.Rows[0]["Line_Vung"].ToString(); if (Config_Common.DienThoai_DieuTuDong) { Config_Common.DienThoai_DieuTuDong = dt.Columns.Contains("G5_Type") && dt.Rows[0]["G5_Type"].ToString() == "1"; } Config_Common.G5_PinMap = dt.Columns.Contains("G5_PinMap") && dt.Rows[0]["G5_PinMap"].ToString() == "1"; if (Config_Common.GopLine || ThongTinCauHinh.GopKenh_TrangThai) { LineGop = dt.Rows[0]["LineGop"] == DBNull.Value ? LineVung : dt.Rows[0]["LineGop"].ToString(); } QuanTriCauHinh.MoHinh = dt.Columns.Contains("MoHinh") && dt.Rows[0]["MoHinh"] != DBNull.Value && (string)dt.Rows[0]["MoHinh"] != "" && (string)dt.Rows[0]["MoHinh"] != "0" ? (MoHinh)dt.Rows[0]["MoHinh"].To <int>() : MoHinh.TD_DT; } else { LineVung = string.Empty; } } } catch (Exception ex) { LogError.WriteLogError("GetLines_LoaiXeOfPCDienThoai", ex); } }