/// <summary> /// 初期化設定 /// </summary> protected override void Initialize() { base.ClearBindings(this.Controls); try { this._equipments = Equipment.FindEquipmentsBy(this._maker.ID); this._comMethod = DropDownModel.FindAllData(TABLE_NAME.COMMUNICATION_METHOD); } catch { throw; } this.txtName.DataBindings.Add("Text", this._maker, "Name"); this.grpEnable.DataBindings.Add("Enable", this._maker, "EnableFlag"); this.grdList.DataSource = new BindingList <Equipment>(this._equipments); var cell = this.grdList.Columns["CommunicationMethod"] as DataGridViewComboBoxColumn; cell.DisplayMember = "Value"; cell.ValueMember = "ID"; cell.DataPropertyName = "CommunicationMethodID"; cell.DataSource = this._comMethod; this.txtName.Focus(); }
/// <summary> /// 初期化処理 /// </summary> protected override void Initialize() { base.ClearBindings(this.Controls); try { this.cmbMaker.DataSource = DropDownModel.FindAllData(TABLE_NAME.MAKERS); this._eqipConf = EquipmentConfiguration.FindEquipmentConfigurationBy(this._project.ID); } catch { throw; } this.txtProjectID.DataBindings.Add("Text", this._project, "ProjectID"); this.txtName.DataBindings.Add("Text", this._project, "Name"); this.grpEnable.DataBindings.Add("Enable", this._project, "EnableFlag"); this.grdDetail.DataSource = new BindingList <EquipmentConfiguration>(this._eqipConf); }
/// <summary> /// 初期化設定 /// </summary> protected override void Initialize() { base.ClearBindings(this.Controls); try { this.cmbCategory.DataSource = DropDownModel.FindAllData(TABLE_NAME.CATEGORIES); this.cmbProject.DataSource = DropDownModel.FindAllData(TABLE_NAME.PROJECTS); this.cmbProduct.DataSource = DropDownModel.FindAllData(TABLE_NAME.PRODUCTS); this.cmbIssuingMember.DataSource = DropDownModel.FindAllData(TABLE_NAME.MEMBERS); this.cmbResponcedMember.DataSource = DropDownModel.FindAllData(TABLE_NAME.MEMBERS); this.cmbCheckedMember.DataSource = DropDownModel.FindAllData(TABLE_NAME.MEMBERS); } catch { throw; } this.cmbCategory.DataBindings.Add("SelectedValue", this._issue, "CategoryID", true, DataSourceUpdateMode.OnValidation); this.cmbIssuingMember.DataBindings.Add("SelectedValue", this._issue, "IssuingMemberID", true, DataSourceUpdateMode.OnValidation); this.cmbProject.DataBindings.Add("SelectedValue", this._issue, "ProjectID", true, DataSourceUpdateMode.OnValidation); this.cmbProduct.DataBindings.Add("SelectedValue", this._issue, "ProductID", true, DataSourceUpdateMode.OnValidation); this.cmbResponcedMember.DataBindings.Add("SelectedValue", this._issue, "ResponcedMemberID", true, DataSourceUpdateMode.OnValidation); this.cmbCheckedMember.DataBindings.Add("SelectedValue", this._issue, "CheckedMemberID", true, DataSourceUpdateMode.OnValidation); this.dtDeadLine.DataBindings.Add("GetDate", this._issue, "Deadline", true, DataSourceUpdateMode.OnValidation); this.dtOrigination.DataBindings.Add("Value", this._issue, "OriginationDate", true, DataSourceUpdateMode.OnValidation); this.grpStatus.DataBindings.Add("SelectedStatus", this._issue, "Status", true, DataSourceUpdateMode.OnValidation); this.dtFinishedDate.DataBindings.Add("GetDate", this._issue, "FinishedDate", true, DataSourceUpdateMode.OnValidation); this.txtComment.DataBindings.Add("Text", this._issue, "Comment", true, DataSourceUpdateMode.OnValidation); if (TASK_STATUS.DONE == (TASK_STATUS)this._issue.Status) { //ステータスが「完了」の場合、編集不可とする this.Controls.OfType <Control>() .Where(x => x.Name != "btnReturn") .ToList() .ForEach(x => x.Enabled = false); } this.dtOrigination.Focus(); }
/// <summary> /// 初期設定 /// </summary> protected override void Initialize() { try { //ToDo:検索条件の機能まとめる this.cmbCategories.DataSource = DropDownModel.FindAllData(TABLE_NAME.CATEGORIES); this.cmbProjects.DataSource = DropDownModel.FindAllData(TABLE_NAME.PROJECTS, false); this.cmbProducts.DataSource = DropDownModel.FindAllData(TABLE_NAME.PRODUCTS); } catch { throw; } this.cmbCategories.DataBindings.Add("SelectedValue", this._condition, "CategoryID"); this.cmbProjects.DataBindings.Add("SelectedValue", this._condition, "ProjectID", true, DataSourceUpdateMode.OnValidation); this.cmbProducts.DataBindings.Add("SelectedValue", this._condition, "ProductID"); this.dtDeadlineFrom.DataBindings.Add("GetDate", this._condition, "DeadlineFrom", true, DataSourceUpdateMode.OnValidation); this.dtDeadlineTo.DataBindings.Add("GetDate", this._condition, "DeadlineTo", true, DataSourceUpdateMode.OnValidation); //this.grpStatus.DataBindings.Add("SelectedStatus", this._condition, "Status"); }