Exemplo n.º 1
0
 private CustomNames()
 {
     _ticket      = new CustomName("Ticket", "Tickets", "Tkt", "Tkts");
     _account     = new CustomName("Account", "Accounts", "Acc", "Accs");
     _technician  = new CustomName("Technician", "Technicians", "Tech", "Techs");
     _maintenance = new CustomName("Scheduled Maintenance", "Scheduled Maintenances", "SM", "SMs");
     _location    = new CustomName("Location", "Locations", "Loc", "Locs");
     _enduser     = new CustomName("End User", "End Users", "User", "Users");
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor of the class. Initializes all custom names.
 /// </summary>
 /// <param name="ticketName">Custom name for "Ticket"</param>
 /// <param name="accountName">Custom name for "Account"</param>
 /// <param name="technicianName">Custom name for "Technician"</param>
 /// <param name="maintenanceName">Custom name for "Maintenance"</param>
 /// <param name="locationName">Custom name for "Location"</param>
 public CustomNames(CustomName ticketName, CustomName accountName, CustomName technicianName, CustomName maintenanceName, CustomName locationName, CustomName endUserName)
 {
     //store all names to local variables
     _ticket      = ticketName;
     _account     = accountName;
     _technician  = technicianName;
     _maintenance = maintenanceName;
     _location    = locationName;
     _enduser     = endUserName;
 }
Exemplo n.º 3
0
        private CustomNames(Guid OrgID, int DeptID)
        {
            bool   btCfgCUSN = false;
            Config config    = Config.GetConfig(OrgID, DeptID);

            if (config != null)
            {
                btCfgCUSN = config.CustomNames;
            }

            DataTable _dt = SelectRecords("sp_SelectCustomNames", new SqlParameter[] { new SqlParameter("@CompanyId", (btCfgCUSN ? (object)DeptID : DBNull.Value)) }, OrgID);

            foreach (DataRow _row in _dt.Rows)
            {
                switch ((int)_row["TermId"])
                {
                case 1:     //Ticket
                    _ticket = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                    break;

                case 2:     //Account
                    _account = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                    break;

                case 3:     //Technician
                    _technician = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                    break;

                case 4:     //Maintenance
                    _maintenance = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                    break;

                case 5:     //Location
                    _location = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                    break;

                case 6:     //End User
                    _enduser = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                    break;
                }
            }
        }
Exemplo n.º 4
0
        private CustomNames(Guid OrgID, int DeptID)
        {
            bool btCfgCUSN = false;
            Config config = Config.GetConfig(OrgID, DeptID);
            if (config != null)
                btCfgCUSN = config.CustomNames;

            DataTable _dt = SelectRecords("sp_SelectCustomNames", new SqlParameter[] { new SqlParameter("@CompanyId", (btCfgCUSN ? (object)DeptID : DBNull.Value)) }, OrgID);
            foreach (DataRow _row in _dt.Rows)
            {
                switch ((int)_row["TermId"])
                {
                    case 1: //Ticket
                        _ticket = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                        break;
                    case 2: //Account
                        _account = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                        break;
                    case 3: //Technician
                        _technician = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                        break;
                    case 4: //Maintenance
                        _maintenance = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                        break;
                    case 5: //Location
                        _location = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                        break;
                    case 6: //End User
                        _enduser = new CustomName(_row["FullSingular"].ToString(), _row["FullPlural"].ToString(), _row["AbbreviatedSingular"].ToString(), _row["AbbreviatedPlural"].ToString());
                        break;
                }
            }
        }
Exemplo n.º 5
0
 private CustomNames()
 {
     _ticket = new CustomName("Ticket", "Tickets", "Tkt", "Tkts");
     _account = new CustomName("Account", "Accounts", "Acc", "Accs");
     _technician = new CustomName("Technician", "Technicians", "Tech", "Techs");
     _maintenance = new CustomName("Scheduled Maintenance", "Scheduled Maintenances", "SM", "SMs");
     _location = new CustomName("Location", "Locations", "Loc", "Locs");
     _enduser = new CustomName("End User", "End Users", "User", "Users");
 }
Exemplo n.º 6
0
        private CustomName _ticket = null; //Ticket – e.g. Work Order, Case, Issue

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Constructor of the class. Initializes all custom names.
        /// </summary>
        /// <param name="ticketName">Custom name for "Ticket"</param>
        /// <param name="accountName">Custom name for "Account"</param>
        /// <param name="technicianName">Custom name for "Technician"</param>
        /// <param name="maintenanceName">Custom name for "Maintenance"</param>
        /// <param name="locationName">Custom name for "Location"</param>
        public CustomNames(CustomName ticketName, CustomName accountName, CustomName technicianName, CustomName maintenanceName, CustomName locationName, CustomName endUserName)
        {
            //store all names to local variables
            _ticket = ticketName;
            _account = accountName;
            _technician = technicianName;
            _maintenance = maintenanceName;
            _location = locationName;
            _enduser = endUserName;
        }