public frmBackupManagement() { InitializeComponent(); TreeMpttDb dbMptt = new TreeMpttDb(Commons.dl); topicTreeMptt = new TreeMptt(Commons.dl, null, null, null, null, null, null, null, DragDropEffects.None); }
public frmBackupManagement() { InitializeComponent(); DbAndBusiness db = new DbAndBusiness(Commons.PathAndFileDatabase); TreeMpttDb dbMptt = new TreeMpttDb(db); topicTreeMptt = new TreeMptt(db, null, null, null, null, null, null, null, DragDropEffects.None); }
internal frmQuestion(QuestionFormType Type, Question Question, SchoolSubject Subject, Class Class, Topic Topic) { InitializeComponent(); DbAndBusiness db = new DbAndBusiness(Commons.PathAndFileDatabase); TreeMpttDb dbMptt = new TreeMpttDb(db); // fills the lookup tables' combos List <QuestionType> listQuestions = db.GetListQuestionTypes(true); cmbQuestionType.DisplayMember = "Name"; cmbQuestionType.ValueMember = "idQuestionType"; cmbQuestionType.DataSource = listQuestions; List <SchoolSubject> listSubjects = db.GetListSchoolSubjects(true); cmbSchoolSubject.DisplayMember = "Name"; cmbSchoolSubject.ValueMember = "idSchoolSubject"; cmbSchoolSubject.DataSource = listSubjects; currentClass = Class; currentSubject = Subject; currentQuestion = Question; formType = Type; if (formType == QuestionFormType.EditOneQuestion) { currentQuestion = db.GetQuestionById(Question.IdQuestion); } if (Topic != null) { currentTopic = db.GetTopicById(Topic.Id); if (currentTopic.Id != 0) { txtTopic.Text = dbMptt.GetTopicPath(currentTopic.Id); } } //if (Subject != null) // idSchoolSubject = Subject.IdSchoolSubject; }