Exemple #1
0
 public HouseAddService(UjfHouseService Service)
 {
     this.serviceTypes = new UjfServiceType();
     this.ujfService = new UjfService();
     this.InitializeComponent();
     this.houseService = Service;
     this.set_Font(Manager.WindowFont);
     this.kindFasetData.Faset = FasetsEnum.KindUJF;
     this.kindFasetData.RefreshValuesWithNull();
     this.kindFasetData.SelectedFasetItem = FasetItem.Null;
     this.bsUjfServices.set_DataSource(this.ujfService.GetAll());
     if (!this.houseService.IsNew)
     {
         this.datePeriod.DateBegin = this.houseService.FromDate;
         this.datePeriod.DateEnd = this.houseService.ToDate;
         this.servicesCB.set_SelectedItem(Mappers.UjfServiceMapper.FindById(this.houseService.ServiceId));
         this.kTextBox.set_Text(this.houseService.K.ToString());
         if (this.houseService.KindId != 0)
         {
             this.kindFasetData.SelectedFasetItem = FasetItem.FindById(this.houseService.KindId);
         }
         else
         {
             this.kindFasetData.set_SelectedIndex(0);
         }
         this.set_Text("Изменить услугу");
         this.btnOk.set_Text("Изменить");
     }
 }
 public ujfAddChangeServiceForm(UjfService service)
 {
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
     this.ujfService = service;
     if (!service.IsNew)
     {
         this.set_Text("Редактировать услугу");
         this.okBtn.set_Text("Изменить");
     }
     if (service.Code > 0)
     {
         this.serviceCodeTb.set_Text(((int) this.ujfService.Code).ToString());
     }
     else
     {
         this.serviceCodeTb.set_Text("1");
     }
     this.serviceNameTb.set_Text(this.ujfService.ServiceName);
     this.fillServiceGroupCb();
     for (int i = 0; i < this.serviceGroupCb.Items.get_Count(); i = (int) (i + 1))
     {
         if ((this.serviceGroupCb.Items.get_Item(i) as UjfServiceType).Name == service.ServiceTypeName)
         {
             this.serviceGroupCb.set_SelectedIndex(i);
         }
     }
 }
Exemple #3
0
 public HouseAddService()
 {
     this.serviceTypes = new UjfServiceType();
     this.ujfService = new UjfService();
     this.InitializeComponent();
 }
Exemple #4
0
 private void serviceAddBtn_Click(object sender, System.EventArgs e)
 {
     UjfService service = new UjfService();
     new ujfAddChangeServiceForm(service).ShowDialog();
     this.UpdateujfServicesBindigSource();
 }