public void Fill(AccountServiceSubQuality accountServiceSubQuality) { this.m_AccountServiceSubQuality = accountServiceSubQuality ?? AccountServiceSubQuality.Null; AccountService service = AccountService.FindById(this.m_AccountServiceSubQuality.AccountServiceId); this.bsServiceType.set_Position(this.bsServiceType.Find("Id", (long) service.ServiceTypeId)); this.cbxServiceType.set_Enabled(false); this.bsServiceTypeSuspensionType.set_Position(this.bsServiceTypeSuspensionType.Find("Id", (long) this.m_AccountServiceSubQuality.ServiceTypeSubQualityId)); this.bsServiceTypeSuspensionTypePercent.set_Position(this.bsServiceTypeSuspensionTypePercent.Find("Id", (long) this.m_AccountServiceSubQuality.StsqpId)); this.bsServiceTypeSuspensionTypeAcceptableDurations.set_Position(this.bsServiceTypeSuspensionTypeAcceptableDurations.Find("Id", (long) this.m_AccountServiceSubQuality.StsqadId)); if (this.m_AccountServiceSubQuality.DocId != OrgDocument.Null.Id) { this.selectOrgDocument.SelectedOrgDocument = OrgDocument.FindById(this.m_AccountServiceSubQuality.DocId); } this.numDayTemperature.set_Value(this.m_AccountServiceSubQuality.DayTemperature); this.numNightTemperature.set_Value(this.m_AccountServiceSubQuality.NightTemperature); this.numPressureDeviation.set_Value(this.m_AccountServiceSubQuality.PressureDeviation); this.numSquareRooms.set_Value(this.m_AccountServiceSubQuality.SquareRooms); this.sfdReasons.SelectedFasetItem = (this.m_AccountServiceSubQuality.ReasonId == FasetItem.Null.Id) ? FasetItem.Null : Register.GetFasetItem(FasetsEnum.SubQualityServiceReasons, this.m_AccountServiceSubQuality.ReasonId); if (!this.m_AccountServiceSubQuality.IsNew) { this.dateTimePeriod.Fill(this.m_AccountServiceSubQuality.FromDate, this.m_AccountServiceSubQuality.ToDate); this.chbxExeptAcceptableDuration.set_Checked(this.m_AccountServiceSubQuality.ExceptAcceptableDuration); this.cbxServiceTypeSubQualityType.set_Enabled(false); this.selectOrgDocument.set_Enabled(false); this.sfdReasons.set_Enabled(false); } }
public AccountServiceSubQualityAddChangeForm(AccountServiceSubQuality accountServiceSubQuality) : this() { this.m_AccountServiceSubQuality = accountServiceSubQuality ?? AccountServiceSubQuality.Null; }
private void Fill(AccountServiceSubQuality accountServiceSubQuality) { this.m_AccountServiceSubQuality = accountServiceSubQuality ?? AccountServiceSubQuality.Null; AccountService service = AccountService.FindById(this.m_AccountServiceSubQuality.AccountServiceId); this.bsServiceType.set_Position(this.bsServiceType.Find("Id", (long) service.ServiceTypeId)); this.cbxServiceType.set_Enabled(false); this.bsServiceTypeSuspensionType.set_Position(this.bsServiceTypeSuspensionType.Find("Id", (long) this.m_AccountServiceSubQuality.ServiceTypeSubQualityId)); this.bsServiceTypeSuspensionTypePercent.set_Position(this.bsServiceTypeSuspensionTypePercent.Find("Id", (long) this.m_AccountServiceSubQuality.StsqpId)); this.bsServiceTypeSuspensionTypeAcceptableDurations.set_Position(this.bsServiceTypeSuspensionTypeAcceptableDurations.Find("Id", (long) this.m_AccountServiceSubQuality.StsqadId)); if (this.m_AccountServiceSubQuality.DocId != OrgDocument.Null.Id) { this.selectOrgDocument.SelectedOrgDocument = OrgDocument.FindById(this.m_AccountServiceSubQuality.DocId); } if (!this.m_AccountServiceSubQuality.IsNew) { this.cbxServiceTypeSubQualityType.set_Enabled(false); this.selectOrgDocument.set_Enabled(false); this.sfdReasons.set_Enabled(false); } this.chbxExeptAcceptableDuration.set_Checked(accountServiceSubQuality.ExceptAcceptableDuration); }
public static void AddAccountServiceSubQualities(Area area, AccountServiceSubQuality quality, OrgDocument doc, bool runRecalc) { Mappers.GroupOperationMapper.AddAccountServiceSubQualities(area.Id, quality.AccountServiceId, quality.StsqpId, quality.StsqadId, quality.SquareRooms, quality.NightTemperature, quality.DayTemperature, quality.PressureDeviation, quality.ReasonId, quality.ExceptAcceptableDuration, quality.FromDate, quality.ToDate, doc.Id, runRecalc); }
public static void AddAccountServiceSubQualities(AccountServiceSubQuality subqualityTemplate, System.Data.DataTable subqualities, bool runRecalc) { Mappers.GroupOperationMapper.AddAccountServiceSubQualities(subqualityTemplate.StsqadId, subqualityTemplate.StsqpId, (long) subqualityTemplate.ReasonId, subqualityTemplate.ExceptAcceptableDuration, subqualityTemplate.DocId, subqualities, runRecalc); }
private void tsbAdd_Click(object sender, System.EventArgs e) { if (this.m_AccountService != AccountService.Null) { AccountServiceSubQuality accountServiceSubQuality = new AccountServiceSubQuality { AccountServiceId = this.m_AccountService.Id }; AccountServiceSubQualityAddChangeForm form = new AccountServiceSubQualityAddChangeForm(accountServiceSubQuality); if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.Yes) { this.bsAccountServiceSubQualities.set_DataSource(this.m_AccountService.GetAccountServiceSubQuality()); this.bsAccountServiceSubQualities.set_Position(this.bsAccountServiceSubQualities.Find("Id", (long) accountServiceSubQuality.Id)); } } }