public UjfPersonnelAddChangeForm(UjfOrganizationPersonnel op)
 {
     this.personnel = new UjfOrganizationPersonnel();
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
     this.sfdProfessionName.Faset = FasetsEnum.UjfOrganizationPersonnels;
     this.sfdProfessionName.RefreshValuesWithNull();
     this.sfdProfessionName.set_SelectedIndex(0);
     this.personnel = op;
     if (!op.IsNew)
     {
         this.tbName.set_Text(this.personnel.EmployeeName);
         this.sfdProfessionName.SelectedFasetItem = FasetItem.FindById(this.personnel.ProfessionId);
     }
 }
 public UjfOrderPartAddChangeForm(UjfOrderParts od)
 {
     this.order = UjfOrderParts.Null;
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
     this.order = od;
     this.rtbOrderPartName.set_Text(System.Convert.ToString(od.PartName));
     this.dtStartDate.Value = System.Convert.ToDateTime(od.FromDate);
     this.dtEndDate.Value = System.Convert.ToDateTime(od.ToDate);
     this.bsExecuter.set_DataSource(Mappers.UjfOrganizationPersonnelMapper.FindAll());
     UjfOrganizationPersonnel personnel = new UjfOrganizationPersonnel {
         EmployeeName = "Не выбрано",
         Id = 0L
     };
     this.bsExecuter.Insert(0, personnel);
     this.cbExecuter.set_DataSource(this.bsExecuter);
     this.cbExecuter.set_DisplayMember("EmployeeName");
     this.cbExecuter.set_ValueMember("Id");
     this.cbExecuter.set_SelectedValue((long) this.order.ChiefExecuter);
 }
Esempio n. 3
0
 public UjfOrderChangeForm(UjfOrders od)
 {
     this.order = UjfOrders.Null;
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
     this.order = od;
     this.tbNumber.set_Text(System.Convert.ToString(od.Number));
     this.dbxDate.Value = System.Convert.ToDateTime(od.Date);
     this.rtbShortName.set_Text(System.Convert.ToString(od.ShortName));
     this.bsDirectors.set_DataSource(Mappers.UjfOrganizationPersonnelMapper.FindByOrganizationId(od.OrgId));
     this.bsChairmans.set_DataSource(Mappers.UjfOrganizationPersonnelMapper.FindByOrganizationId(od.OrgId));
     UjfOrganizationPersonnel personnel = new UjfOrganizationPersonnel {
         EmployeeName = "Не выбрано",
         Id = 0L
     };
     this.bsDirectors.Insert(0, personnel);
     this.bsChairmans.Insert(0, personnel);
     this.cbDirector.set_DataSource(this.bsDirectors);
     this.cbDirector.set_DisplayMember("EmployeeName");
     this.cbDirector.set_ValueMember("Id");
     this.cbDirector.set_SelectedValue((long) this.order.Director);
     this.cbChairman.set_DataSource(this.bsChairmans);
     this.cbChairman.set_DisplayMember("EmployeeName");
     this.cbChairman.set_ValueMember("Id");
     this.cbChairman.set_SelectedValue((long) this.order.Chairman);
     if (this.base_OrderParts == null)
     {
         this.temp_OrderParts = Mappers.UjfOrderPartsMapper.GetByOrderId(this.order.Id);
         this.base_OrderParts = new ObjectList<UjfOrderParts>();
         if (this.temp_OrderParts.get_Count() > 0)
         {
             foreach (UjfOrderParts parts in this.temp_OrderParts)
             {
                 this.base_OrderParts.Add(parts);
             }
         }
     }
     if (this.base_InsectionList == null)
     {
         this.temp_InsectionList = Mappers.UjfApartmentHouseInspectionMapper.FindByOrderId(this.order.Id);
         this.base_InsectionList = new ObjectList<UjfApartmentHouseInspection>();
         if (this.temp_InsectionList.get_Count() > 0)
         {
             foreach (UjfApartmentHouseInspection inspection in this.temp_InsectionList)
             {
                 this.base_InsectionList.Add(inspection);
             }
         }
     }
     this.UpdateBsOrderParts();
     this.UpdateBsInspections();
     this.ujfSelectCommittee.LoadCommittees(this.order.Id);
 }
 public UjfPersonnelAddChangeForm()
 {
     this.personnel = new UjfOrganizationPersonnel();
     this.InitializeComponent();
 }
Esempio n. 5
0
 private void tsbAddStaff_Click(object sender, System.EventArgs e)
 {
     UjfOrganizationPersonnel op = new UjfOrganizationPersonnel {
         OrganizationId = this.organizationId
     };
     new UjfPersonnelAddChangeForm(op).ShowDialog();
     this.UpdateBsOrganizationPersonnels();
 }