当前位置: 首页>>代码示例>>C#>>正文


C# DoWorkEventArgs.set_Result方法代码示例

本文整理汇总了C#中System.ComponentModel.DoWorkEventArgs.set_Result方法的典型用法代码示例。如果您正苦于以下问题:C# DoWorkEventArgs.set_Result方法的具体用法?C# DoWorkEventArgs.set_Result怎么用?C# DoWorkEventArgs.set_Result使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.ComponentModel.DoWorkEventArgs的用法示例。


在下文中一共展示了DoWorkEventArgs.set_Result方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: workerProtocol_DoWork

 private void workerProtocol_DoWork(object sender, DoWorkEventArgs e)
 {
     System.Data.DataSet set = GroupOperation.AccountChangeHouseHolderServiceProtocol(this.dt);
     set.Tables.get_Item(0).set_TableName("dataServices");
     StiReport report = new StiReport();
     report.Load(Resources.Rep_ChangeHouseHolder);
     report.ReferencedAssemblies = new System.Collections.Generic.List<string>(report.ReferencedAssemblies) { "AIS.SN.Model.dll" }.ToArray();
     report.Compile();
     Organization organization = (Organization) this.bsOldHouseHolders.get_Current();
     Organization organization2 = (Organization) this.bsNewHouseHolders.get_Current();
     report["dateChangeHouseHolder"] = this.dbFromDate.Value;
     report["oldHouseHolder"] = organization.ShortName;
     report["newHouseHolder"] = organization2.ShortName;
     report["orgDocName"] = (this.selectOrgDoc.SelectedOrgDocument ?? OrgDocument.Null).ToString();
     report["suffix"] = this.tbAccountNumberSufix.get_Text();
     report["transferDebts"] = this.cbMoveDebtChangeHH.get_Checked() ? "Да" : "Нет";
     report["transferAdvance"] = this.cbMoveAvansChangeHH.get_Checked() ? "Да" : "Нет";
     report["transferTimeOff"] = this.cbMoveTimeOffChangeHH.get_Checked() ? "Да" : "Нет";
     report.RegData((System.Data.DataSet) set);
     report.RegData("dataAddresses", this.m_addresses);
     e.set_Result(report);
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:22,代码来源:AccountHouseHolderChangeView.cs

示例2: workerCompareServices_DoWork

 private void workerCompareServices_DoWork(object sender, DoWorkEventArgs e)
 {
     ObjectList<Service> list;
     ObjectList<Service> list2;
     object[] objArray = e.get_Argument() as object[];
     GroupOperation.GetNotExistsServicesByHouseHolder((objArray[0] as Area).Id, objArray[1] as Organization, objArray[2] as Organization, out list, out list2, this.dbFromDate.Value);
     object[] objArray2 = new object[] { list, list2 };
     e.set_Result(objArray2);
     (objArray[0] as Area).DeleteWithRelations();
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:10,代码来源:AccountHouseHolderChangeView.cs

示例3: workerProcess_DoWork

 private void workerProcess_DoWork(object sender, DoWorkEventArgs e)
 {
     object[] objArray = e.get_Argument() as object[];
     e.set_Result(null);
     try
     {
         GroupOperation.AccountChangeHouseHolder(objArray[0] as Organization, objArray[1] as Organization, this.dbFromDate.Value, objArray[2] as ObjectList<LocalAddress>, this.tbAccountNumberSufix.get_Text().Trim(), this.cbMoveDebtChangeHH.get_Checked(), this.cbMoveAvansChangeHH.get_Checked(), this.cbMoveTimeOffChangeHH.get_Checked(), this.dt, (this.selectOrgDoc.SelectedOrgDocument == null) ? ((long) 0L) : this.selectOrgDoc.SelectedOrgDocument.Id);
     }
     catch (System.Exception exception)
     {
         e.set_Result(exception);
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:13,代码来源:AccountHouseHolderChangeView.cs

示例4: bwLoadAddresses_DoWork

 private void bwLoadAddresses_DoWork(object sender, DoWorkEventArgs e)
 {
     e.set_Result(((Area) e.get_Argument()).GetAddresses());
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:4,代码来源:AddressAreaGroupForm.cs

示例5: m_SearchWorker_DoWork

 private void m_SearchWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     ObjectList<Account> list;
     if (this.m_SearchByNumbersRadio.get_Checked())
     {
         string apartmentNumber = this.m_ApartmentNumberEdit.get_Text().Trim();
         string accountNumber = this.m_AccountEdit.get_Text().Trim();
         string barcode = this.m_Barcode.get_Text().Trim();
         if ((string.IsNullOrEmpty(apartmentNumber) && string.IsNullOrEmpty(accountNumber)) && string.IsNullOrEmpty(barcode))
         {
             throw new System.ApplicationException("Уточните параметры поиска");
         }
         list = Account.Search(apartmentNumber, accountNumber, LocalAddress.Null.Id, string.Empty, barcode);
     }
     else
     {
         LocalAddress selectedAddress = this.m_LocalAddressSelector.GetSelectedAddress();
         string ownerName = this.m_OwnerNameEdit.get_Text();
         if (((selectedAddress == LocalAddress.Null) || (selectedAddress.Level == AddressLevel.MinAddress)) && string.IsNullOrEmpty(ownerName))
         {
             throw new System.ApplicationException("Уточните параметры поиска");
         }
         list = Account.Search(string.Empty, string.Empty, selectedAddress.Id, ownerName, string.Empty);
     }
     list.ApplySort("AddressName");
     e.set_Result(list);
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:27,代码来源:AccountSearchControl.cs

示例6: m_SearchWorker_DoWork

 private void m_SearchWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     LocalAddress selectedAddress = this.m_LocalAddressSelector.GetSelectedAddress();
     string ownerName = string.Empty;
     if (((selectedAddress == LocalAddress.Null) || (selectedAddress.Level == AddressLevel.MinAddress)) && string.IsNullOrEmpty(ownerName))
     {
         throw new System.ApplicationException("Уточните параметры поиска");
     }
     ObjectList<Apartment> list = Apartment.Search(string.Empty, string.Empty, selectedAddress.Id, ownerName, this.chxShowClose.get_Checked(), string.Empty);
     list.ApplySort("AddressName");
     e.set_Result(list);
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:12,代码来源:CounterApartmentSearchControl.cs

示例7: bckWrkrProcessSpliting_DoWork

 private void bckWrkrProcessSpliting_DoWork(object sender, DoWorkEventArgs e)
 {
     int num3;
     int num4;
     ObjectList<Apartment> list = new ObjectList<Apartment>();
     foreach (Apartment apartment in this.bsNewApartments)
     {
         list.Add(apartment);
     }
     ObjectList<Account> list2 = new ObjectList<Account>();
     foreach (Account account in this.bsNewAccounts)
     {
         list2.Add(account);
     }
     int num = System.Convert.ToInt32(this.numApartmentCount.Value);
     decimal[] numArray = new decimal[num];
     System.Collections.Generic.Dictionary<Apartment, ApartmentArea> dictionary = new System.Collections.Generic.Dictionary<Apartment, ApartmentArea>(num);
     string[] strArray = new string[num];
     int index = 0;
     foreach (System.Windows.Forms.DataGridViewRow row in (System.Collections.IEnumerable) this.dgvAccounts.Rows)
     {
         numArray[index] = System.Convert.ToDecimal(row.Cells.get_Item("clmnShare").get_Value());
         ApartmentArea area = new ApartmentArea {
             Total = System.Convert.ToDecimal(row.Cells.get_Item("clmnTotalSquare").get_Value()),
             Living = System.Convert.ToDecimal(row.Cells.get_Item("clmnLivingSquare").get_Value()),
             Heating = System.Convert.ToDecimal(row.Cells.get_Item("clmnHeatingSquare").get_Value()),
             Balcony = System.Convert.ToDecimal(row.Cells.get_Item("clmnBalconySquare").get_Value())
         };
         dictionary.Add(list.get_Item(index), area);
         strArray[index] = (row.Cells.get_Item("clmnFlatName").get_Value() == null) ? string.Empty : row.Cells.get_Item("clmnFlatName").get_Value().ToString();
         index = (int) (index + 1);
     }
     System.Collections.Generic.List<ObjectList<ApartmentResident>> list3 = new System.Collections.Generic.List<ObjectList<ApartmentResident>>(num);
     for (index = 0; index < num; index = (int) (index + 1))
     {
         list3.Add(new ObjectList<ApartmentResident>());
     }
     foreach (System.Windows.Forms.DataGridViewRow row2 in (System.Collections.IEnumerable) this.dgvNewApartmentResidents.Rows)
     {
         if (int.TryParse(row2.Cells.get_Item("clmnNumberAprtment").get_Value().ToString(), ref num3))
         {
             list3.get_Item((int) (num3 - 1)).Add(this.bsNewApartmentResidents.get_Item(this.dgvNewApartmentResidents.Rows.IndexOf(row2)) as ApartmentResident);
         }
     }
     System.Collections.Generic.List<ObjectList<ApartmentEquipment>> list4 = new System.Collections.Generic.List<ObjectList<ApartmentEquipment>>(num);
     for (index = 0; index < num; index = (int) (index + 1))
     {
         list4.Add(new ObjectList<ApartmentEquipment>());
     }
     foreach (System.Windows.Forms.DataGridViewRow row3 in (System.Collections.IEnumerable) this.dgvNewApartmentEquipment.Rows)
     {
         if (int.TryParse(row3.Cells.get_Item("clmnApartmentNumberEq").get_Value().ToString(), ref num3))
         {
             list4.get_Item((int) (num3 - 1)).Add(this.bsNewApartmentEquipment.get_Item(this.dgvNewApartmentEquipment.Rows.IndexOf(row3)) as ApartmentEquipment);
         }
         else if (row3.Cells.get_Item("clmnApartmentNumberEq").get_Value().ToString() == "На все")
         {
             foreach (ObjectList<ApartmentEquipment> list5 in list4)
             {
                 list5.Add((this.bsNewApartmentEquipment.get_Item(this.dgvNewApartmentEquipment.Rows.IndexOf(row3)) as ApartmentEquipment).Clone<ApartmentEquipment>());
             }
         }
     }
     if ((this.cbCashlessAccounts.get_Enabled() && (this.cbCashlessAccounts.get_SelectedItem() != null)) && int.TryParse(this.cbCashlessAccounts.get_SelectedItem().ToString(), ref num4))
     {
         num4 = (int) (num4 - 1);
     }
     else
     {
         num4 = -1;
     }
     try
     {
         object[] objArray = new object[] { this.m_OldAccount, this.dtpSplitDate.Value, list, list2, this.m_NewApartmentOwners, list3, list4, numArray, dictionary, strArray, (int) num4, this._apartmentOwnerLinks, this._apartmentResidentLinks, this._equipmentLinks, this.m_AccountHouseHolders };
         base.Invoke(this.SplitApartment, objArray);
         e.set_Result(null);
     }
     catch (System.Exception exception)
     {
         e.set_Result(exception);
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:82,代码来源:SplitApartmentForm.cs

示例8: m_SearchWorker_DoWork

 private void m_SearchWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     ObjectList<Apartment> list;
     this.IsLastInputBarcode = false;
     if (this.m_SearchByNumbersRadio.get_Checked())
     {
         string apartmentNumber = this.m_ApartmentNumberEdit.get_Text().Trim();
         string accountNumber = this.m_AccountEdit.get_Text().Trim();
         if (string.IsNullOrEmpty(apartmentNumber) && string.IsNullOrEmpty(accountNumber))
         {
             throw new System.ApplicationException("Уточните параметры поиска");
         }
         list = Apartment.Search(apartmentNumber, accountNumber, LocalAddress.Null.Id, string.Empty, this.chxShowClose.get_Checked(), string.Empty);
     }
     else if (this.m_SearchByAddressRadio.get_Checked())
     {
         LocalAddress selectedAddress = this.m_LocalAddressSelector.GetSelectedAddress();
         string ownerName = this.m_OwnerNameEdit.get_Text();
         if (((selectedAddress == LocalAddress.Null) || (selectedAddress.Level == AddressLevel.MinAddress)) && string.IsNullOrEmpty(ownerName))
         {
             throw new System.ApplicationException("Уточните параметры поиска");
         }
         list = Apartment.Search(string.Empty, string.Empty, selectedAddress.Id, ownerName, this.chxShowClose.get_Checked(), string.Empty);
     }
     else
     {
         this.IsLastInputBarcode = true;
         string barcode = this.m_BarcodeEdit.get_Text().Trim();
         if (string.IsNullOrEmpty(barcode))
         {
             throw new System.ApplicationException("Уточните параметры поиска");
         }
         list = new ObjectList<Apartment>();
         Apartment apartment = Apartment.FindByNoticeBarcode(barcode);
         if ((apartment != Apartment.Null) && (!this.chxShowClose.get_Checked() || (apartment.ToDate == Constants.NullDate)))
         {
             list.Add(apartment);
         }
     }
     list.ApplySort("AddressName");
     e.set_Result(list);
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:42,代码来源:ApartmentSearchControl.cs

示例9: m_SearchWorker_DoWork

 private void m_SearchWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     if (((this.m_sealId == 0) && (this.m_plombId == 0)) && (this.m_indicationId == 0))
     {
         throw new System.ApplicationException("Уточните параметры поиска");
     }
     ObjectList<Apartment> list = Apartment.SearchWhereCounters(((this.bsServiceType.get_Current() as ServiceType) ?? ServiceType.Null).Id, this.m_sealId, this.m_plombId, this.m_indicationId);
     list.ApplySort("AddressName");
     e.set_Result(list);
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:10,代码来源:CountersSearchControl.cs

示例10: notifyWorker_DoWork

 private void notifyWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     e.set_Result((int) ExchangeRequest.GetReceivedCount());
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:4,代码来源:ChiefMainForm.cs

示例11: m_FileLoadWorker_DoWork

 private void m_FileLoadWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     PayPaymentSystem paymentSystem = (this.bsPaymentSystems.get_Current() as PayPaymentSystem) ?? PayPaymentSystem.Null;
     Organization agent = this.agentSelector.SelectedOrganizationOld ?? Organization.Null;
     System.DateTime paymentOrderDate = (this.dbPaymentOrderDate == null) ? Constants.NullDate : this.dbPaymentOrderDate.Value;
     System.DateTime paymentOrderPeriod = (this.dbPaymentOrderPeriod == null) ? Constants.NullDate : this.dbPaymentOrderPeriod.Value;
     if (paymentOrderPeriod != Constants.NullDate)
     {
         paymentOrderPeriod = System.Convert.ToDateTime(string.Concat((object[]) new object[] { "01.", ((int) paymentOrderPeriod.get_Month()), ".", ((int) paymentOrderPeriod.get_Year()) }));
     }
     string selectedFileName = this.fileNameSelector.SelectedFileName;
     if (!string.IsNullOrEmpty(selectedFileName))
     {
         if ((paymentSystem.Name == "Система Город") || (paymentSystem.Name == "Система \"Город\""))
         {
             ReesterType reeType = ReesterType.OUT_CASHPAY;
             if (this.m_CashPaymentReesterRadio.get_Checked())
             {
                 reeType = ReesterType.OUT_CASHPAY;
             }
             else if (this.m_CashlessPaymentReesterRadio.get_Checked())
             {
                 reeType = ReesterType.OUT_CASHLESS;
             }
             else if (this.m_ReturnReesterRadio.get_Checked())
             {
                 reeType = ReesterType.OUT_STORNO;
             }
             try
             {
                 Reester248 fileRee = new Reester248(reeType, selectedFileName, System.Text.Encoding.GetEncoding(0x4e3));
                 PayReester reester2 = PayReester.SaveCityReesterToDatabase(fileRee, paymentSystem, agent);
                 System.IO.FileInfo info = new System.IO.FileInfo(fileRee.FileName);
                 info.MoveTo(info.Directory + @"\Z_" + info.get_Name());
                 e.set_Result(reester2);
                 return;
             }
             catch (System.Exception exception)
             {
                 throw new System.ApplicationException("Файл реестра: " + selectedFileName, exception);
             }
         }
         string name = string.Empty;
         if (this.m_CashPaymentReesterRadio.get_Checked())
         {
             name = "Наличные платежи";
         }
         else if (this.m_CashlessPaymentReesterRadio.get_Checked())
         {
             name = "Безналичные платежи";
         }
         else if (this.m_ReturnReesterRadio.get_Checked())
         {
             name = "Возвраты платежей";
         }
         else if (this.m_ReturnCashlessReesterRadio.get_Checked())
         {
             name = "Возвраты безналичных платежей";
         }
         FasetItem @null = FasetItem.Null;
         if (name != string.Empty)
         {
             @null = FasetItem.FindByName(FasetsEnum.PaymentsReestrType, name);
         }
         try
         {
             e.set_Result(PayReester.LoadReesterFromFile(selectedFileName, paymentSystem, agent, @null, paymentOrderDate, paymentOrderPeriod));
         }
         catch (System.Exception exception2)
         {
             throw new System.ApplicationException("Файл реестра: " + selectedFileName, exception2);
         }
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:74,代码来源:LoadPayReestersForm.cs

示例12: m_SearchWorker_DoWork

 private void m_SearchWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     string accountNumber = this.m_AccountEdit.get_Text().Trim();
     string barcode = this.m_Barcode.get_Text().Trim();
     string phone = this.m_Phone.get_Text().Trim();
     if ((string.IsNullOrEmpty(accountNumber) && string.IsNullOrEmpty(barcode)) && string.IsNullOrEmpty(phone))
     {
         throw new System.ApplicationException("Уточните параметры поиска");
     }
     ObjectList<AccountOther> list = AccountOther.Search(accountNumber, barcode, phone);
     e.set_Result(list);
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:12,代码来源:AccountSearchControlOtherPayment.cs

示例13: m_StartMinimizationPenalty_DoWork

 private void m_StartMinimizationPenalty_DoWork(object sender, DoWorkEventArgs e)
 {
     System.Data.DataTable table = this.m_Account.PenaltyMinimization(this.m_GroupOperation);
     e.set_Result(table);
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:5,代码来源:PenaltyMinimizationForm.cs

示例14: m_SearchWorker_DoWork

 private void m_SearchWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     ObjectList<Apartment> list = new ObjectList<Apartment>();
     if (this.m_SearchByNumbersRadio.get_Checked())
     {
         string apartmentNumber = this.m_ApartmentNumberEdit.get_Text().Trim();
         string accountNumber = this.m_AccountEdit.get_Text().Trim();
         list = Apartment.Search(apartmentNumber, accountNumber, LocalAddress.Null.Id, string.Empty, this.chxShowClose.get_Checked(), string.Empty);
         if (string.IsNullOrEmpty(apartmentNumber) && string.IsNullOrEmpty(accountNumber))
         {
             this.addressesSearch.Clear();
             for (int i = 0; i < LocalAddress.GetUserAddresses().get_Count(); i = (int) (i + 1))
             {
                 this.addressesSearch.Add(LocalAddress.GetUserAddresses().get_Item(i));
             }
         }
         if (!string.IsNullOrEmpty(apartmentNumber) || !string.IsNullOrEmpty(accountNumber))
         {
             if (list.get_Count() == 0)
             {
                 System.Windows.Forms.MessageBox.Show("По Вашему запросу не найдено адреса.", "Предупреждение", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Asterisk);
                 this.flag = true;
             }
             else
             {
                 this.addressesSearch.Clear();
                 this.addressesSearch.Add(LocalAddress.FindById(list.get_Item(0).AdrId));
             }
         }
     }
     else
     {
         LocalAddress selectedAddress = this.m_LocalAddressSelector.GetSelectedAddress();
         string ownerName = this.m_OwnerNameEdit.get_Text();
         if ((selectedAddress == LocalAddress.Null) && string.IsNullOrEmpty(ownerName))
         {
             list = Apartment.Search(string.Empty, string.Empty, LocalAddress.Null.Id, string.Empty, this.chxShowClose.get_Checked(), string.Empty);
             this.addressesSearch.Clear();
             for (int j = 0; j < LocalAddress.GetUserAddresses().get_Count(); j = (int) (j + 1))
             {
                 this.addressesSearch.Add(LocalAddress.GetUserAddresses().get_Item(j));
             }
         }
         else if ((selectedAddress != LocalAddress.Null) || !string.IsNullOrEmpty(ownerName))
         {
             list = Apartment.Search(string.Empty, string.Empty, selectedAddress.Id, ownerName, this.chxShowClose.get_Checked(), string.Empty);
             if (list.get_Count() == 0)
             {
                 System.Windows.Forms.MessageBox.Show("По Вашему запросу не найдено адреса.", "Предупреждение", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Asterisk);
                 this.flag = true;
             }
             else
             {
                 this.addressesSearch.Clear();
                 if (selectedAddress != LocalAddress.Null)
                 {
                     this.addressesSearch.Add(selectedAddress);
                 }
                 else
                 {
                     this.addressesSearch.Add(LocalAddress.FindById(list.get_Item(0).AdrId));
                 }
             }
         }
     }
     list.ApplySort("AddressName");
     e.set_Result(list);
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:68,代码来源:AddresseSearchControl.cs

示例15: bwArea_DoWork

 private void bwArea_DoWork(object sender, DoWorkEventArgs e)
 {
     if (this.addressesSelectControl1.getChecked)
     {
         if (e.get_Argument() is Area)
         {
             Area area = (Area) e.get_Argument();
             object[] objArray = new object[] { area.GetLocalAddresses(), area.GetInversedCollapsedAddresses() };
             e.set_Result(objArray);
         }
         else if (e.get_Argument() is AreaGroup)
         {
             AreaGroup group = (AreaGroup) e.get_Argument();
             object[] objArray2 = new object[] { group.GetLocalAddresses(), group.GetInversedCollapsedAddresses() };
             e.set_Result(objArray2);
         }
     }
     else
     {
         e.set_Result(e.get_Argument());
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:22,代码来源:AreaAddressesForm.cs


注:本文中的System.ComponentModel.DoWorkEventArgs.set_Result方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。