Exemplo n.º 1
0
        public static string FormAnnualContractInsertTechlist(string name, string cityId, string cityName, string visible, string minPrice, int time)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlAnnualInsertPath);

            int i = 1;

            while (i <= time + 1)
            {
                ex.SetCell("A" + (i + 1), "1");
                ex.SetCell("B" + (i + 1), name);
                ex.SetCell("C" + (i + 1), cityId);
                ex.SetCell("D" + (i + 1), cityName);
                ex.SetCell("E" + (i + 1), visible);
                ex.SetCell("F" + (i + 1), "N");
                ex.SetCell("G" + (i + 1), minPrice);
                ex.SetCell("H" + (i + 1), time.ToString());
                if (i != time + 1)
                {
                    ex.SetCell("K" + (i + 1), i.ToString());
                }
                ex.SetCell("L" + (i + 1), (i + 5).ToString());
                i++;
            }
            return(Techlist.SaveAndClose(ref ex, "annual_ins"));
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="status">
        /// Статус:
        /// A - активный публичный,
        /// N - публичный только для новых,
        /// R - непубличный, подключения только в HD,
        /// P - непубличный для партнеров, подключения только в HD и IDMS
        /// O - архивный,
        /// S - служебный
        /// </param>
        /// <param name="serviceName"></param>
        /// <returns></returns>
        public static string FormFttbUpdateTechlist(string idService, string status, string serviceName)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlFttbUpdatePath);

            ex.SetCell("D2", idService);
            ex.SetCell("C2", status);
            ex.SetCell("E2", serviceName);

            return(Techlist.SaveAndClose(ref ex, "fttb_upd"));
        }
Exemplo n.º 3
0
        public static string FormNetphoneServicesUpdateTechlist(string serviceId, string serviceName, string visible)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlNetphoneUpdatePath);

            ex.SetCell("A2", serviceId);
            ex.SetCell("B2", serviceName);
            ex.SetCell("C2", visible);

            return(Techlist.SaveAndClose(ref ex, "netphone_serv_upd"));
        }
Exemplo n.º 4
0
        public static string FormIptvServicesInsertTechlist(string cityId, string cityName, string type, string serviceName, string price)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlIptvServicesInsertPath);

            ex.SetCell("A2", cityId);
            ex.SetCell("B2", cityName);
            ex.SetCell("C2", type);
            ex.SetCell("E2", serviceName);
            ex.SetCell("F2", price);

            return(Techlist.SaveAndClose(ref ex, "iptv_serv_ins"));
        }
Exemplo n.º 5
0
        public static string FormAnnualContractUpdateTechlist(string serviceId, string cityId, string cityName, string visible, string serviceName)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlAnnualUpdatePath);

            ex.SetCell("A2", serviceId);
            ex.SetCell("B2", cityId);
            ex.SetCell("C2", cityName);
            ex.SetCell("D2", visible);
            ex.SetCell("E2", "N");
            ex.SetCell("F2", serviceName);

            return(Techlist.SaveAndClose(ref ex, "annual_upd"));
        }
Exemplo n.º 6
0
        public static string FormNetphoneServicesInsertTechlist(string cityId, string cityName, string visible, string serviceName, string price, string atlId)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlNetphoneInsertPath);

            ex.SetCell("A2", cityId);
            ex.SetCell("B2", cityName);
            ex.SetCell("C2", serviceName);
            ex.SetCell("D2", atlId);
            ex.SetCell("E2", price);
            ex.SetCell("F2", visible);

            return(Techlist.SaveAndClose(ref ex, "netphone_serv_ins"));
        }
Exemplo n.º 7
0
        public static string FormIptvPacketsUpdateTechlist(string pkt_id, string pkt_name, string externalId, string effectivePrice)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlIptvPacketsUpdatePath);

            ex.ChangeSheet(3);

            ex.SetCell("A2", pkt_id);
            ex.SetCell("B2", pkt_name);
            ex.SetCell("C2", "Игнорировать");
            ex.SetCell("D2", externalId);
            ex.SetCell("E2", "Игнорировать");
            ex.SetCell("F2", effectivePrice);

            return(Techlist.SaveAndClose(ref ex, "iptv_packet_upd"));
        }
Exemplo n.º 8
0
        /// <summary>
        /// Создание техлиста загрузки новых VDPN тарифов
        /// </summary>
        /// <param name="status">
        /// Статус:
        /// A - активный публичный,
        /// N - публичный только для новых,
        /// R - непубличный, подключения только в HD,
        /// P - непубличный для партнеров, подключения только в HD и IDMS
        /// O - архивный,
        /// S - служебный
        /// </param>
        /// <param name="category">
        /// Категория L- лимитный, S - с понижением скорости, U - безлимитный
        /// </param>
        /// <param name="debtPeriod">
        /// период списания абон. платы:
        /// D - ежедневно,
        /// M - ежемесячно
        ///</param>
        /// <returns></returns>
        public static string FormFttbInsertTechlist(string status, string category, string debtPeriod, string price, string serviceName)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlFttbInsertPath);

            ex.SetCell("A2", "12042");
            ex.SetCell("B2", "Москва");
            ex.SetCell("C2", status);
            ex.SetCell("E2", serviceName);
            ex.SetCell("F2", category);
            ex.SetCell("G2", debtPeriod);
            ex.SetCell("H2", price);
            ex.SetCell("K2", "3520");
            ex.SetCell("L2", "3520");

            return(Techlist.SaveAndClose(ref ex, "fttb_ins"));
        }
Exemplo n.º 9
0
        public static string FromBundlesUpdateTechlist(string bundleId, string cityId, string cityName, string visible, string bundleName)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlBundlesUpdatePath);

            ex.SetCell("A2", bundleId);
            ex.SetCell("B2", cityId);
            ex.SetCell("C2", cityName);
            ex.SetCell("D2", visible);
            ex.SetCell("E2", "Игнорировать");
            ex.SetCell("F2", bundleName);
            ex.SetCell("G2", "Игнорировать");
            ex.SetCell("H2", "Игнорировать");
            ex.SetCell("I2", "Игнорировать");
            ex.SetCell("J2", "Игнорировать");

            return(Techlist.SaveAndClose(ref ex, "bundle_upd"));
        }
Exemplo n.º 10
0
        public static string FromBundlesInsertTechlist(string cityId, string cityName, string visible,
                                                       string effectivePrice, string bundleName)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlBundlesInsertPath);

            FormEqualString(ref ex, 2, cityId, cityName, visible, effectivePrice, bundleName);
            FormEqualString(ref ex, 3, cityId, cityName, visible, effectivePrice, bundleName);
            FormEqualString(ref ex, 4, cityId, cityName, visible, effectivePrice, bundleName);
            FormEqualString(ref ex, 5, cityId, cityName, visible, effectivePrice, bundleName);

            ex.SetCell("J2", "VPDN");
            ex.SetCell("J3", "W_STOPPABLE_RENT");
            ex.SetCell("J4", "IPTV");
            ex.SetCell("J5", "STOPPABLE_RENT");

            ex.SetCell("L2", "SWITCH");
            ex.SetCell("L3", "KEEP");
            ex.SetCell("L4", "KEEP");
            ex.SetCell("L5", "KEEP");

            return(Techlist.SaveAndClose(ref ex, "bundle_ins"));
        }
Exemplo n.º 11
0
        public static string FormIptvPacketsInsertTechlist(string basePacketName, string visible, string effectivePrice, string cityId, string cityName)
        {
            ExcelWorker ex = new ExcelWorker(Environment.TlIptvPacketsInsertPath);

            string basePacketNumber = "1";
            int    line             = 2;
            int    outId            = 1;


            ex.SetCell("A" + line, (line - 1).ToString());
            ex.SetCell("B" + line, basePacketNumber);
            ex.SetCell("C" + line, visible);
            ex.SetCell("D" + line, basePacketName);
            ex.SetCell("H" + line, "0");
            ex.SetCell("I" + line, effectivePrice);
            ex.SetCell("M" + line, outId.ToString());

            outId++;

            int typesCount = new Random().Next(1, 7);
            int typeIter   = 0;

            while (typeIter < typesCount)
            {
                line++;
                ex.SetCell("A" + line, (line - 1).ToString());
                ex.SetCell("B" + line, basePacketNumber);
                ex.SetCell("E" + line, "type_" + typeIter);
                ex.SetCell("J" + line, "1");
                ex.SetCell("K" + line, "N");

                int subtypesCount = new Random().Next(1, 7);
                int subtypeIter   = 0;
                while (subtypeIter < subtypesCount)
                {
                    line++;
                    ex.SetCell("A" + line, (line - 1).ToString());
                    ex.SetCell("B" + line, basePacketNumber);
                    ex.SetCell("F" + line, "type_" + typeIter + "_subtype_" + subtypeIter);

                    int elementsCount = new Random().Next(1, 7);
                    int elementIter   = 0;

                    var rnd = new Random();
                    while (elementIter < elementsCount)
                    {
                        var price = rnd.Next(100, 999).ToString();
                        line++;
                        ex.SetCell("A" + line, (line - 1).ToString());
                        ex.SetCell("B" + line, basePacketNumber);
                        ex.SetCell("C" + line, visible);
                        ex.SetCell("G" + line, "type_" + typeIter + "_subtype_" + subtypeIter + "_element_" + elementIter);
                        ex.SetCell("H" + line, price);
                        ex.SetCell("M" + line, outId.ToString());

                        outId++;
                        elementIter++;
                    }

                    subtypeIter++;
                }

                typeIter++;
            }

            ex.ChangeSheet(4);
            ex.SetCell("A2", basePacketNumber);
            ex.SetCell("B2", basePacketName);
            ex.SetCell("C2", cityId);
            ex.SetCell("D2", cityName);

            return(Techlist.SaveAndClose(ref ex, "iptv_packet_ins"));
        }