コード例 #1
0
ファイル: CustomNames.cs プロジェクト: evgeniynet/APIBeta
 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");
 }
コード例 #2
0
ファイル: CustomNames.cs プロジェクト: evgeniynet/APIBeta
 /// <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;
 }
コード例 #3
0
ファイル: CustomNames.cs プロジェクト: evgeniynet/APIBeta
        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;
                }
            }
        }
コード例 #4
0
ファイル: CustomNames.cs プロジェクト: evgeniynet/DataLayer
        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;
                }
            }
        }
コード例 #5
0
ファイル: CustomNames.cs プロジェクト: evgeniynet/DataLayer
 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");
 }
コード例 #6
0
ファイル: CustomNames.cs プロジェクト: evgeniynet/DataLayer
        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;
        }