private void BindValues() { string strSubject; string strBody; AlertTemplate.GetTemplate(AlertTemplateTypes.Special, Language, Template, bCustom, out strSubject, out strBody); IncidentBoxDocument ibd = IncidentBoxDocument.Load(IncidentBoxId); if (ibd != null) { tbSubject.Text = ibd.GeneralBlock.OutgoingEmailFormatSubject; tbBody.Text = ibd.GeneralBlock.OutgoingEmailFormatBody; } IncidentBox ib = IncidentBox.Load(IncidentBoxId); string ibName = ""; if (ib != null) { ibName = ib.Name; } title = LocRM.GetString("TemplateEdit") + " " + ibName; DataTable dt = AlertTemplate.GetVariablesForTemplateEditor(AlertTemplateTypes.Special, Template); DataView dv = dt.DefaultView; dv.Sort = "Name"; dlSysVar.DataSource = dv; dlSysVar.DataBind(); }
private void BindValues() { /*using( IDataReader rdr = Alert.GetTemplate(EventTypeID, MessageTypeID, LanguageID, IsExternal)) * { * if (rdr.Read()) * { * title = (string)rdr["EventTypeName"]; * if (rdr["Subject"]!=DBNull.Value) * tbSubject.Text = (string)rdr["Subject"]; * * tbBody.Text = (string)rdr["Body"]; * * ViewState["TemplateId"] = rdr["TemplateId"]; * * if (MessageTypeID == 2) * trSubject.Visible = false; * } * } * * dlSysVar.DataSource = Alert.GetVariablesByType(EventTypeID); * dlSysVar.DataBind(); */ string strSubject; string strBody; //btnReset.Disabled = ! using (SkipApplyGlobalSubjectTemplate skip = new SkipApplyGlobalSubjectTemplate()) { AlertTemplate.GetTemplate(AlertTemplateTypes.Notification, Language, Template, bCustom, out strSubject, out strBody); tbSubject.Text = strSubject; tbBody.Text = strBody; } title = AlertTemplate.GetDisplayName(AlertTemplateTypes.Notification, Template); DataTable dt = AlertTemplate.GetVariablesForTemplateEditor(AlertTemplateTypes.Notification, Template); DataView dv = dt.DefaultView; dv.Sort = "Name"; dlSysVar.DataSource = dv; dlSysVar.DataBind(); }
private void BindValues() { IncidentBoxDocument ibd = IncidentBoxDocument.Load(IncidentBoxId); if (ibd != null) { if (Template.IndexOf("Issue_Created") >= 0) { tbSubject.Text = ibd.GeneralBlock.AutoReplyEMailSubjectTemplate; tbBody.Text = ibd.GeneralBlock.AutoReplyEMailBodyTemplate; } else if (Template.IndexOf("Issue_Closed") >= 0) { tbSubject.Text = ibd.GeneralBlock.OnCloseAutoReplyEMailSubjectTemplate; tbBody.Text = ibd.GeneralBlock.OnCloseAutoReplyEMailBodyTemplate; } } IncidentBox ib = IncidentBox.Load(IncidentBoxId); string ibName = ""; if (ib != null) { ibName = ib.Name; } if (Template.IndexOf("Issue_Created") >= 0) { title = LocRM.GetString("NewIssueMessage") + " " + ibName; } else if (Template.IndexOf("Issue_Closed") >= 0) { title = LocRM.GetString("CloseIssueMessage") + " " + ibName; } DataTable dt = AlertTemplate.GetVariablesForTemplateEditor(AlertTemplateTypes.Notification, Template); DataView dv = dt.DefaultView; dv.Sort = "Name"; dlSysVar.DataSource = dv; dlSysVar.DataBind(); }