|
|
@@ -39,7 +39,9 @@ namespace HySoft.IVRFlowEditor.Utility
|
|
39
|
39
|
|
|
40
|
40
|
if (o.IVRControl != null && o.IVRControl.Count > 0)
|
|
41
|
41
|
{
|
|
42
|
|
- xmlBuilder.Append("<flow Name=\"" + o.IVR_Name + "\" Type=\"" + o.IVRFlowType.ToString() + "\" IVR_Name=\"" + o.IVR_Name + "\" IVR_Text=\"" + o.IVR_Text + "\" MatchedNum=\"\" MatchedLine=\"\" Concurrency=\"1\"> \r\n");
|
|
|
42
|
+ //xmlBuilder.Append("<flow Name=\"" + o.IVR_Name + "\" Type=\"" + o.IVRFlowType.ToString() + "\" IVR_Name=\"" + o.IVR_Name + "\" IVR_Text=\"" + o.IVR_Text + "\" MatchedNum=\"\" MatchedLine=\"\" Concurrency=\"1\"> \r\n");
|
|
|
43
|
+ //2017-4-28修改
|
|
|
44
|
+ xmlBuilder.Append("<flow Name=\"" + o.IVR_Name + "\" Type=\"" + o.IVRFlowType.ToString() + "\" IVR_Name=\"" + o.IVR_Name + "\" IVR_Text=\"" + o.IVR_Text + "\" MatchedNum=\".\" MatchedLine=\"|-1|\" Concurrency=\"1\"> \r\n");
|
|
43
|
45
|
foreach (IVRControlBase ivr in o.IVRControl)
|
|
44
|
46
|
{
|
|
45
|
47
|
Dictionary<int,string> disAtt=new Dictionary<int,string>();
|
|
|
@@ -211,8 +213,9 @@ namespace HySoft.IVRFlowEditor.Utility
|
|
211
|
213
|
XmlNodeList flowNodes = doc.GetElementsByTagName("flow");
|
|
212
|
214
|
foreach (XmlNode node in flowNodes)
|
|
213
|
215
|
{
|
|
214
|
|
- val.Add(new IVRFlowSerializerInfo() { IVR_Name = node.Attributes["IVR_Name"].Value, IVR_Text = node.Attributes["IVR_Text"].Value, IVRFlowType = (IVRFlowType)Enum.Parse(typeof(IVRFlowType), node.Attributes["Type"].Value), IVRControl = new List<IVRControlBase>(), LineNodes = new List<LineInfo>(), IVRVar=new List<IVRDefinevarDefVar>() });
|
|
215
|
|
-
|
|
|
216
|
+ //val.Add(new IVRFlowSerializerInfo() { IVR_Name = node.Attributes["Name"].Value, IVR_Text = node.Attributes["Name"].Value, IVRFlowType = (IVRFlowType)Enum.Parse(typeof(IVRFlowType), node.Attributes["Type"].Value), IVRControl = new List<IVRControlBase>(), LineNodes = new List<LineInfo>(), IVRVar=new List<IVRDefinevarDefVar>() });
|
|
|
217
|
+ //2017-4-27
|
|
|
218
|
+ val.Add(new IVRFlowSerializerInfo() { IVR_Name = node.Attributes["IVR_Name"].Value, IVR_Text = node.Attributes["IVR_Text"].Value, IVRFlowType = (IVRFlowType)Enum.Parse(typeof(IVRFlowType), node.Attributes["Type"].Value), IVRControl = new List<IVRControlBase>(), LineNodes = new List<LineInfo>(), IVRVar = new List<IVRDefinevarDefVar>() });
|
|
216
|
219
|
XmlNodeList CellNode = node.SelectNodes("cell");
|
|
217
|
220
|
foreach (XmlNode cell in CellNode)
|
|
218
|
221
|
{
|
|
|
@@ -236,7 +239,7 @@ namespace HySoft.IVRFlowEditor.Utility
|
|
236
|
239
|
if (p.PropertyType == typeof(IVRControlBase))
|
|
237
|
240
|
{
|
|
238
|
241
|
if (cell.Attributes[p.Name].Value != "0" && !string.IsNullOrEmpty(cell.Attributes[p.Name].Value))
|
|
239
|
|
- val.Last().LineNodes.Add(new LineInfo() { AttributeName = p.Name, StartNodeID = val.Last().IVRControl.Last().Pos, EndNodeID = cell.Attributes[p.Name].Value });
|
|
|
242
|
+ val.Last().LineNodes.Add(new LineInfo() { AttributeName = p.Name , StartNodeID = val.Last().IVRControl.Last().Pos, EndNodeID = cell.Attributes[p.Name].Value });
|
|
240
|
243
|
}
|
|
241
|
244
|
else if (p.PropertyType.IsEnum)
|
|
242
|
245
|
{
|
|
|
@@ -267,7 +270,17 @@ namespace HySoft.IVRFlowEditor.Utility
|
|
267
|
270
|
if (p.PropertyType == typeof(Int32) || p.PropertyType == typeof(int))
|
|
268
|
271
|
p.SetValue(val.Last().IVRControl.Last(), Int32.Parse(cell.Attributes[p.Name].Value), null);
|
|
269
|
272
|
else if (p.PropertyType == typeof(Boolean) || p.PropertyType == typeof(bool))
|
|
270
|
|
- p.SetValue(val.Last().IVRControl.Last(), bool.Parse(cell.Attributes[p.Name].Value), null);
|
|
|
273
|
+ //2017-4-28添加
|
|
|
274
|
+ {
|
|
|
275
|
+ bool bvalue = false;
|
|
|
276
|
+ if (cell.Attributes[p.Name].Value.ToString() == "no")
|
|
|
277
|
+ { bvalue = false; }
|
|
|
278
|
+ else if (cell.Attributes[p.Name].Value.ToString() == "yes")
|
|
|
279
|
+ { bvalue = true ; }
|
|
|
280
|
+ else
|
|
|
281
|
+ { bvalue = bool.Parse(cell.Attributes[p.Name].Value); }
|
|
|
282
|
+ p.SetValue(val.Last().IVRControl.Last(), bvalue, null);//p.SetValue(val.Last().IVRControl.Last(), bool.Parse(cell.Attributes[p.Name].Value), null);//2017-4-28
|
|
|
283
|
+ }
|
|
271
|
284
|
else
|
|
272
|
285
|
p.SetValue(val.Last().IVRControl.Last(), cell.Attributes[p.Name].Value.ToString(), null);
|
|
273
|
286
|
}
|