コード例 #1
0
ファイル: TriggerList.xaml.cs プロジェクト: jjg0519/OA
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            TimingTriggerEdit edit = new TimingTriggerEdit("0", null);

            edit.SaveTimingClick += (obj, ev) =>
            {
                BindTriggerData();
            };
            edit.appSystem = appSystem;
            edit.appModel  = appModel;
            edit.cmbModelCode.ItemsSource    = this.cbModelCode.ItemsSource;
            edit.cmbModelCode.SelectedIndex  = 0;
            edit.cmbSystemCode.ItemsSource   = this.cbSystemCode.ItemsSource;
            edit.cmbSystemCode.SelectedIndex = 0;
            edit.Show();
        }
コード例 #2
0
ファイル: TriggerList.xaml.cs プロジェクト: jjg0519/OA
 private void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (TimingTriggerDataGrid.SelectedItems.Count != 1)
     {
         ComfirmWindow.ConfirmationBox("提示信息", "请选择一条记录进行修改!", "确定");
         return;
     }
     PlatformService.T_WF_TIMINGTRIGGERACTIVITY entity = TimingTriggerDataGrid.SelectedItem as PlatformService.T_WF_TIMINGTRIGGERACTIVITY;
     if (entity != null)
     {
         TimingTriggerEdit edit = new TimingTriggerEdit("1", entity);
         edit.SaveTimingClick += (obj, ev) =>
         {
             BindTriggerData();
         };
         edit.appSystem = appSystem;
         edit.appModel  = appModel;
         edit.cmbModelCode.ItemsSource   = this.cbModelCode.ItemsSource;
         edit.cmbModelCode.SelectedIndex = 0;
         edit.cmbSystemCode.ItemsSource  = this.cbSystemCode.ItemsSource;
         if (this.cbSystemCode.Items.Count > 1)
         {
             for (int i = 0; i < this.cbSystemCode.Items.Count; i++)
             {
                 if ((this.cbSystemCode.Items[i] as FLOW_MODELDEFINE_T).SYSTEMCODE == entity.SYSTEMCODE)
                 {
                     edit.cmbSystemCode.SelectedIndex = i;
                 }
             }
         }
         else
         {
             edit.cmbSystemCode.SelectedIndex = 0;
         }
         edit.cmbModelCode.Selected <FLOW_MODELDEFINE_T>("MODELCODE", entity.MODELCODE);
         edit.Show();
     }
     else
     {
         ComfirmWindow.ConfirmationBox("提示信息", "请选择一条记录进行修改!", "确定");
     }
 }