public PlaylistViewModel(FileDAO fileDAO, SettingDAO settingDAO) { this.fileDAO = fileDAO; this.GeneralSetting = settingDAO.SettingCache.General; this.CreateModels(); this.CreateCommands(); this.RegisterMessages(); }
public GeneralSettingViewModel(SettingDAO settingDAO) { this.SettingDAO = settingDAO; this.Settings = settingDAO.SettingCache; this.CreateModels(); this.CreateCommands(); this.RegisterMessages(); }
public AllVideoViewModel(FolderDAO folderDAO, FileDAO fileDAO, SettingDAO settingDAO) { this.folderDAO = folderDAO; this.fileDAO = fileDAO; this.GeneralSetting = settingDAO.SettingCache.General; this.CreateModels(); this.CreateCommands(); this.RegisterMessages(); }
public static bool CreateSetting(Setting config) { try { return(SettingDAO.CreateSetting(config)); } catch (Exception ex) { throw new Exception("Echec de Création de fichier", ex); } }
public static Setting ReturnSetting() { try { return(SettingDAO.ReturnSetting()); } catch (Exception ex) { throw new Exception("Echec de Création de fichier", ex); } }
private void UpdateParameter(int MinAge, int MaxAge, int MinPlayer, int MaxPlayer, int MaxForeignPlayer, int MaxGoalTime, int WinScore, int LoseScore, int DrawScore) { if (SettingDAO.UpdateParameterSetting(MinAge, MaxAge, MinPlayer, MaxPlayer, MaxForeignPlayer, MaxGoalTime, WinScore, LoseScore, DrawScore)) { MessageBox.Show("CẬP NHẬT THAM SỐ THÀNH CÔNG", "THÔNG BÁO"); } else { MessageBox.Show("CẬP NHẬT THAM SỐ THẤT BẠI", "THÔNG BÁO"); } }
public SubtitleSettingViewModel(SettingDAO settingDAO) { this.SettingDAO = settingDAO; this.Settings = settingDAO.SettingCache; this.CreateModels(); this.CreateCommands(); this.RegisterMessages(); //폰트 로드 FontHelper.FontFamilyListChanged += ((object sender, RoutedEventArgs e) => { LoadFontList(); }); }
private void LoadParameterSetting() { Setting setting = SettingDAO.GetParameterSetting(); tbMinAge.Text = setting.MinAge + ""; tbMaxAge.Text = setting.MaxAge + ""; tbMinPlayer.Text = setting.MinPlayer + ""; tbMaxPlayer.Text = setting.MaxPlayer + ""; tbMaxForeignPlayer.Text = setting.MaxForeignPlayer + ""; tbMaxGoalTime.Text = setting.MaxGoalTime + ""; tbWinScore.Text = setting.WinScore + ""; tbDrawScore.Text = setting.DrawScore + ""; tbLoseScore.Text = setting.LoseScore + ""; }
/// <summary> Gets a scalar value, calculated with the aggregate and expression specified. the field index specified is the field the expression and aggregate are applied on.</summary> /// <param name="fieldIndex">Field index of field to which to apply the aggregate function and expression</param> /// <param name="expressionToExecute">The expression to execute. Can be null</param> /// <param name="aggregateToApply">Aggregate function to apply. </param> /// <param name="filter">The filter to apply to retrieve the scalar</param> /// <param name="relations">The relations to walk</param> /// <param name="groupByClause">The groupby clause to apply to retrieve the scalar</param> /// <returns>the scalar value requested</returns> public virtual object GetScalar(SettingFieldIndex fieldIndex, IExpression expressionToExecute, AggregateFunction aggregateToApply, IPredicate filter, IRelationCollection relations, IGroupByCollection groupByClause) { EntityFields fields = new EntityFields(1); fields[0] = EntityFieldFactory.Create(fieldIndex); if ((fields[0].ExpressionToApply == null) || (expressionToExecute != null)) { fields[0].ExpressionToApply = expressionToExecute; } if ((fields[0].AggregateFunctionToApply == AggregateFunction.None) || (aggregateToApply != AggregateFunction.None)) { fields[0].AggregateFunctionToApply = aggregateToApply; } SettingDAO dao = DAOFactory.CreateSettingDAO(); return(dao.GetScalar(fields, base.Transaction, filter, relations, groupByClause)); }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(SettingDAO settingDAO, Windows.Media.MediaExtensionManager extMgr) { this.settingDAO = settingDAO; this.CreateModels(); this.CreateCommands(); this.RegisterMessages(); //셋팅 데이터 로드 LoadSetting(); //뒤로가기 버튼 이벤트 등록 HardwareButtons.BackPressed += HardwareButtons_BackPressed; //화면 회전 고정 DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait; //에러 이벤트 추가 App.Current.UnhandledException += Current_UnhandledException; //활성화 이벤트 DispatcherHelper.CheckBeginInvokeOnUI(() => { Window.Current.Activated += Current_Activated; }); }
public ActionResult Edit(Menu ne) { if (ModelState.IsValid) { var dao = new SettingDAO(); var result = dao.Update(ne); if (result) { ModelState.AddModelError("Cập nhật thành công", "success"); return(RedirectToAction("Index", "Class")); } else { ModelState.AddModelError("", "Cập nhật không thành công"); } } return(View()); }
public ActionResult Create(Menu ne) { if (ModelState.IsValid) { var dao = new SettingDAO(); long id = dao.Insert(ne); if (id > 0) { ModelState.AddModelError("Thêm thành công", "success"); return(RedirectToAction("Index", "Class")); } else { ModelState.AddModelError("", "Thêm không thành công"); } } return(View()); }
public string OpenMeetingAsView(string _Server, string _UserName, string _Password, string _scoid, string _Val, string _Mode, string _aPass) { DAO.Adobe.SettingDAO sdao = new SettingDAO(); string sessionstr = GetSessionAdobe(_Server); if (sessionstr.StartsWith("error")) { return(sessionstr); } LoginAsAdmin(sessionstr, _Server, _aPass); string principalstr = GetPrincipalId(_UserName, sessionstr, _Server); SetUserinMeetingAsView(sessionstr, _scoid, principalstr, _Server); Logout(sessionstr, _Server); sessionstr = GetSessionAdobe(_Server); if (sessionstr.StartsWith("error")) { return(sessionstr); } Login(_UserName, _Password, sessionstr, _Server); return(OpenMeeting(_Val, _Mode, sessionstr, _Server)); }
/// <summary> Retrieves Entity rows in a datatable which match the specified filter. It will always create a new connection to the database.</summary> /// <param name="selectFilter">A predicate or predicate expression which should be used as filter for the entities to retrieve.</param> /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param> /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param> /// <param name="relations">The set of relations to walk to construct to total query.</param> /// <param name="pageNumber">The page number to retrieve.</param> /// <param name="pageSize">The page size of the page to retrieve.</param> /// <returns>DataTable with the rows requested.</returns> public static DataTable GetMultiAsDataTable(IPredicate selectFilter, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relations, int pageNumber, int pageSize) { SettingDAO dao = DAOFactory.CreateSettingDAO(); return(dao.GetMultiAsDataTable(maxNumberOfItemsToReturn, sortClauses, selectFilter, relations, pageNumber, pageSize)); }
protected override void FakeIocInstanceInitialize() { _Settings = null; settingDAO = null; }
/// <summary> Performs the update action of an existing Entity to the persistent storage.</summary> /// <param name="updateRestriction">Predicate expression, meant for concurrency checks in an Update query</param> /// <returns>true if succeeded, false otherwise</returns> protected override bool UpdateEntity(IPredicate updateRestriction) { SettingDAO dao = (SettingDAO)CreateDAOInstance(); return(dao.UpdateExisting(base.Fields, base.Transaction, updateRestriction)); }
/// <summary> Performs the insert action of a new Entity to the persistent storage.</summary> /// <returns>true if succeeded, false otherwise</returns> protected override bool InsertEntity() { SettingDAO dao = (SettingDAO)CreateDAOInstance(); return(dao.AddNew(base.Fields, base.Transaction)); }
public ActionResult Index() { var dao = new SettingDAO(); return(View(db.Menu.ToList())); }
public SettingsViewModel(SettingDAO settingDAO) { this.SettingDAO = settingDAO; this.Settings = settingDAO.SettingCache; this.RegisterMessage(); }