Exemplo n.º 1
0
 public UjfAddChangeCalcAlgsForm(UjfServiceCalcArg calcArgs)
 {
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
     this.serviceCalcArg = calcArgs;
     this.fillAlgsCb();
     for (int i = 0; i < this.algsCb.Items.get_Count(); i = (int) (i + 1))
     {
         if ((this.algsCb.Items.get_Item(i) as UjfHouseServiceCalc).Name == calcArgs.AlgorithmName)
         {
             this.algsCb.set_SelectedIndex(i);
         }
     }
     if (calcArgs.IsNew)
     {
         this.fromDateTb.set_Text(Mappers.CalcPeriodMapper.GetFromDateLastPeriods().ToString());
     }
     else
     {
         this.fromDateTb.set_Text(calcArgs.FromDate.ToString());
     }
     if (!calcArgs.IsNew)
     {
         this.set_Text("Изменить алгоритм");
         this.okBtn.set_Text("Изменить");
     }
 }
Exemplo n.º 2
0
 private void addBtn_Click(object sender, System.EventArgs e)
 {
     UjfServiceCalcArg calcArgs = new UjfServiceCalcArg {
         ServiceId = this.serviceId
     };
     new UjfAddChangeCalcAlgsForm(calcArgs).ShowDialog(this);
     this.updateServiceCalcArgsBindingSource();
 }