)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Ams (Ia.Ftn.Cl.Models.Ui.Maintenance.Transaction)

Public general use code classes and xml files that we've compiled and used over the years:

Ams support class for Fixed Telecommunications Network (FTN) ui model.

    1: using System;
    2: using System.Text;
    3:  
    4: namespace Ia.Ftn.Cl.Models.Ui.Maintenance.Transaction
    5: {
    6:     ////////////////////////////////////////////////////////////////////
    7:     ////////
    8:  
    9:     /// <summary publish="true">
   10:     /// Ams support class for Fixed Telecommunications Network (FTN) ui model.
   11:     /// </summary>
   12:     /// 
   13:     /// <remarks> 
   14:     /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   15:     /// </remarks> 
   16:     public class Ams
   17:     {
   18:         /// <summary/>
   19:         public Ams() { }
   20:  
   21:         /////////////////////////////////////////////////////////////////////////////////
   22:  
   23:         /// <summary>
   24:         ///
   25:         /// </summary>
   26:         public static void Manage(Ia.Ftn.Cl.Models.Business.Administration.StaffContact staffContact, string opcode, string operand, string attachementContent, out string responseSubject, out string responseContent)
   27:         {
   28:             StringBuilder stringBuilder;
   29:             DateTime now;
   30:             Ia.Cl.Models.Result result;
   31:  
   32:             result = new Ia.Cl.Models.Result();
   33:  
   34:             opcode = opcode.ToLower();
   35:  
   36:             now = DateTime.UtcNow.AddHours(3);
   37:  
   38:             // subject can't have \r\n
   39:             responseSubject = "Fixed Telecommunications Network's Operations Support System (FTN OSS) Nokia AMS Transaction Manager (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
   40:             responseContent = "Fixed Telecommunications Network's Operations Support System (FTN OSS) Nokia AMS Transaction Manager: " + now.ToString("yyyy-MM-dd HH:mm") + "\r\n";
   41:  
   42:             if (opcode.Contains("help"))
   43:             {
   44:                 responseContent += Ia.Ftn.Cl.Models.Data.Help.Text("mail/maintenance/log/transaction/ams");
   45:                 responseContent += "\r\n";
   46:             }
   47:             else
   48:             {
   49:                 if (opcode.StartsWith("mail/maintenance/log/transaction/ams/insert"))
   50:                 {
   51:                     if (Ia.Ftn.Cl.Models.Business.Authority.StaffContactCanInsertAmsTransactionCsvFile(Ia.Ftn.Cl.Models.Business.Authority.PersistentStorageFunction.Create, staffContact))
   52:                     {
   53:                         responseContent += @"Opcode: """ + opcode + @"""." + "\r\n";
   54:                         responseContent += "\r\n";
   55:  
   56:                         stringBuilder = new StringBuilder(10000);
   57:  
   58:                         if (attachementContent.Length > 0)
   59:                         {
   60:                             Ia.Ftn.Cl.Models.Data.Nokia.AmsTransaction.Process(attachementContent, out result);
   61:  
   62:                             stringBuilder.AppendLine(result.Message);
   63:                         }
   64:                         else
   65:                         {
   66:                             stringBuilder.AppendLine("Error: Attachement is empty. ");
   67:                         }
   68:  
   69:                         responseContent += stringBuilder.ToString();
   70:                         responseContent += "\r\n";
   71:                         //content += "\r\nResult: " + result.Message;
   72:  
   73:                         responseContent += "\r\n";
   74:                         responseContent += "\r\n";
   75:                         responseContent += @"Help? Send email with subject ""mail/maintenance/log/transaction/ams/help"". ";
   76:                         responseContent += "\r\n";
   77:                         responseContent += "\r\n";
   78:                     }
   79:                     else
   80:                     {
   81:                         responseContent += "\r\n";
   82:                         responseContent += "You are not authorized to modify this value. ";
   83:                         responseContent += "\r\n";
   84:                     }
   85:                 }
   86:                 else if (opcode.StartsWith("mail/maintenance/log/transaction/ams/read"))
   87:                 {
   88:                     responseContent += "\r\n";
   89:                     responseContent += "This opcode is not defined yet. ";
   90:                     responseContent += "\r\n";
   91:                 }
   92:                 else
   93:                 {
   94:                     responseContent += "\r\n";
   95:                     responseContent += "This opcode is not known. ";
   96:                     responseContent += "\r\n";
   97:                 }
   98:             }
   99:         }
  100:  
  101:         ////////////////////////////////////////////////////////////////////////////
  102:         ////////////////////////////////////////////////////////////////////////////
  103:     }
  104: }