示例#1
0
 private void btnDelect_Click(object sender, RoutedEventArgs e)
 {
     if (DoTaskRuleDataGrid.SelectedItems.Count > 1)
     {
         ComfirmWindow.ConfirmationBox("提示信息", "只能选择一条需要删除的记录!", "确定");
         return;
     }
     if (DoTaskRuleDataGrid.SelectedItems.Count == 1)
     {
         pBar.Start();
         string        Result = "";
         ComfirmWindow com    = new ComfirmWindow();
         com.OnSelectionBoxClosed += (obj, result) =>
         {
             PlatformService.T_WF_DOTASKRULE rule = (DoTaskRuleDataGrid.SelectedItem as PlatformService.T_WF_DOTASKRULE);
             DoTaskClient.DeleteDoTaskRuleAsync(rule.DOTASKRULEID);
         };
         com.SelectionBox("删除确定", "你确定删除选中的记录吗?", ComfirmWindow.titlename, Result);
     }
     else
     {
         //MessageBox.Show("请先选择一条需要删除的记录!");
         ComfirmWindow.ConfirmationBox("提示信息", "请先选择一条需要删除的记录!", "确定");
     }
 }
示例#2
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            if (this.cbModelName.SelectedIndex < 1)
            {
                ComfirmWindow.ConfirmationBox("提示信息", "请选择模块!", "确定");
                return;
            }
            if (this.cbSystemName.SelectedIndex < 1)
            {
                ComfirmWindow.ConfirmationBox("提示信息", "请选择系统!", "确定");
                return;
            }
            if (this.cbCondition.SelectedIndex < 1)
            {
                ComfirmWindow.ConfirmationBox("提示信息", "请选择审核条件!", "确定");
                return;
            }

            if (Rule == null)
            {
                PlatformService.T_WF_DOTASKRULE rule = new PlatformService.T_WF_DOTASKRULE();
                rule.DOTASKRULEID       = Guid.NewGuid().ToString();
                rule.SYSTEMCODE         = (this.cbSystemName.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMCODE;
                rule.SYSTEMNAME         = (this.cbSystemName.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMNAME;
                rule.COMPANYID          = Utility.CurrentUser.OWNERCOMPANYID;
                rule.MODELCODE          = (this.cbModelName.SelectedItem as FLOW_MODELDEFINE_T).MODELCODE;
                rule.MODELNAME          = (this.cbModelName.SelectedItem as FLOW_MODELDEFINE_T).DESCRIPTION;
                rule.TRIGGERORDERSTATUS = this.cbCondition.SelectedIndex;
                Rule = rule;
                client.AddDoTaskRuleAsync(rule);
            }
            else
            {
                PlatformService.T_WF_DOTASKRULE WFrule = new PlatformService.T_WF_DOTASKRULE();
                WFrule.DOTASKRULEID       = Rule.DOTASKRULEID;
                WFrule.SYSTEMCODE         = (this.cbSystemName.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMCODE;
                WFrule.SYSTEMNAME         = (this.cbSystemName.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMNAME;
                WFrule.COMPANYID          = Utility.CurrentUser.OWNERCOMPANYID;
                WFrule.MODELCODE          = (this.cbModelName.SelectedItem as FLOW_MODELDEFINE_T).MODELCODE;
                WFrule.MODELNAME          = (this.cbModelName.SelectedItem as FLOW_MODELDEFINE_T).DESCRIPTION;
                WFrule.TRIGGERORDERSTATUS = this.cbCondition.SelectedIndex;
                client.EditDoTaskRuleAsync(WFrule);
            }
        }
示例#3
0
        public DoTaskRuleDetailEdit(PlatformService.T_WF_DOTASKRULE rule)
        {
            InitializeComponent();
            client.AddDoTaskRuleCompleted  += new EventHandler <AddDoTaskRuleCompletedEventArgs>(client_AddDoTaskRuleCompleted);
            client.EditDoTaskRuleCompleted += new EventHandler <EditDoTaskRuleCompletedEventArgs>(client_EditDoTaskRuleCompleted);

            client.GetDoTaskRuleDetailCompleted    += new EventHandler <GetDoTaskRuleDetailCompletedEventArgs>(client_GetDoTaskRuleDetailCompleted);
            client.DeleteDoTaskRuleDetailCompleted += new EventHandler <DeleteDoTaskRuleDetailCompletedEventArgs>(client_DeleteDoTaskRuleDetailCompleted);
            if (rule != null)
            {
                DetailItem.Visibility = Visibility.Visible;
                Rule = rule;
                InitEdit();
                client.GetDoTaskRuleDetailAsync(Rule.DOTASKRULEID);
            }
            else
            {
                DetailItem.Visibility = Visibility.Collapsed;
            }
        }
示例#4
0
 private void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (DoTaskRuleDataGrid.SelectedItems.Count == 1)
     {
         PlatformService.T_WF_DOTASKRULE Rule = DoTaskRuleDataGrid.SelectedItem as PlatformService.T_WF_DOTASKRULE;
         DoTaskRuleDetailEdit            edit = new DoTaskRuleDetailEdit(Rule);
         edit.SaveDetailClick += (obj, ev) =>
         {
             BindRuleData();
         };
         edit.appSystem = appSystem;
         edit.appModel  = appModel;
         edit.cbModelName.ItemsSource    = this.cbModelCode.ItemsSource;
         edit.cbModelName.SelectedIndex  = 0;
         edit.cbSystemName.ItemsSource   = this.cbSystemCode.ItemsSource;
         edit.cbSystemName.SelectedIndex = 0;
         for (int i = 0; i < edit.cbSystemName.Items.Count(); i++)
         {
             if ((edit.cbSystemName.Items[i] as FLOW_MODELDEFINE_T).SYSTEMCODE == Rule.SYSTEMCODE)
             {
                 edit.cbSystemName.SelectedIndex = i;
             }
         }
         for (int i = 0; i < edit.cbModelName.Items.Count(); i++)
         {
             if ((edit.cbModelName.Items[i] as FLOW_MODELDEFINE_T).MODELCODE == Rule.MODELCODE)
             {
                 edit.cbModelName.SelectedIndex = i;
             }
         }
         edit.Show();
     }
     else if (DoTaskRuleDataGrid.SelectedItems.Count > 1)
     {
         ComfirmWindow.ConfirmationBox("提示信息", "只能选择一条需要修改的记录", "确定");
     }
     else
     {
         ComfirmWindow.ConfirmationBox("提示信息", "请先选择一条需要修改的记录!", "确定");
     }
 }
示例#5
0
        public DoTaskRuleDetailEdit(PlatformService.T_WF_DOTASKRULE rule)
        {
            InitializeComponent();
            client.AddDoTaskRuleCompleted += new EventHandler<AddDoTaskRuleCompletedEventArgs>(client_AddDoTaskRuleCompleted);
            client.EditDoTaskRuleCompleted += new EventHandler<EditDoTaskRuleCompletedEventArgs>(client_EditDoTaskRuleCompleted);

            client.GetDoTaskRuleDetailCompleted += new EventHandler<GetDoTaskRuleDetailCompletedEventArgs>(client_GetDoTaskRuleDetailCompleted);
            client.DeleteDoTaskRuleDetailCompleted += new EventHandler<DeleteDoTaskRuleDetailCompletedEventArgs>(client_DeleteDoTaskRuleDetailCompleted);
            if (rule != null)
            {
                DetailItem.Visibility = Visibility.Visible;
                Rule = rule;
                InitEdit();
                client.GetDoTaskRuleDetailAsync(Rule.DOTASKRULEID);

            }
            else
            {
                DetailItem.Visibility = Visibility.Collapsed;
            }
        }
示例#6
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            if (this.cbModelName.SelectedIndex < 1)
            {
                ComfirmWindow.ConfirmationBox("提示信息", "请选择模块!", "确定");
                return;
            }
            if (this.cbSystemName.SelectedIndex < 1)
            {
                ComfirmWindow.ConfirmationBox("提示信息", "请选择系统!", "确定");
                return;
            }
            if (this.cbCondition.SelectedIndex < 1)
            {
                ComfirmWindow.ConfirmationBox("提示信息", "请选择审核条件!", "确定");
                return;
            }

            if (Rule == null)
            {
                PlatformService.T_WF_DOTASKRULE rule = new PlatformService.T_WF_DOTASKRULE();
                rule.DOTASKRULEID = Guid.NewGuid().ToString();
                rule.SYSTEMCODE = (this.cbSystemName.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMCODE;
                rule.SYSTEMNAME = (this.cbSystemName.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMNAME;
                rule.COMPANYID = Utility.CurrentUser.OWNERCOMPANYID;
                rule.MODELCODE = (this.cbModelName.SelectedItem as FLOW_MODELDEFINE_T).MODELCODE;
                rule.MODELNAME = (this.cbModelName.SelectedItem as FLOW_MODELDEFINE_T).DESCRIPTION;
                rule.TRIGGERORDERSTATUS = this.cbCondition.SelectedIndex;
                Rule = rule;
                client.AddDoTaskRuleAsync(rule);
            }
            else
            {
                PlatformService.T_WF_DOTASKRULE WFrule = new PlatformService.T_WF_DOTASKRULE();
                WFrule.DOTASKRULEID = Rule.DOTASKRULEID;
                WFrule.SYSTEMCODE = (this.cbSystemName.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMCODE;
                WFrule.SYSTEMNAME = (this.cbSystemName.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMNAME;
                WFrule.COMPANYID = Utility.CurrentUser.OWNERCOMPANYID;
                WFrule.MODELCODE = (this.cbModelName.SelectedItem as FLOW_MODELDEFINE_T).MODELCODE;
                WFrule.MODELNAME = (this.cbModelName.SelectedItem as FLOW_MODELDEFINE_T).DESCRIPTION;
                WFrule.TRIGGERORDERSTATUS = this.cbCondition.SelectedIndex;
                client.EditDoTaskRuleAsync(WFrule);
            }
        }