예제 #1
0
파일: RP.cs 프로젝트: napoleon789/love_gv
        public static List<RP> BindSRVN(string sdate, string edate)
        {
            List<RP> rp = new List<RP>();
            string[] _tepm1, _tepm2;

            string[] _tepm = ConfigurationManager.AppSettings["CommandCode"].Split(new char[] { ';' });

            for (int i = 0; i < _tepm.Length; i++)
            {
                RP p = new RP();
                _tepm1 = _tepm[i].Split(new char[] { '=' });
                _tepm2 = _tepm1[1].Split(new char[] { ',' });
                for (int j = 0; j < _tepm2.Length; j++)
                {
                    RP _p = new RP();
                    _p = RP.BindRP(_tepm2[j], _tepm1[0], sdate, edate);

                    p.GPC_MO = Convert.ToString(RP.Soao(Convert.ToInt32(p.GPC_MO) + Convert.ToInt32(_p.GPC_MO)));
                    p.GPC_MTC = Convert.ToString(RP.Soao(Convert.ToInt32(p.GPC_MTC) + Convert.ToInt32(_p.GPC_MTC)));
                    p.GPC_MT = Convert.ToString(RP.Soao(Convert.ToInt32(p.GPC_MT) + Convert.ToInt32(_p.GPC_MT)));

                    p.VMS_MO = Convert.ToString(RP.Soao(Convert.ToInt32(p.VMS_MO) + Convert.ToInt32(_p.VMS_MO)));
                    p.VMS_MTC = Convert.ToString(RP.Soao(Convert.ToInt32(p.VMS_MTC) + Convert.ToInt32(_p.VMS_MTC)));
                    p.VMS_MT = Convert.ToString(RP.Soao(Convert.ToInt32(p.VMS_MT) + Convert.ToInt32(_p.VMS_MT)));

                    p.VIETTEL_MO = Convert.ToString(RP.Soao(Convert.ToInt32(p.VIETTEL_MO) + Convert.ToInt32(_p.VIETTEL_MO)));
                    p.VIETTEL_MTC = Convert.ToString(RP.Soao(Convert.ToInt32(p.VIETTEL_MTC) + Convert.ToInt32(_p.VIETTEL_MTC)));
                    p.VIETTEL_MT = Convert.ToString(RP.Soao(Convert.ToInt32(p.VIETTEL_MT) + Convert.ToInt32(_p.VIETTEL_MT)));

                    p.SFONE_MO = Convert.ToString(RP.Soao(Convert.ToInt32(p.SFONE_MO) + Convert.ToInt32(_p.SFONE_MO)));
                    p.SFONE_MTC = Convert.ToString(RP.Soao(Convert.ToInt32(p.SFONE_MTC) + Convert.ToInt32(_p.SFONE_MTC)));
                    p.SFONE_MT = Convert.ToString(RP.Soao(Convert.ToInt32(p.SFONE_MT) + Convert.ToInt32(_p.SFONE_MT)));

                    p.Z_MO = Convert.ToString(RP.Soao(Convert.ToInt32(p.Z_MO) + Convert.ToInt32(_p.Z_MO)));
                    p.Z_MTC = Convert.ToString(RP.Soao(Convert.ToInt32(p.Z_MTC) + Convert.ToInt32(_p.Z_MTC)));
                    p.Z_MT = Convert.ToString(RP.Soao(Convert.ToInt32(p.Z_MT) + Convert.ToInt32(_p.Z_MT)));

                    p.SRVNO = _p.SRVNO;

                }
                rp.Add(p);
            }
            return rp;
        }
예제 #2
0
파일: RP.cs 프로젝트: napoleon789/love_gv
        public static RP BindRP(string cmd,string srvno, string sdate, string edate)
        {
            //List<RP> rp = new List<RP>();
            RP p = new RP();

            //GPC
            p.GPC_MO = RP.C_GPC_MO(srvno, cmd, sdate, edate).ToString();
            p.GPC_MT = RP.C_GPC_MT(srvno, cmd, sdate, edate).ToString();
            p.GPC_MTC = RP.C_GPC_MTC(srvno, cmd, sdate, edate).ToString();

            //VMS

            p.VMS_MO = RP.C_VMS_MO(srvno, cmd, sdate, edate).ToString();
            p.VMS_MT = RP.C_VMS_MT(srvno, cmd, sdate, edate).ToString();
            p.VMS_MTC = RP.C_VMS_MTC(srvno, cmd, sdate, edate).ToString();

            //VIETTEL

            p.VIETTEL_MO = RP.C_VIETTEL_MO(srvno, cmd, sdate, edate).ToString();
            p.VIETTEL_MT = RP.C_VIETTEL_MT(srvno, cmd, sdate, edate).ToString();
            p.VIETTEL_MTC = RP.C_VIETTEL_MTC(srvno, cmd, sdate, edate).ToString();

            //SFONE

            p.SFONE_MO = RP.C_SFONE_MO(srvno, cmd, sdate, edate).ToString();
            p.SFONE_MT = RP.C_SFONE_MT(srvno, cmd, sdate, edate).ToString();
            p.SFONE_MTC = RP.C_SFONE_MTC(srvno, cmd, sdate, edate).ToString();

            //Tong So
            p.Z_MO = Convert.ToString(Convert.ToInt32(p.GPC_MO) + Convert.ToInt32(p.VMS_MO) + Convert.ToInt32(p.VIETTEL_MO) + Convert.ToInt32(p.SFONE_MO));
            p.Z_MTC = Convert.ToString(Convert.ToInt32(p.GPC_MTC) + Convert.ToInt32(p.VMS_MTC) + Convert.ToInt32(p.VIETTEL_MTC) + Convert.ToInt32(p.SFONE_MTC));
            p.Z_MT = Convert.ToString(Convert.ToInt32(p.GPC_MT) + Convert.ToInt32(p.VMS_MT) + Convert.ToInt32(p.VIETTEL_MT) + Convert.ToInt32(p.SFONE_MT));

            //Add CMD,ServiceNum

            p.CMD = cmd;
            p.SRVNO = srvno;
            //rp.Add(p);

            return p;
        }