public OMCAddInfo(OMC omc, string omcIP, int omcPort, string user, string pwd) { m_omc = omc; m_omcIP = omcIP; m_omcPort = omcPort; m_user = user; m_pwd = pwd; }
public static bool CompareMembers(OMC left, OMC right) { if (left == null || right == null) { return(false); } if (left.m_city != right.m_city || left.m_manufacturer != right.m_manufacturer || left.m_omcName != right.m_omcName) { return(false); } return(true); }
public static void RaiseOMCAlarm(string conn, OMC omc) { StringBuilder sb = new StringBuilder(); sb.Append("insert into ftth_activealarm (CompanyNo,CITYNAME,SVRNAME,description,raisetime,Severity,type,neid) values("); sb.Append("'" + omc.Manufacturer + "',"); sb.Append("'" + omc.City + "',"); sb.Append("'" + omc.OmcName + "',"); sb.Append("'OMC网管 " + omc.OmcName + " 与激活系统连接中断',"); sb.Append("'" + DateTime.Now.ToString() + "',"); sb.Append("1,"); sb.Append("'omc',"); sb.Append("'" + omc.OmcName + "')"); SqlHelper.ExecuteNonQuery(conn, CommandType.Text, sb.ToString()); }
public static void RaiseOltAlarm(string conn, OMC omc, Task task) { string oltName = SQLUtil.GetOlt(conn, task.OltID); if (oltName == null || oltName == "") { oltName = task.OltID; } StringBuilder sb = new StringBuilder(); sb.Append("insert into ftth_activealarm (CompanyNo,CITYNAME,SVRNAME,description,raisetime,Severity,ftthTaskID,type,neid) values("); sb.Append("'" + omc.Manufacturer + "',"); sb.Append("'" + omc.City + "',"); sb.Append("'" + omc.OmcName + "',"); sb.Append("'" + omc.OmcName + " " + oltName + " 与OMC连接中断',"); sb.Append("'" + DateTime.Now.ToString() + "',"); sb.Append("1,"); sb.Append("'" + task.TaskID + "',"); sb.Append("'olt',"); sb.Append("'" + oltName + "')"); SqlHelper.ExecuteNonQuery(conn, CommandType.Text, sb.ToString()); }
/// <summary> /// 需完整性约束 /// 还没有格式约束,如ip和port格式 /// </summary> /// <param name="taskID"></param> /// <param name="type"></param> /// <param name="city"></param> /// <param name="manufacturer"></param> /// <param name="omcName"></param> /// <param name="oltID"></param> /// <param name="ponID"></param> /// <param name="onuID"></param> /// <param name="onuPort"></param> /// <param name="onuType"></param> /// <param name="svlan"></param> /// <param name="cvlan"></param> /// <param name="isRelocateTask"></param> public Task(string taskID, TaskType type, string city, string manufacturer, string omcName, string oltID, string oltName, string ponID, string onuID, string onuType, int svlan, int cvlan, string phone, DateTime receiveTime, int muvlan, int uvlan, int mvlan, int feNumber, int potsNumber, string IsContainIMS, int imsSvlan, int imsCvlan, int imsUV, string IsContainIPTV, int iptvSvlan, int iptvCvlan, int iptvUV) { if (city == null || city == "" || manufacturer == null || manufacturer == "" || omcName == null || omcName == "") { throw new Exception("工单完整性约束失败:" + ArgsToString(taskID, type, city, manufacturer, omcName, oltID, ponID, onuID, onuType, svlan, cvlan, phone, muvlan, uvlan, mvlan, feNumber, potsNumber)); } switch (type) { case TaskType.NewBroadband: case TaskType.AddBroadband: if (oltID == null || oltID == "" || ponID == null || ponID == "" || onuID == null || onuID == "" || svlan == 0 || cvlan == 0 || mvlan == 0 || feNumber == -1 || potsNumber == -1) { throw new Exception("工单完整性约束失败:" + ArgsToString(taskID, type, city, manufacturer, omcName, oltID, ponID, onuID, onuType, svlan, cvlan, phone, muvlan, uvlan, mvlan, feNumber, potsNumber)); } break; case TaskType.NewIMS: case TaskType.AddIMS: if (oltID == null || oltID == "" || ponID == null || ponID == "" || onuID == null || onuID == "" || svlan == 0 || cvlan == 0 || phone == null || phone == "") { throw new Exception("工单完整性约束失败:" + ArgsToString(taskID, type, city, manufacturer, omcName, oltID, ponID, onuID, onuType, svlan, cvlan, phone, muvlan, uvlan, mvlan, feNumber, potsNumber)); } break; case TaskType.DelONU: if (oltID == null || oltID == "" || ponID == null || ponID == "" || onuID == null || onuID == "") { throw new Exception("工单完整性约束失败:" + ArgsToString(taskID, type, city, manufacturer, omcName, oltID, ponID, onuID, onuType, svlan, cvlan, phone, muvlan, uvlan, mvlan, feNumber, potsNumber)); } break; case TaskType.DelBroadband: case TaskType.DelIMS: if (oltID == null || oltID == "" || ponID == null || ponID == "" || onuID == null || onuID == "" || svlan == 0 || cvlan == 0) { throw new Exception("工单完整性约束失败:" + ArgsToString(taskID, type, city, manufacturer, omcName, oltID, ponID, onuID, onuType, svlan, cvlan, phone, muvlan, uvlan, mvlan, feNumber, potsNumber)); } break; default: break; } this.m_taskID = taskID; this.m_type = type; //this.m_city = city; //this.m_manufacturer = manufacturer; //this.m_omcName = omcName; m_omc = new OMC(city, manufacturer, omcName); this.m_oltID = oltID; this.m_oltName = oltName; this.m_ponID = ponID; this.m_onuID = onuID; this.m_onuType = onuType; this.m_svlan = svlan; this.m_cvlan = cvlan; this.m_status = TaskStatus.NotStart; this.m_phone = phone; this.m_muvlan = muvlan; this.m_uvlan = uvlan; this.m_mvlan = mvlan; this.m_feNumber = feNumber; this.m_potsNumber = potsNumber; this.m_receiveTime = receiveTime; this.m_hwIMSDelay = false; this.m_isContainIMS = IsContainIMS; this.m_imssvlan = imsSvlan; this.m_imscvlan = imsCvlan; this.m_imsUV = imsUV; this.m_isContainIPTV = IsContainIPTV; this.m_iptvsvlan = iptvSvlan; this.m_iptvcvlan = iptvCvlan; this.m_iptvUV = iptvUV; }
public static void ClearOMCAlarm(string conn, OMC omc) { SqlParameter spOMCName = new SqlParameter("@omcName", omc.OmcName); SQLUtil.ExecProc(conn, "spClearOMCAlarm", spOMCName); }