private void btnAddDevFilter_Click(object sender, EventArgs e) { BaseDataServicePresenter presenter = new BaseDataServicePresenter(); var list = presenter.GetObjectTypeList().ToList(); UCItemListSelect <ObjecttypeDto> ucObjTypeSelect; ucObjTypeSelect = new UCItemListSelect <ObjecttypeDto>(list); List <ColumnDescriptor> columnDescriptor = new List <ColumnDescriptor>(); columnDescriptor.Add(new ColumnDescriptor() { Name = AssemblyReflector.GetMemberName((ObjecttypeDto m) => m.ObjecttypeDesc), Caption = "نام", Width = 150 }); ucObjTypeSelect.AddColumnDescriptor(columnDescriptor); ISE.UILibrary.Utils.UIUtils.SetFrmTrans(ucObjTypeSelect, "انتخاب نوع تجهیز", FormBorderStyle.FixedDialog); if (ucObjTypeSelect.HasSelected) { var selected = ucObjTypeSelect.SelectedItems.FirstOrDefault(); selected.State = Framework.Common.CommonBase.DtoObjectState.Updated; txtDeviceFilter.Text = selected.ObjecttypeDesc; txtDeviceFilter.Tag = selected; if (mode == TransMode.EditRecord) { fcat = new SdFilterCategoryDto() { Objecttypeid = ((ObjecttypeDto)selected).ObjecttypeId, Servicecaegoryid = service.ServiceCatId, State = Framework.Common.CommonBase.DtoObjectState.Updated }; } } }
private void iGridToolBar1_NewRecord(object sender, EventArgs e) { BaseDataServicePresenter presenter = new BaseDataServicePresenter(); var personels = presenter.getPersonelListByInd(22852); // چارت مدیریت آی تی ucExpertSelect = new UCItemListSelect <VwPersonelDto>(personels); List <ColumnDescriptor> column = new List <ColumnDescriptor>(); column.Add(new ColumnDescriptor() { Name = AssemblyReflector.GetMemberName((VwPersonelDto m) => m.PerNo), Caption = "شماره پرسنلی " }); column.Add(new ColumnDescriptor() { Name = AssemblyReflector.GetMemberName((VwPersonelDto m) => m.NationalNo), Caption = "کد ملی " }); column.Add(new ColumnDescriptor() { Name = AssemblyReflector.GetMemberName((VwPersonelDto m) => m.PerFname), Caption = "نام " }); column.Add(new ColumnDescriptor() { Name = AssemblyReflector.GetMemberName((VwPersonelDto m) => m.PerLname), Caption = "نام خانوادگی " }); ucExpertSelect.AddColumnDescriptor(column); ISE.UILibrary.Utils.UIUtils.SetFrmTrans(ucExpertSelect, "فرم انتخاب کارشناس", FormBorderStyle.FixedDialog); if (ucExpertSelect.HasSelected) { var selected = ucExpertSelect.SelectedItems.FirstOrDefault(); SdItExpertDto expert = new SdItExpertDto() { Officeid = cmbOffices.SelectedIndex + 1, Userid = selected.PerId, Personel = selected, IsEnabled = true }; if (officePresenter.AddExpert(expert)) { expBList.Add(expert); } } }