void InitDetail() { if (Entity.ISDEFAULTMSG == 1) { chkIsMsg.IsChecked = true; } if (Entity.ISOTHERSOURCE == "1") { chkOther.IsChecked = true; } txtAvailabilityProcessDates.Text = Entity.LASTDAYS.ToString(); if (!string.IsNullOrEmpty(Entity.RECEIVEUSERNAME)) { OrgObj = new SaaS.FrameworkUI.OrganizationControl.ExtOrgObj(); OrgObj.ObjectID = Entity.OWNERPOSTID; OrgObj.ObjectName = Entity.RECEIVEUSERNAME; txtReceiveUser.Text = Entity.RECEIVEUSERNAME; } if (!string.IsNullOrEmpty(Entity.FUNCTIONPARAMTER)) { listpatrm.Clear(); ObservableCollection <Param> Params = ParamOperate.FieldToCollection(Entity.FUNCTIONPARAMTER); if (Params.Count > 0) { foreach (Param p in Params) { listpatrm.Add(p); } } RowList.ItemsSource = listpatrm; } this.txtMessageBody.Text = Entity.MESSAGEBODY; }
private void btnSave_Click(object sender, RoutedEventArgs e) { if (txtMSGCONTENT.Text.Trim() == "") { ComfirmWindow.ConfirmationBox("提示信息", "消息内容不能为空!", "确定"); return; } FLOW_MODELDEFINE_T system = cobSYSTEMCODE.SelectedItem as FLOW_MODELDEFINE_T; FLOW_MODELDEFINE_T model = cobMODELCODE.SelectedItem as FLOW_MODELDEFINE_T; if (system.SYSTEMCODE == "0" || model.MODELCODE == "0") { ComfirmWindow.ConfirmationBox("提示信息", "请正确选择 [系统]和[模块]!", "确定"); return; } PlatformService.T_WF_MESSAGEBODYDEFINE entity = new PlatformService.T_WF_MESSAGEBODYDEFINE(); entity.MESSAGEBODY = ParamOperate.MessageBodyExchange(ListTableColumn.ToList(), true, txtMSGCONTENT.Text); entity.MESSAGEURL = txtURL.Text.Trim(); entity.SYSTEMCODE = (cobSYSTEMCODE.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMCODE; entity.MODELCODE = (cobMODELCODE.SelectedItem as FLOW_MODELDEFINE_T).MODELCODE; entity.COMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; entity.RECEIVETYPE = this.rBRole.IsChecked == true ? 0 : 1; if (entity.RECEIVETYPE == 0 && OrgObjPost != null && OrgObjPost.Count > 0) { foreach (var item in OrgObjPost) { entity.RECEIVEPOSTID += item.ObjectID + ","; entity.RECEIVEPOSTNAME += item.ObjectName + ","; } entity.RECEIVEPOSTID = entity.RECEIVEPOSTID.TrimEnd(','); entity.RECEIVEPOSTNAME = entity.RECEIVEPOSTNAME.TrimEnd(','); } else if (entity.RECEIVETYPE == 1 && OrgObj != null && OrgObj.Count > 0) { foreach (var item in OrgObj) { entity.RECEIVERUSERID += item.ObjectID + ","; entity.RECEIVERUSERNAME += item.ObjectName + ","; } entity.RECEIVERUSERID = entity.RECEIVERUSERID.TrimEnd(','); entity.RECEIVERUSERNAME = entity.RECEIVERUSERNAME.TrimEnd(','); } if (ActionType == "0") { entity.DEFINEID = Guid.NewGuid().ToString(); entity.CREATEDATE = DateTime.Now; entity.CREATEUSERNAME = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName; entity.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; entity.COMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; messageClient.AddDefaultMessgeAsync(entity); } else { entity.DEFINEID = DEFINEID; messageClient.EditDefaultMessgeAsync(entity); } //this.DialogResult = true; }
void InitTiming() { this.txtTriggerName.Text = Entity.TRIGGERNAME; this.myTime.Value = Entity.TRIGGERTIME; this.myDate.Text = Entity.TRIGGERTIME.ToShortDateString(); if (Entity.TRIGGERTYPE == "User") { rbUser.IsChecked = true; rbSystem.IsChecked = false; } else { rbUser.IsChecked = false; rbSystem.IsChecked = true; } if (Entity.TRIGGERACTIVITYTYPE == 1) { rbSMS.IsChecked = true; rbService.IsChecked = false; } else { rbSMS.IsChecked = false; rbService.IsChecked = true; } for (int i = 0; i < ListCycle.Count; i++) { if (CycleOperate.CycleExchangeTo(ListCycle[i].CycleType) == Entity.TRIGGERROUND) { this.cmbCycle.SelectedIndex = i; } } if (!string.IsNullOrEmpty(Entity.FUNCTIONPARAMTER)) { listpatrm.Clear(); ObservableCollection <Param> Params = ParamOperate.FieldToCollection(Entity.FUNCTIONPARAMTER); if (Params.Count > 0) { foreach (Param p in Params) { listpatrm.Add(p); } } this.txtValue.Text = Params[0].FieldName; RowList.ItemsSource = listpatrm; } }
private void btnSaveParam_Click(object sender, RoutedEventArgs e) { if (this.txtValue.Text.Trim() != "" && cmbFunc.SelectedIndex > 0) { listpatrm = ParamOperate.Init(); Parameter param = this.cmbParameter.SelectedItem as Parameter; Param paramClass = new Param(); paramClass.ParamName = param.Description; paramClass.ParamID = param.Name; paramClass.FieldName = this.txtValue.Text.Trim(); paramClass.FieldID = this.txtValue.Text.Trim(); paramClass.TableName = param.TableName; paramClass.Description = param.Description; listpatrm.Add(paramClass); RowList.ItemsSource = listpatrm; } else { ComfirmWindow.ConfirmationBox("提示信息", "功能参数和参数赋值不能为空!", "确定"); } }
private T_WF_DOTASKRULEDETAIL GetDetail(string action) { if (action == "0") { Entity = new T_WF_DOTASKRULEDETAIL(); Entity.DOTASKRULEDETAILID = Guid.NewGuid().ToString(); } Entity.DOTASKRULEID = RuleID; Entity.COMPANYID = Utility.CurrentUser.OWNERCOMPANYID; Entity.OWNERCOMPANYID = Utility.CurrentUser.OWNERCOMPANYID; Entity.CREATEUSERID = Utility.CurrentUser.OWNERID; Entity.OWNERDEPARTMENTID = Utility.CurrentUser.OWNERDEPARTMENTID; Entity.CREATEUSERNAME = Utility.CurrentUser.USERNAME; Entity.SYSTEMCODE = ((cbSystemCode.SelectedItem) as FLOW_MODELDEFINE_T).SYSTEMCODE; Entity.SYSTEMNAME = ((cbSystemCode.SelectedItem) as FLOW_MODELDEFINE_T).SYSTEMNAME; Entity.MODELCODE = ((cbModelCode.SelectedItem) as FLOW_MODELDEFINE_T).MODELCODE; Entity.MODELNAME = ((cbModelCode.SelectedItem) as FLOW_MODELDEFINE_T).DESCRIPTION; if (txtMessageBody.Text.Replace(" ", "") != "") { Entity.MESSAGEBODY = ParamOperate.MessageBodyExchange(ListTableColumn.ToList(), true, txtMessageBody.Text); } else { ComfirmWindow.ConfirmationBox("提示信息", "触发规则中消息定义不能为空!", "确定"); return(null); } if (txtAvailabilityProcessDates.Text != null) { if (Regex.IsMatch(txtAvailabilityProcessDates.Text.ToString(), @"^\d+$")) { Entity.LASTDAYS = int.Parse(txtAvailabilityProcessDates.Text); } else { ComfirmWindow.ConfirmationBox("提示信息", "有效处理日期格式不正确!请输入正确格式!", "确定"); return(null); } } else { Entity.LASTDAYS = 3; } if (this.txtReceiveUser.Text.Trim() != "" && OrgObj != null) { Entity.OWNERPOSTID = OrgObj.ObjectID; Entity.RECEIVEUSERNAME = OrgObj.ObjectName; } Entity.ISDEFAULTMSG = chkIsMsg.IsChecked == true ? 1 : 0; Entity.APPLICATIONURL = MsgOpen; if (chkOther.IsChecked == true) { Entity.ISOTHERSOURCE = "1"; Entity.OTHERSYSTEMCODE = (cbOtherSystemCode1.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMCODE; Entity.OTHERMODELCODE = (cbotherModelCode1.SelectedItem as FLOW_MODELDEFINE_T).MODELCODE; } else { Entity.ISOTHERSOURCE = "0"; Entity.OTHERSYSTEMCODE = ""; Entity.OTHERMODELCODE = ""; } if (RowList.ItemsSource != null) { AppFunc func = this.cmbFunc.SelectedItem as AppFunc; if (func != null) { Entity.FUNCTIONNAME = func.FuncName; Entity.FUNCTIONPARAMTER = ParamOperate.CollectionToString(listpatrm); Entity.WCFURL = func.Address; Entity.WCFBINDINGCONTRACT = func.Binding; Entity.PAMETERSPLITCHAR = func.SplitChar; } } return(Entity); }
private void btnSave_Click(object sender, RoutedEventArgs e) { if (txtTriggerName.Text.Trim() == "") { ComfirmWindow.ConfirmationBox("提示信息", "定时触发名称不能为空!", "确定"); return; } FLOW_MODELDEFINE_T system = cmbSystemCode.SelectedItem as FLOW_MODELDEFINE_T; FLOW_MODELDEFINE_T model = cmbModelCode.SelectedItem as FLOW_MODELDEFINE_T; if (system.SYSTEMCODE == "0" || model.MODELCODE == "0") { ComfirmWindow.ConfirmationBox("提示信息", "请正确选择 [系统名称]和[模块名称]!", "确定"); return; } if (myDate.Text == "") { ComfirmWindow.ConfirmationBox("提示信息", "开始时间不能为空!", "确定"); return; } if (ActionType == "0") { #region 新增 Entity = new PlatformService.T_WF_TIMINGTRIGGERACTIVITY(); Entity.TRIGGERID = Guid.NewGuid().ToString(); Entity.TRIGGERNAME = txtTriggerName.Text; Entity.CREATEUSERNAME = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName; Entity.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID; Entity.COMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; Entity.SYSTEMCODE = (this.cmbSystemCode.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMCODE; Entity.SYSTEMNAME = (this.cmbSystemCode.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMNAME; Entity.MODELCODE = (this.cmbModelCode.SelectedItem as FLOW_MODELDEFINE_T).MODELCODE; Entity.MODELNAME = (this.cmbModelCode.SelectedItem as FLOW_MODELDEFINE_T).DESCRIPTION; Entity.TRIGGERROUND = CycleOperate.CycleExchangeTo((this.cmbCycle.SelectedItem as Cycle).CycleType); Entity.CONTRACTTYPE = "Engine"; Entity.TRIGGERTYPE = rbUser.IsChecked == true ? "User" : "System"; Entity.TRIGGERTIME = DateTime.Parse(myDate.Text + " " + myTime.Value.Value.TimeOfDay.ToString()); Entity.TRIGGERACTIVITYTYPE = rbSMS.IsChecked == true ? 1 : 2; Entity.MESSAGEURL = MsgOpen; if (this.txtValue.Text.Trim() != "" && cmbFunc.SelectedIndex > 0) { AppFunc func = cmbFunc.SelectedItem as AppFunc; Entity.FUNCTIONNAME = func.FuncName; Entity.FUNCTIONPARAMTER = ParamOperate.CollectionToString(listpatrm); Entity.WCFURL = func.Address; Entity.WCFBINDINGCONTRACT = func.Binding; Entity.PAMETERSPLITCHAR = func.SplitChar; } else { Entity.FUNCTIONNAME = string.Empty; Entity.FUNCTIONPARAMTER = string.Empty; Entity.WCFURL = string.Empty; Entity.WCFBINDINGCONTRACT = string.Empty; Entity.PAMETERSPLITCHAR = string.Empty; } triggerClient.AddTimingActivityAsync(Entity); #endregion } else { #region 修改 Entity.TRIGGERNAME = txtTriggerName.Text; Entity.COMPANYID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; Entity.SYSTEMCODE = (this.cmbSystemCode.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMCODE; Entity.SYSTEMNAME = (this.cmbSystemCode.SelectedItem as FLOW_MODELDEFINE_T).SYSTEMNAME; Entity.MODELCODE = (this.cmbModelCode.SelectedItem as FLOW_MODELDEFINE_T).MODELCODE; Entity.MODELNAME = (this.cmbModelCode.SelectedItem as FLOW_MODELDEFINE_T).DESCRIPTION; Entity.TRIGGERROUND = CycleOperate.CycleExchangeTo((this.cmbCycle.SelectedItem as Cycle).CycleType); Entity.CONTRACTTYPE = "Engine"; Entity.TRIGGERTYPE = rbUser.IsChecked == true ? "User" : "System"; Entity.TRIGGERTIME = DateTime.Parse(myDate.Text + " " + myTime.Value.Value.TimeOfDay.ToString()); Entity.TRIGGERACTIVITYTYPE = rbSMS.IsChecked == true ? 1 : 2; Entity.MESSAGEURL = MsgOpen; if (this.txtValue.Text.Trim() != "" && cmbFunc.SelectedIndex > 0) { AppFunc func = cmbFunc.SelectedItem as AppFunc; Entity.FUNCTIONNAME = func.FuncName; Entity.FUNCTIONPARAMTER = ParamOperate.CollectionToString(listpatrm); Entity.WCFURL = func.Address; Entity.WCFBINDINGCONTRACT = func.Binding; Entity.PAMETERSPLITCHAR = func.SplitChar; } else { Entity.FUNCTIONNAME = string.Empty; Entity.FUNCTIONPARAMTER = string.Empty; Entity.WCFURL = string.Empty; Entity.WCFBINDINGCONTRACT = string.Empty; Entity.PAMETERSPLITCHAR = string.Empty; } #endregion triggerClient.EditTimingActivityAsync(Entity); } }