/// <summary> /// Prepare /// </summary> private void prepare() { __Program.hasLogin = 2; // Exit program as default lUser = new Common.BLL.Logic.GasStation.User(Common.Enum.EDatabase.GasStation); user = new Common.BLL.Entity.GasStation.User(); }
/// <summary> /// Prepare /// </summary> private static void prepare() { // Prepare __Program.hasLogin = 0; // Initilization string exePath = System.Reflection.Assembly.GetExecutingAssembly().Location; Common.Initializer.init(Path.Combine(Application.StartupPath, "log.txt"), exePath); ///FOR TEST Common.BLL.Entity.GasStation.User user = new Common.BLL.Entity.GasStation.User(); Common.BLL.Logic.GasStation.User luser = new Common.BLL.Logic.GasStation.User(Common.Enum.EDatabase.GasStation); user.id = 2; luser.read(user); Common.GlobalData.UserManager.currentUser = user; //Helper.GridHeaderMaker.makeHeaderOwnerUserControls(); //Helper.GridHeaderMaker.makeHeaderCarUserControls(); //Helper.GridHeaderMaker.makeHeaderTrafficUserControls(); Helper.GridHeaderMaker.makeHeaderReportTraffic(); //Helper.GridHeaderMaker.makeHeaderSearchOwner(); //Helper.GridHeaderMaker.makeHeaderOwner(); //Helper.GridHeaderMaker.makeHeaderCarColor(); //Helper.GridHeaderMaker.makeHeaderCarLevel(); //Helper.GridHeaderMaker.makeHeaderCarFuel(); //Helper.GridHeaderMaker.makeHeaderCarSystem(); //Helper.GridHeaderMaker.makeHeaderCarType(); //Helper.GridHeaderMaker.makeHeaderPlateType(); //Helper.GridHeaderMaker.makeHeaderPlateCity(); }
/// <summary> /// Prepare /// </summary> private void prepare() { mrs = new ManualResetEvent(true); makeEventLog(); #region Get Service User Common.BLL.Logic.GasStation.User lUser = new Common.BLL.Logic.GasStation.User(Common.Enum.EDatabase.GasStation); CommandResult opResult = lUser.getServiceUser(); serviceUser = opResult.model as Common.BLL.Entity.GasStation.User; #endregion }
private void writeToDB(string tagId) { int interval = 1; Common.BLL.Entity.GasStation.User serviceUser; Common.BLL.Logic.GasStation.Traffic lTraffic = new Common.BLL.Logic.GasStation.Traffic(Common.Enum.EDatabase.GasStation); Common.BLL.Entity.GasStation.Tag tag = new Common.BLL.Entity.GasStation.Tag() { tag = tagId }; Common.BLL.Logic.GasStation.User lUser = new Common.BLL.Logic.GasStation.User(Common.Enum.EDatabase.GasStation); CommandResult opResult = lUser.getServiceUser(); serviceUser = opResult.model as Common.BLL.Entity.GasStation.User; lTraffic.insertTagByService(tag, serviceUser, DateTime.Now, interval); }