/// <summary> /// لیستی از گروه محدوده محاسبات را برمیگرداند /// </summary> /// <returns>لیست گروه محدوده محاسبات</returns> public IList <CalculationRangeGroup> GetAllCalculationRangeGroup() { try { BDateRange busRAnge = new BDateRange(); return(busRAnge.GetAll()); } catch (Exception ex) { LogException(ex, "BAssignDateRange", "GetAllCalculationRangeGroup"); throw ex; } }
public void TestSetup() { businessDateRange = new BDateRange(); dateRange_testObject = new CalculationDateRange(); group_testObject = new CalculationRangeGroup(); dateRangList_testObject = new List <CalculationDateRange>(); personTA.InsertQuery("0000", "ali", true, null); int personId = Convert.ToInt32(personTA.GetDataByBarcode("0000")[0][0]); groupTA.Insert("RangeGroup", "", 1); DatabaseGateway.TA_CalculationRangeGroupDataTable groupTable = new DatabaseGateway.TA_CalculationRangeGroupDataTable(); groupTA.FillByGroupName(groupTable, "RangeGroup"); ADOGroup.ID = Convert.ToDecimal(groupTable.Rows[0]["CalcRangeGroup_ID"]); ADOGroup.Name = Convert.ToString(groupTable.Rows[0]["CalcRangeGroup_Name"]); ADOGroup.Description = Convert.ToString(groupTable.Rows[0]["CalcRangeGroup_Des"]); assinTA.Insert(personId, ADOGroup.ID, DateTime.Now); DatabaseGateway.TA_ConceptTemplateDataTable concepts = new DatabaseGateway.TA_ConceptTemplateDataTable(); concepts = conceptTA.GetDataRangly(); ADOConcept1.ID = Convert.ToDecimal(concepts.Rows[0]["concepttmp_ID"]); ADOConcept2.ID = Convert.ToDecimal(concepts.Rows[1]["concepttmp_ID"]); ADOConcept3.ID = Convert.ToDecimal(concepts.Rows[2]["concepttmp_ID"]); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 1, 14, 2, 1); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 2, 14, 3, 2); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 3, 14, 4, 3); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 4, 14, 5, 4); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 5, 14, 6, 5); dateRangeTA.Insert(ADOConcept2.ID, ADOGroup.ID, 15, 1, 14, 2, 1); dateRangeTA.Insert(ADOConcept2.ID, ADOGroup.ID, 15, 2, 14, 3, 2); dateRangeTA.Insert(ADOConcept2.ID, ADOGroup.ID, 15, 3, 14, 4, 3); dateRangeTA.Insert(ADOConcept2.ID, ADOGroup.ID, 15, 4, 14, 5, 4); dateRangeTA.Insert(ADOConcept2.ID, ADOGroup.ID, 15, 5, 14, 6, 5); DatabaseGateway.TA_CalculationDateRangeDataTable rangeTable = new DatabaseGateway.TA_CalculationDateRangeDataTable(); dateRangeTA.FillByGroup(rangeTable, ADOGroup.ID); ADODateRange1.ID = Convert.ToDecimal(rangeTable.Rows[0]["CalcDateRange_ID"]); ADODateRange2.ID = Convert.ToDecimal(rangeTable.Rows[1]["CalcDateRange_ID"]); ADODateRange3.ID = Convert.ToDecimal(rangeTable.Rows[2]["CalcDateRange_ID"]); ADODateRange4.ID = Convert.ToDecimal(rangeTable.Rows[3]["CalcDateRange_ID"]); ADODateRange5.ID = Convert.ToDecimal(rangeTable.Rows[4]["CalcDateRange_ID"]); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 1, ToDay = 31, ToMonth = 1, Order = CalculationDateRangeOrder.Month1 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 2, ToDay = 31, ToMonth = 2, Order = CalculationDateRangeOrder.Month2 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 3, ToDay = 31, ToMonth = 3, Order = CalculationDateRangeOrder.Month3 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 4, ToDay = 31, ToMonth = 4, Order = CalculationDateRangeOrder.Month4 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 5, ToDay = 31, ToMonth = 5, Order = CalculationDateRangeOrder.Month5 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 6, ToDay = 31, ToMonth = 6, Order = CalculationDateRangeOrder.Month6 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 7, ToDay = 31, ToMonth = 7, Order = CalculationDateRangeOrder.Month7 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 8, ToDay = 31, ToMonth = 8, Order = CalculationDateRangeOrder.Month8 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 9, ToDay = 31, ToMonth = 9, Order = CalculationDateRangeOrder.Month9 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 10, ToDay = 31, ToMonth = 10, Order = CalculationDateRangeOrder.Month10 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 11, ToDay = 31, ToMonth = 11, Order = CalculationDateRangeOrder.Month11 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 12, ToDay = 29, ToMonth = 12, Order = CalculationDateRangeOrder.Month12 }); }
public void TestSetup() { #region organization unit DatabaseGateway.TA_OrganizationUnitDataTable organTable = new DatabaseGateway.TA_OrganizationUnitDataTable(); organTable = organTA.GetDataByParent(); ADOOrganRoot.ID = Convert.ToInt32(organTable.Rows[0]["organ_ID"]); ADOOrganRoot.Name = Convert.ToString(organTable.Rows[0]["organ_Name"]); ADOOrganRoot.CustomCode = Convert.ToString(organTable.Rows[0]["organ_CustomCode"]); organTA.Insert("Level2_1", "2020_11", ADOPerson2.ID, ADOOrganRoot.ID, String.Format(",{0},", ADOOrganRoot.ID)); organTable = organTA.GetDataByCustomCode("2020_11"); ADOOrgan.ID = Convert.ToInt32(organTable.Rows[0]["organ_ID"]); ADOOrgan.Name = Convert.ToString(organTable.Rows[0]["organ_Name"]); ADOOrgan.CustomCode = Convert.ToString(organTable.Rows[0]["organ_CustomCode"]); #endregion #region managers managerTA.Insert(ADOPerson1.ID, null); DatasetGatewayWorkFlow.TA_ManagerDataTable masterTable = managerTA.GetDataByPersonID(ADOPerson1.ID); ADOManager1.ID = Convert.ToInt32(masterTable.Rows[0]["MasterMng_ID"]); ADOManager1.Person = ADOPerson1; ADOManager1.OrganizationUnit = null; managerTA.Insert(null, ADOOrgan.ID); masterTable = managerTA.GetDataByOrganID(ADOOrgan.ID); ADOManager2.ID = Convert.ToInt32(masterTable.Rows[0]["MasterMng_ID"]); ADOManager2.Person = null; ADOManager2.OrganizationUnit = ADOOrgan; managerTA.Insert(ADOPerson3.ID, null); masterTable = managerTA.GetDataByPersonID(ADOPerson3.ID); ADOManager3.ID = Convert.ToInt32(masterTable.Rows[0]["MasterMng_ID"]); ADOManager3.Person = ADOPerson3; ADOManager3.OrganizationUnit = null; #endregion #region pishcart access group precardAccessGroupTA.Insert("PrecardAccessGroupTest"); DatasetGatewayWorkFlow.TA_PrecardAccessGroupDataTable accessTable = precardAccessGroupTA.GetDataBy1("PrecardAccessGroupTest"); ADOaccessGroup.ID = Convert.ToInt32(accessTable.Rows[0]["accessGrp_ID"]); ADOaccessGroup.Name = Convert.ToString(accessTable.Rows[0]["accessGrp_Name"]); #endregion #region Flow flowTA.Insert(ADOaccessGroup.ID, false, false, "FlowTest1"); DatasetGatewayWorkFlow.TA_FlowDataTable flowTable = flowTA.GetDataByName("FlowTest1"); ADOFlow1.ID = Convert.ToInt32(flowTable.Rows[0]["flow_ID"]); ADOFlow1.AccessGroup = ADOaccessGroup; ADOFlow1.ActiveFlow = false; ADOFlow1.WorkFlow = false; ADOFlow1.FlowName = "FlowTest1"; flowTA.Insert(ADOaccessGroup.ID, false, false, "FlowTest2"); flowTable = flowTA.GetDataByName("FlowTest2"); ADOFlow2.ID = Convert.ToInt32(flowTable.Rows[0]["flow_ID"]); ADOFlow2.AccessGroup = ADOaccessGroup; ADOFlow2.ActiveFlow = false; ADOFlow2.WorkFlow = false; ADOFlow2.FlowName = "FlowTest2"; flowTA.Insert(ADOaccessGroup.ID, false, false, "FlowTest3"); flowTable = flowTA.GetDataByName("FlowTest3"); ADOFlow3.ID = Convert.ToInt32(flowTable.Rows[0]["flow_ID"]); ADOFlow3.AccessGroup = ADOaccessGroup; ADOFlow3.ActiveFlow = false; ADOFlow3.WorkFlow = false; ADOFlow3.FlowName = "FlowTest3"; #endregion #region manager Flow managerFlowTA.Insert(ADOManager1.ID, 1, ADOFlow1.ID, true); managerFlowTA.Insert(ADOManager1.ID, 2, ADOFlow2.ID, true); managerFlowTA.Insert(ADOManager3.ID, 2, ADOFlow3.ID, true); #endregion #region under managment undermanagmentTA.Insert(ADOFlow1.ID, ADOPerson2.ID, ADODepartment1.ID, false, true); undermanagmentTA.Insert(ADOFlow1.ID, ADOPerson5.ID, ADODepartment1.ID, false, true); DatasetGatewayWorkFlow.TA_UnderManagmentDataTable underManagmentTable = new DatasetGatewayWorkFlow.TA_UnderManagmentDataTable(); underManagmentTable = undermanagmentTA.GetDataByManagmentID(ADOFlow1.ID); ADOUnderManagment.ID = Convert.ToInt32(underManagmentTable.Rows[0]["underMng_ID"]); ADOUnderManagment.Contains = true; ADOUnderManagment.ContainInnerChilds = false; ADOUnderManagment.Person = ADOPerson2; ADOUnderManagment.Flow = ADOFlow1; undermanagmentTA.Insert(ADOFlow2.ID, ADOPerson4.ID, ADODepartment1.ID, false, true); undermanagmentTA.Insert(ADOFlow3.ID, ADOPerson5.ID, null, false, true); #endregion bussWorkTime = new BWorkedTime(ADOUser1.UserName); #region date range init businessDateRange = new BDateRange(); dateRange_testObject = new CalculationDateRange(); group_testObject = new CalculationRangeGroup(); dateRangList_testObject = new List <CalculationDateRange>(); groupTA.Insert("TestRangeGroup", "", 1); DatabaseGateway.TA_CalculationRangeGroupDataTable groupTable = new DatabaseGateway.TA_CalculationRangeGroupDataTable(); groupTA.FillByGroupName(groupTable, "TestRangeGroup"); ADOGroup.ID = Convert.ToDecimal(groupTable.Rows[0]["CalcRangeGroup_ID"]); ADOGroup.Name = Convert.ToString(groupTable.Rows[0]["CalcRangeGroup_Name"]); ADOGroup.Description = Convert.ToString(groupTable.Rows[0]["CalcRangeGroup_Des"]); assinTA.Insert(ADOPerson3.ID, ADOGroup.ID, Utility.ToMildiDate("1390/05/01")); assinTA.Insert(ADOPerson4.ID, ADOGroup.ID, Utility.ToMildiDate("1389/01/01")); DatabaseGateway.TA_ConceptTemplateDataTable concepts = new DatabaseGateway.TA_ConceptTemplateDataTable(); concepts = conceptTA.GetDataByyRanglyConceptsNotNullKeys(); ADOConcept1.ID = Convert.ToDecimal(concepts.Rows[0]["concepttmp_ID"]); ADOConcept2.ID = Convert.ToDecimal(concepts.Rows[1]["concepttmp_ID"]); ADOConcept3.ID = Convert.ToDecimal(concepts.Rows[2]["concepttmp_ID"]); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 1, 14, 2, 1); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 2, 14, 3, 2); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 3, 14, 4, 3); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 4, 14, 5, 4); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 5, 14, 6, 5); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 6, 14, 7, 6); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 7, 14, 8, 7); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 8, 14, 9, 8); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 9, 14, 10, 9); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 10, 14, 11, 10); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 11, 14, 12, 11); dateRangeTA.Insert(ADOConcept1.ID, ADOGroup.ID, 15, 12, 14, 1, 12); DatabaseGateway.TA_CalculationDateRangeDataTable rangeTable = new DatabaseGateway.TA_CalculationDateRangeDataTable(); dateRangeTA.FillByGroup(rangeTable, ADOGroup.ID); ADODateRange1.ID = Convert.ToDecimal(rangeTable.Rows[0]["CalcDateRange_ID"]); ADODateRange2.ID = Convert.ToDecimal(rangeTable.Rows[1]["CalcDateRange_ID"]); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 1, ToDay = 31, ToMonth = 1, Order = CalculationDateRangeOrder.Month1 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 2, ToDay = 31, ToMonth = 2, Order = CalculationDateRangeOrder.Month2 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 3, ToDay = 31, ToMonth = 3, Order = CalculationDateRangeOrder.Month3 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 4, ToDay = 31, ToMonth = 4, Order = CalculationDateRangeOrder.Month4 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 5, ToDay = 31, ToMonth = 5, Order = CalculationDateRangeOrder.Month5 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 6, ToDay = 31, ToMonth = 6, Order = CalculationDateRangeOrder.Month6 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 7, ToDay = 31, ToMonth = 7, Order = CalculationDateRangeOrder.Month7 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 8, ToDay = 31, ToMonth = 8, Order = CalculationDateRangeOrder.Month8 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 9, ToDay = 31, ToMonth = 9, Order = CalculationDateRangeOrder.Month9 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 10, ToDay = 31, ToMonth = 10, Order = CalculationDateRangeOrder.Month10 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 11, ToDay = 31, ToMonth = 11, Order = CalculationDateRangeOrder.Month11 }); dateRangList_testObject.Add(new CalculationDateRange() { FromDay = 1, FromMonth = 12, ToDay = 29, ToMonth = 12, Order = CalculationDateRangeOrder.Month12 }); #endregion }
private Person GetReadyForUpdate(decimal personid, SysLanguageResource sys, LocalLanguageResource local) { try { busPerson = new BPerson(sys, local); if (personid == 0) { person_testObject.ID = busPerson.CreateWorkingPerson2(); ClearSession(); } else { person_testObject.ID = personid; } person_testObject.PersonDetail = new PersonDetail(); #region Assigns BAssignWorkGroup bAssginWorkGroup = new BAssignWorkGroup(SysLanguageResource.Parsi); BWorkgroup workgroup = new BWorkgroup(); decimal wID = workgroup.SaveChanges(new WorkGroup() { Name = "WorkGroupTest3", CustomCode = "0-3" }, UIActionType.ADD); AssignWorkGroup aw = new AssignWorkGroup(); aw.UIFromDate = Utility.ToPersianDate(DateTime.Now); aw.WorkGroup = new WorkGroup() { ID = wID, Name = "WorkGroupTest3" }; aw.Person = new Person() { ID = person_testObject.ID }; bAssginWorkGroup.SaveChanges(aw, UIActionType.ADD); BAssignRule bAssginRule = new BAssignRule(SysLanguageResource.Parsi); BRuleCategory bruleCat = new BRuleCategory(); bruleCat.EnableInsertValidate = false; decimal rID = bruleCat.SaveChanges(new RuleCategory() { Name = "RuleCatTest3", CustomCode = "00-00test2" }, UIActionType.ADD); PersonRuleCatAssignment pa = new PersonRuleCatAssignment(); pa.UIFromDate = Utility.ToPersianDate(new DateTime(2016, 1, 1)); pa.UIToDate = Utility.ToPersianDate(new DateTime(2017, 1, 1)); pa.RuleCategory = new RuleCategory() { ID = rID, Name = "RuleCatTest3" }; pa.Person = new Person() { ID = person_testObject.ID }; bAssginRule.SaveChanges(pa, UIActionType.ADD); BAssignDateRange bDateRange = new BAssignDateRange(SysLanguageResource.Parsi); PersonRangeAssignment rangeAssign = new PersonRangeAssignment(); BDateRange bdate = new BDateRange(); decimal rangeId = bdate.SaveChanges(new CalculationRangeGroup() { Name = "CalcGroup3" }, UIActionType.ADD); ClearSession(); rangeAssign.CalcDateRangeGroup = new CalculationRangeGroup() { ID = rangeId }; if (sys == SysLanguageResource.Parsi) { rangeAssign.UIFromDate = "1390/01/01"; } else { rangeAssign.UIFromDate = "1390/01/01"; //Utility.ToString(Utility.ToMildiDate("1390/01/01")); } rangeAssign.Person = new Person() { ID = person_testObject.ID }; bDateRange.SaveChanges(rangeAssign, UIActionType.ADD); //جهت درج //person_testObject.PersonRangeAssignList = new List<PersonRangeAssignment>(); //person_testObject.PersonRangeAssignList.Add(rangeAssign); #endregion #region Dep DatabaseGatewayTableAdapters.TA_DepartmentTableAdapter departmentTA = new GTSTestUnit.Clock.Business.DatabaseGatewayTableAdapters.TA_DepartmentTableAdapter(); decimal departmentId = Convert.ToDecimal(departmentTA.InsertQuery("Level1", "123", 1, ",1,", "")); DatabaseGatewayTableAdapters.TA_OrganizationUnitTableAdapter organTA = new GTSTestUnit.Clock.Business.DatabaseGatewayTableAdapters.TA_OrganizationUnitTableAdapter(); organTA.InsertQuery("OrganTestLevel1", "0-0Test", null, 1, String.Format(",{0},", 1)); decimal organId = Convert.ToDecimal(organTA.GetDataByCustomCode("0-0Test")[0]["organ_ID"]); DatabaseGatewayTableAdapters.TA_ControlStationTableAdapter sataionTA = new GTSTestUnit.Clock.Business.DatabaseGatewayTableAdapters.TA_ControlStationTableAdapter(); sataionTA.Insert("StationTest1", "0-0Test"); decimal stationId = Convert.ToDecimal(sataionTA.GetDataByCustomCode("0-0Test")[0]["station_ID"]); DatabaseGatewayTableAdapters.TA_EmploymentTypeTableAdapter emplTA = new GTSTestUnit.Clock.Business.DatabaseGatewayTableAdapters.TA_EmploymentTypeTableAdapter(); emplTA.Insert("EmploymentTypeTest1", "0-0Test"); decimal employeeId = Convert.ToDecimal(emplTA.GetDataByCustomCode("0-0Test")[0]["emply_ID"]); #endregion #region UIValidatinGroup DatabaseGatewayTableAdapters.TA_UIValidationGroupTableAdapter validationGroupTA = new GTSTestUnit.Clock.Business.DatabaseGatewayTableAdapters.TA_UIValidationGroupTableAdapter(); UIValidationGroup ADOUIValidationGroupEmpty = new UIValidationGroup(); validationGroupTA.InsertQuery("TestGroup00"); DatabaseGateway.TA_UIValidationGroupDataTable groupTable = validationGroupTA.GetDataByName("TestGroup00"); ADOUIValidationGroupEmpty.ID = (groupTable.Rows[0] as DatabaseGateway.TA_UIValidationGroupRow).UIValGrp_ID; person_testObject.UIValidationGroup = ADOUIValidationGroupEmpty; #endregion person_testObject.FirstName = "Iraj"; person_testObject.LastName = "Bahadori"; person_testObject.PersonDetail.FatherName = "Gholzoom"; person_testObject.PersonDetail.FatherName = "0082111098"; person_testObject.PersonDetail.BirthCertificate = "22777"; person_testObject.PersonDetail.BirthPlace = "Sorhe"; person_testObject.Education = "لیسانس"; person_testObject.PersonDetail.Status = "رو هوا"; person_testObject.PersonDetail.Tel = "23444343"; person_testObject.PersonDetail.Address = ""; person_testObject.PersonCode = "00001222"; person_testObject.CardNum = "4345554"; person_testObject.EmploymentNum = "123A342-ad"; person_testObject.Sex = PersonSex.Male; person_testObject.MaritalStatus = MaritalStatus.Motaleghe; person_testObject.PersonDetail.MilitaryStatus = MilitaryStatus.HeineKhedmat; person_testObject.Department = new global::GTS.Clock.Model.Charts.Department() { ID = departmentId }; person_testObject.OrganizationUnit = new global::GTS.Clock.Model.Charts.OrganizationUnit() { ID = organId, PersonID = person_testObject.ID, Name = "OrganTestLevel1", CustomCode = "0-0", ParentID = 1 }; person_testObject.ControlStation = new global::GTS.Clock.Model.BaseInformation.ControlStation() { ID = stationId }; person_testObject.EmploymentType = new global::GTS.Clock.Model.BaseInformation.EmploymentType() { ID = employeeId }; if (sys == SysLanguageResource.Parsi) { person_testObject.UIEmploymentDate = "1380/05/03"; person_testObject.UIEndEmploymentDate = "1390/05/03"; person_testObject.PersonDetail.UIBirthDate = "1390/05/03"; } else { person_testObject.UIEmploymentDate = Utility.ToString(Utility.ToMildiDate("1380/05/03")); person_testObject.UIEndEmploymentDate = Utility.ToString(Utility.ToMildiDate("1390/05/03")); person_testObject.PersonDetail.UIBirthDate = Utility.ToString(Utility.ToMildiDate("1390/05/03")); } ClearSession(); return(person_testObject); } catch (Exception ex) { throw ex; } }