예제 #1
0
    public static void InsertLogDisLike(ViSport_S2_Charged_Users_LogInfo viSportS2ChargedUsersLogInfo)
    {
        SqlConnection dbConn = new SqlConnection(AppEnv.ConnectionString);
        SqlCommand    dbCmd  = new SqlCommand("Vote_Charged_Users_Log_Insert_ForSub_DisLike", dbConn);

        dbCmd.CommandType = CommandType.StoredProcedure;
        dbCmd.Parameters.AddWithValue("@ID", viSportS2ChargedUsersLogInfo.ID);
        dbCmd.Parameters.AddWithValue("@User_ID", viSportS2ChargedUsersLogInfo.User_ID);
        dbCmd.Parameters.AddWithValue("@Request_ID", viSportS2ChargedUsersLogInfo.Request_ID);
        dbCmd.Parameters.AddWithValue("@Service_ID", viSportS2ChargedUsersLogInfo.Service_ID);
        dbCmd.Parameters.AddWithValue("@Command_Code", viSportS2ChargedUsersLogInfo.Command_Code);
        dbCmd.Parameters.AddWithValue("@Service_Type", viSportS2ChargedUsersLogInfo.Service_Type);
        dbCmd.Parameters.AddWithValue("@Charging_Count", viSportS2ChargedUsersLogInfo.Charging_Count);
        dbCmd.Parameters.AddWithValue("@FailedChargingTimes", viSportS2ChargedUsersLogInfo.FailedChargingTimes);
        dbCmd.Parameters.AddWithValue("@RegisteredTime", viSportS2ChargedUsersLogInfo.RegisteredTime);
        dbCmd.Parameters.AddWithValue("@ExpiredTime", viSportS2ChargedUsersLogInfo.ExpiredTime);
        dbCmd.Parameters.AddWithValue("@Registration_Channel", viSportS2ChargedUsersLogInfo.Registration_Channel);
        dbCmd.Parameters.AddWithValue("@Status", viSportS2ChargedUsersLogInfo.Status);
        dbCmd.Parameters.AddWithValue("@Operator", viSportS2ChargedUsersLogInfo.Operator);
        dbCmd.Parameters.AddWithValue("@Reason", viSportS2ChargedUsersLogInfo.Reason);

        dbCmd.Parameters.AddWithValue("@Price", viSportS2ChargedUsersLogInfo.Price);
        dbCmd.Parameters.AddWithValue("@Dislike_PersonId", viSportS2ChargedUsersLogInfo.Vote_PersonId);

        try
        {
            dbConn.Open();
            dbCmd.ExecuteNonQuery();
        }
        finally
        {
            dbConn.Close();
        }
    }
예제 #2
0
    public string NotifyChargingInfo(string registeredId, string userId, string requestId, string serviceId, string serviceType, string chargingValue, string chargingAccount, string chargingTime, string chargingResponse)
    {
        log.Info(" ");
        log.Info("***** LOG VClip CHARGED NOTIFICATION From ANDY *****");

        log.Info("User_ID : " + userId);
        log.Info("chargingValue : " + chargingValue);
        log.Info("chargingAccount : " + chargingAccount);
        log.Info("chargingTime : " + chargingTime);
        log.Info("chargingResponse : " + chargingResponse);

        log.Info("****************************************");
        log.Info(" ");

        if (chargingResponse.Trim() == "1")//CHARGED THANH CONG
        {
            #region Log Doanh Thu

            var logInfo = new ViSport_S2_Charged_Users_LogInfo();

            logInfo.ID                   = ConvertUtility.ToInt32(registeredId);
            logInfo.User_ID              = userId;
            logInfo.Request_ID           = requestId;
            logInfo.Service_ID           = serviceId;
            logInfo.Command_Code         = "CLIP";
            logInfo.Service_Type         = ConvertUtility.ToInt32(serviceType);
            logInfo.Charging_Count       = 0;
            logInfo.FailedChargingTimes  = 0;
            logInfo.RegisteredTime       = DateTime.Now;
            logInfo.ExpiredTime          = DateTime.Now.AddDays(1);
            logInfo.Registration_Channel = "SMS";
            logInfo.Status               = 1;
            logInfo.Operator             = "vnmobile";
            logInfo.Price                = ConvertUtility.ToInt32(chargingValue);
            logInfo.Reason               = "Succ";

            ViSport_S2_Registered_UsersController.VClipInsertLog(logInfo);

            #endregion
        }
        else //CHARGED THAT BAI
        {
            #region Log Doanh Thu

            var logInfo = new ViSport_S2_Charged_Users_LogInfo();

            logInfo.ID                   = ConvertUtility.ToInt32(registeredId);
            logInfo.User_ID              = userId;
            logInfo.Request_ID           = requestId;
            logInfo.Service_ID           = serviceId;
            logInfo.Command_Code         = "CLIP";
            logInfo.Service_Type         = ConvertUtility.ToInt32(serviceType);
            logInfo.Charging_Count       = 0;
            logInfo.FailedChargingTimes  = 0;
            logInfo.RegisteredTime       = DateTime.Now;
            logInfo.ExpiredTime          = DateTime.Now.AddDays(1);
            logInfo.Registration_Channel = "SMS";
            logInfo.Status               = 1;
            logInfo.Operator             = "vnmobile";
            logInfo.Price                = ConvertUtility.ToInt32(chargingValue);
            logInfo.Reason               = chargingResponse;

            ViSport_S2_Registered_UsersController.VClipInsertLog(logInfo);

            #endregion
        }

        if (chargingResponse.Trim() == "1")
        {
            #region Gui MT cho khach hang thong bao gia han thanh cong

            var       objSentMt = new ServiceProviderService();
            const int msgType   = (int)Constant.MessageType.NoCharge;

            string message = "(092)Quy khach da gia han thanh cong DV VMclip cua Vietnamobile. Moi ban truy cap: http://kho-clip.com/" + userId + ".aspx de xem cac video HOT cap nhat 24/24 MIEN PHI. De huy DK, soan CLIP OFF gui 949. HT 19001255";

            const string commandCode = "CLIP";
            int          value       = objSentMt.sendMT(userId, message, "949", commandCode, msgType.ToString(), requestId, "1", "1", "0", "0");

            var objMt = new ViSport_S2_SMS_MTInfo();
            objMt.User_ID       = userId;
            objMt.Message       = message;
            objMt.Service_ID    = serviceId;
            objMt.Command_Code  = commandCode;
            objMt.Message_Type  = 1;
            objMt.Request_ID    = requestId;
            objMt.Total_Message = 1;
            objMt.Message_Index = 0;
            objMt.IsMore        = 0;
            objMt.Content_Type  = 0;
            objMt.ServiceType   = 0;
            objMt.ResponseTime  = DateTime.Now;
            objMt.isLock        = false;
            objMt.PartnerID     = "Xzone";
            objMt.Operator      = "vnmobile";
            ViSport_S2_SMS_MTController.InsertVClip(objMt);

            log.Info(" ");
            log.Info("***** LOG SEND MT VCLIP *****");

            log.Info("User_ID : " + userId);
            log.Info("Message : " + message);
            log.Info("Service_ID : " + serviceId);
            log.Info("Command_Code : " + commandCode);
            log.Info("Send_MT : " + value);

            log.Info("****************************************");
            log.Info(" ");


            #endregion
        }

        return("1");
    }
예제 #3
0
    public string NotifyChargingInfo(string registeredId, string userId, string requestId, string serviceId, string serviceType, string chargingValue, string chargingAccount, string chargingTime, string chargingResponse)
    {
        log.Info(" ");
        log.Info("***** LOG VClip CHARGED NOTIFICATION From ANDY *****");

        log.Info("User_ID : " + userId);
        log.Info("chargingValue : " + chargingValue);
        log.Info("chargingAccount : " + chargingAccount);
        log.Info("chargingTime : " + chargingTime);
        log.Info("chargingResponse : " + chargingResponse);

        log.Info("****************************************");
        log.Info(" ");

        if (chargingResponse.Trim() == "1")//CHARGED THANH CONG
        {
            #region Log Doanh Thu

            var logInfo = new ViSport_S2_Charged_Users_LogInfo();

            logInfo.ID                   = ConvertUtility.ToInt32(registeredId);
            logInfo.User_ID              = userId;
            logInfo.Request_ID           = requestId;
            logInfo.Service_ID           = serviceId;
            logInfo.Command_Code         = "CLIP";
            logInfo.Service_Type         = ConvertUtility.ToInt32(serviceType);
            logInfo.Charging_Count       = 0;
            logInfo.FailedChargingTimes  = 0;
            logInfo.RegisteredTime       = DateTime.Now;
            logInfo.ExpiredTime          = DateTime.Now.AddDays(1);
            logInfo.Registration_Channel = "SMS";
            logInfo.Status               = 1;
            logInfo.Operator             = "vnmobile";
            logInfo.Price                = ConvertUtility.ToInt32(chargingValue);
            logInfo.Reason               = "Succ";

            ViSport_S2_Registered_UsersController.VClipInsertLog(logInfo);

            #endregion
        }
        else //CHARGED THAT BAI
        {
            #region Log Doanh Thu

            var logInfo = new ViSport_S2_Charged_Users_LogInfo();

            logInfo.ID                   = ConvertUtility.ToInt32(registeredId);
            logInfo.User_ID              = userId;
            logInfo.Request_ID           = requestId;
            logInfo.Service_ID           = serviceId;
            logInfo.Command_Code         = "CLIP";
            logInfo.Service_Type         = ConvertUtility.ToInt32(serviceType);
            logInfo.Charging_Count       = 0;
            logInfo.FailedChargingTimes  = 0;
            logInfo.RegisteredTime       = DateTime.Now;
            logInfo.ExpiredTime          = DateTime.Now.AddDays(1);
            logInfo.Registration_Channel = "SMS";
            logInfo.Status               = 1;
            logInfo.Operator             = "vnmobile";
            logInfo.Price                = ConvertUtility.ToInt32(chargingValue);
            logInfo.Reason               = chargingResponse;

            ViSport_S2_Registered_UsersController.VClipInsertLog(logInfo);

            #region Check charging price
            //if (DateTime.Now.Hour <= 22)
            //{
            //    const string userName = "******";
            //    const string userPass = "******";
            //    const string cpId = "1928";
            //    try
            //    {
            //        DataTable dt = ViSport_S2_Registered_UsersController.VClipGetInfo_UserCharg(userId);
            //        if (dt != null && dt.Rows.Count > 0)
            //        {
            //            ViSport_S2_Registered_UsersController.Insert_CharingComand_Retry(
            //                    ConvertUtility.ToInt32(dt.Rows[0]["Id"].ToString()),
            //                    dt.Rows[0]["User_ID"].ToString(),
            //                    dt.Rows[0]["Request_Id"].ToString(),
            //                    ConvertUtility.ToInt32(dt.Rows[0]["Service_ID"].ToString()),
            //                    999,
            //                    1000,
            //                    cpId,
            //                    userName,
            //                    userPass,
            //                    "http://sv167.vmgmedia.vn:8000/JobSubs/VClip/VclipNotification.asmx"
            //                    );
            //        }
            //    }
            //    catch (Exception ex)
            //    {
            //        log.Error("Lỗi charg retry user_ID :" + userId + "--error--" + ex.ToString());
            //    }

            //}
            #endregion

            #endregion
        }

        if (chargingResponse.Trim() == "1")
        {
            return("1");

            #region Gui MT cho khach hang thong bao gia han thanh cong

            var       objSentMt = new ServiceProviderService();
            const int msgType   = (int)Constant.MessageType.NoCharge;

            string message = "(092)Quy khach da gia han thanh cong DV VMclip cua Vietnamobile. Moi ban truy cap: http://kho-clip.com/" + userId + ".aspx de xem cac video HOT cap nhat 24/24 MIEN PHI. De huy DK, soan CLIP OFF gui 949. HT 19001255";

            const string commandCode = "CLIP";
            int          value       = objSentMt.sendMT(userId, message, "949", commandCode, msgType.ToString(), requestId, "1", "1", "0", "0");

            var objMt = new ViSport_S2_SMS_MTInfo();
            objMt.User_ID       = userId;
            objMt.Message       = message;
            objMt.Service_ID    = serviceId;
            objMt.Command_Code  = commandCode;
            objMt.Message_Type  = 1;
            objMt.Request_ID    = requestId;
            objMt.Total_Message = 1;
            objMt.Message_Index = 0;
            objMt.IsMore        = 0;
            objMt.Content_Type  = 0;
            objMt.ServiceType   = 0;
            objMt.ResponseTime  = DateTime.Now;
            objMt.isLock        = false;
            objMt.PartnerID     = "Xzone";
            objMt.Operator      = "vnmobile";
            ViSport_S2_SMS_MTController.InsertVClip(objMt);

            log.Info(" ");
            log.Info("***** LOG SEND MT VCLIP *****");

            log.Info("User_ID : " + userId);
            log.Info("Message : " + message);
            log.Info("Service_ID : " + serviceId);
            log.Info("Command_Code : " + commandCode);
            log.Info("Send_MT : " + value);

            log.Info("****************************************");
            log.Info(" ");


            #endregion
        }

        return("1");
    }
예제 #4
0
    public int Execute(int jobID)
    {
        WebServiceCharging3g webServiceCharging3G = new WebServiceCharging3g();
        string userName = "******";
        string userPass = "******";
        string cpId     = "1928";
        string price;

        try
        {
            DataTable dt = ViSport_S2_Registered_UsersController.VClipGetMTByStatus(false);
            if (dt != null && dt.Rows.Count > 0)
            {
                string message        = string.Empty;
                string returnValue    = string.Empty;
                string notEnoughMoney = "Result:12,Detail:Not enough money.";

                string serviceType = "Charged Sub VClip";
                string serviceName = "VClip";
                string reasonLog   = string.Empty;
                string status      = "1";

                foreach (DataRow dr in dt.Rows)
                {
                    string userId = dr["User_ID"].ToString();
                    price       = "2000";
                    returnValue = webServiceCharging3G.PaymentVnmWithAccount(userId, price, serviceType, serviceName, userName, userPass, cpId);
                    if (returnValue.Trim() == notEnoughMoney)
                    {
                        price       = "1000";
                        returnValue = webServiceCharging3G.PaymentVnmWithAccount(userId, price, serviceType, serviceName, userName, userPass, cpId);
                    }

                    if (returnValue == "1")//CHARGED THANH CONG
                    {
                        #region Log Doanh Thu

                        var logInfo = new ViSport_S2_Charged_Users_LogInfo();

                        logInfo.ID                   = ConvertUtility.ToInt32(dr["Id"].ToString());
                        logInfo.User_ID              = userId;
                        logInfo.Request_ID           = dr["Request_ID"].ToString();
                        logInfo.Service_ID           = dr["Service_ID"].ToString();
                        logInfo.Command_Code         = dr["Command_Code"].ToString();
                        logInfo.Service_Type         = ConvertUtility.ToInt32(dr["Service_Type"].ToString());
                        logInfo.Charging_Count       = ConvertUtility.ToInt32(dr["Charging_Count"].ToString());
                        logInfo.FailedChargingTimes  = ConvertUtility.ToInt32(dr["FailedChargingTimes"].ToString());
                        logInfo.RegisteredTime       = ConvertUtility.ToDateTime(dr["RegisteredTime"].ToString());
                        logInfo.ExpiredTime          = DateTime.Now;
                        logInfo.Registration_Channel = dr["Registration_Channel"].ToString();
                        logInfo.Status               = ConvertUtility.ToInt32(dr["Status"].ToString());
                        logInfo.Operator             = dr["Operator"].ToString();
                        logInfo.Price                = ConvertUtility.ToInt32(price);
                        logInfo.Reason               = "Succ";

                        ViSport_S2_Registered_UsersController.VClipInsertLog(logInfo);

                        #endregion
                    }
                    else
                    {
                        #region Log Doanh Thu

                        var logInfo = new ViSport_S2_Charged_Users_LogInfo();

                        logInfo.ID                   = ConvertUtility.ToInt32(dr["Id"].ToString());
                        logInfo.User_ID              = userId;
                        logInfo.Request_ID           = dr["Request_ID"].ToString();
                        logInfo.Service_ID           = dr["Service_ID"].ToString();
                        logInfo.Command_Code         = dr["Command_Code"].ToString();
                        logInfo.Service_Type         = ConvertUtility.ToInt32(dr["Service_Type"].ToString());
                        logInfo.Charging_Count       = ConvertUtility.ToInt32(dr["Charging_Count"].ToString());
                        logInfo.FailedChargingTimes  = ConvertUtility.ToInt32(dr["FailedChargingTimes"].ToString());
                        logInfo.RegisteredTime       = ConvertUtility.ToDateTime(dr["RegisteredTime"].ToString());
                        logInfo.ExpiredTime          = DateTime.Now;
                        logInfo.Registration_Channel = dr["Registration_Channel"].ToString();
                        logInfo.Status               = ConvertUtility.ToInt32(dr["Status"].ToString());
                        logInfo.Operator             = dr["Operator"].ToString();
                        logInfo.Price                = ConvertUtility.ToInt32(price);
                        logInfo.Reason               = returnValue;

                        ViSport_S2_Registered_UsersController.VClipInsertLog(logInfo);

                        #endregion
                    }

                    if (returnValue == "1")//CHARGED THANH CONG
                    {
                        #region Gui MT cho khach hang thong bao gia han thanh cong

                        var       objSentMt = new ServiceProviderService();
                        const int msgType   = (int)Constant.MessageType.NoCharge;

                        message = "(092)Quy khach da gia han thanh cong DV VMclip cua Vietnamobile. Moi ban truy cap: http://kho-clip.com/" + userId + ".aspx de xem cac video HOT cap nhat 24/24 MIEN PHI. De huy DK, soan CLIP OFF gui 949. HT 19001255";

                        string serviceId   = dr["Service_ID"].ToString();
                        string commandCode = dr["Command_Code"].ToString();
                        string requestId   = dr["Request_ID"].ToString();

                        int value = objSentMt.sendMT(userId, message, serviceId, commandCode, msgType.ToString(), requestId, "1", "1", "0", "0");

                        var objMt = new ViSport_S2_SMS_MTInfo();
                        objMt.User_ID       = userId;
                        objMt.Message       = message;
                        objMt.Service_ID    = serviceId;
                        objMt.Command_Code  = commandCode;
                        objMt.Message_Type  = 1;
                        objMt.Request_ID    = requestId;
                        objMt.Total_Message = 1;
                        objMt.Message_Index = 0;
                        objMt.IsMore        = 0;
                        objMt.Content_Type  = 0;
                        objMt.ServiceType   = 0;
                        objMt.ResponseTime  = DateTime.Now;
                        objMt.isLock        = false;
                        objMt.PartnerID     = "Xzone";
                        objMt.Operator      = "vnmobile";
                        ViSport_S2_SMS_MTController.InsertVClip(objMt);

                        log.Info(" ");
                        log.Info("***** LOG SEND MT VCLIP *****");

                        log.Info("User_ID : " + userId);
                        log.Info("Message : " + message);
                        log.Info("Service_ID : " + serviceId);
                        log.Info("Command_Code : " + commandCode);
                        log.Info("Send_MT : " + value);

                        log.Info("****************************************");
                        log.Info(" ");


                        #endregion
                    }
                }
            }
        }
        catch (Exception ex)
        {
            log.Info(" ");
            log.Info("***** VClip Charged Error *****");
            log.Info("Error : " + ex);
            log.Info(" ");
            return(0);
        }

        return(1);
    }
    public void ProcessRequest(HttpContext context)
    {
        //context.Response.ContentType = "text/plain";
        //context.Response.Write("Hello World");

        string serviceCode = context.Request.QueryString["serviceCode"];

        if (!string.IsNullOrEmpty(serviceCode))
        {
            serviceCode = serviceCode.ToUpper();
        }

        string msisdn = context.Request.QueryString["msisdn"];
        string type   = context.Request.QueryString["Type"];

        string serviceId = "8979";

        const string reType    = "text";
        string       reContent = string.Empty;

        log4net.ILog log = log4net.LogManager.GetLogger("File");
        log.Debug(" ");
        log.Debug(" ");
        log.Debug("--------------------VOTE MOBI FROM Mr.T-------------------------");
        log.Debug("User_ID: " + msisdn);
        log.Debug("Command_Code: " + serviceCode);
        log.Debug("Type: " + type);
        log.Debug(" ");
        log.Debug(" ");


        if (serviceCode == "V1" || serviceCode == "V2" || serviceCode == "G1" || serviceCode == "G2")//DV VOTE1 & VOTE2
        {
            int    votePersonId = 1;
            string personName   = "Mai Tho";
            string commandCode  = "VOTE1";

            int dislikePersonId = 0;

            if (serviceCode == "V2")
            {
                votePersonId = 2;
                personName   = "Linh Miu";
                commandCode  = "VOTE2";
            }
            else if (serviceCode == "G1")
            {
                votePersonId    = 2;
                dislikePersonId = 1;
                personName      = "Mai Tho";
                commandCode     = "GACH1";
            }
            else if (serviceCode == "G2")
            {
                votePersonId    = 1;
                dislikePersonId = 2;
                personName      = "Linh Miu";
                commandCode     = "GACH2";
            }

            if (type == "1")//DK DV LAN DAU
            {
                var entity = new VoteRegisteredInfo();
                entity.User_ID              = msisdn;
                entity.Request_ID           = "0";
                entity.Service_ID           = serviceId;
                entity.Command_Code         = commandCode;
                entity.Service_Type         = 1;
                entity.Charging_Count       = 0;
                entity.FailedChargingTime   = 0;
                entity.RegisteredTime       = DateTime.Now;
                entity.ExpiredTime          = DateTime.Now.AddDays(1);
                entity.Registration_Channel = "SMS";
                entity.Status     = 1;
                entity.Operator   = "vms";
                entity.Vote_Count = 1;

                entity.Vote_PersonId = votePersonId;
                entity.IsDislike     = dislikePersonId;

                if (serviceCode == "V1" || serviceCode == "V2")
                {
                    DataTable dt = VoteRegisterController.NewVoteRegisterInsert(entity);

                    if (dt.Rows[0]["RETURN_ID"].ToString() == "0")//CHUA DK USER
                    {
                        reContent = AppEnv.GetSetting("Vote_Sms_RegisterSucess_Mt2_Like_Mobi").Replace("VoteCount", "1").Replace("VoteTop", "100");
                    }
                    else if (dt.Rows[0]["RETURN_ID"].ToString() == "1")
                    {
                        int    voteCount = ConvertUtility.ToInt32(dt.Rows[0]["VOTE_SUM"]);
                        string voteTop   = GetTopVote(voteCount);
                        reContent = AppEnv.GetSetting("Vote_Sms_RegisterSucess_Mt2_Like_Mobi").Replace("VoteCount", voteCount.ToString()).Replace("VoteTop", voteTop);
                    }

                    #region LOG DOANH THU

                    NewVoteLogDoanhThu(msisdn, "0", serviceId, "VOTE1");

                    #endregion
                }
                //else
                //{
                //    DataTable dt = VoteRegisterController.VoteRegisterInsert(entity);
                //    DataTable dtDislike = VoteRegisterController.VoteRegisterDislikeInsert(entity);

                //    if (dt.Rows[0]["RETURN_ID"].ToString() == "0")//DK DICH VU LAN DAU
                //    {
                //        reContent = AppEnv.GetSetting("Vote_Sms_RegisterSucess_Mt2_Like_Mobi").Replace("PersonName", personName);
                //    }
                //    else if (dt.Rows[0]["RETURN_ID"].ToString() == "1")
                //    {
                //        reContent = AppEnv.GetSetting("Vote_Sms_AlreadyRegister_Mobi");
                //    }
                //}
            }
            else if (type == "2")//UPDATE LUOT VOTE (SUB HANG NGAY)
            {
                DataTable info = VoteRegisterController.NewVoteGetUserInfo(msisdn);
                if (info != null && info.Rows.Count > 0)
                {
                    var logInfo = new ViSport_S2_Charged_Users_LogInfo();

                    logInfo.ID                   = ConvertUtility.ToInt32(info.Rows[0]["ID"].ToString());
                    logInfo.User_ID              = msisdn;
                    logInfo.Request_ID           = info.Rows[0]["Request_ID"].ToString();
                    logInfo.Service_ID           = info.Rows[0]["Service_ID"].ToString();
                    logInfo.Command_Code         = info.Rows[0]["Command_Code"].ToString();
                    logInfo.Service_Type         = 0;//Charged Sub Service_Type
                    logInfo.Charging_Count       = ConvertUtility.ToInt32(info.Rows[0]["Charging_Count"].ToString());
                    logInfo.FailedChargingTimes  = ConvertUtility.ToInt32(info.Rows[0]["FailedChargingTimes"].ToString());
                    logInfo.RegisteredTime       = DateTime.Now;
                    logInfo.ExpiredTime          = DateTime.Now.AddDays(1);
                    logInfo.Registration_Channel = info.Rows[0]["Registration_Channel"].ToString();
                    logInfo.Status               = ConvertUtility.ToInt32(info.Rows[0]["Status"].ToString());
                    logInfo.Operator             = info.Rows[0]["Operator"].ToString();
                    logInfo.Price                = 2000;
                    logInfo.Vote_PersonId        = ConvertUtility.ToInt32(info.Rows[0]["Vote_PersonId"].ToString());
                    logInfo.Reason               = "Succ";

                    if (serviceCode == "V1" || serviceCode == "V2")
                    {
                        VoteRegisterController.NewInsertLogLike(logInfo);

                        DataTable dt        = VoteRegisterController.NewVoteGetUserInfo(msisdn);
                        int       voteCount = ConvertUtility.ToInt32(dt.Rows[0]["Vote_Count"]);
                        string    voteTop   = GetTopVote(voteCount);

                        reContent = AppEnv.GetSetting("Vote_Sms_RegisterSucess_Mt2_Like_Mobi").Replace("VoteCount", voteCount.ToString()).Replace("VoteTop", voteTop);

                        //DataTable dt = VoteRegisterController.GetVoteAccountInfo(msisdn, info.Rows[0]["Command_Code"].ToString());
                        //reContent = AppEnv.GetSetting("Vote_Sms_ChargedSubSucess_Like").Replace("PersonName", dt.Rows[0]["Name"].ToString());
                        //reContent = reContent.Replace("VoteCount", dt.Rows[0]["Count"].ToString());
                        //reContent = reContent.Replace("VoteTop", dt.Rows[0]["Top"].ToString());
                    }
                    //else if(serviceCode == "G1" || serviceCode == "G2")
                    //{
                    //    if (info.Rows[0]["Vote_PersonId"].ToString() == "1")
                    //    {
                    //        logInfo.Vote_PersonId = 2;
                    //    }
                    //    else if (info.Rows[0]["Vote_PersonId"].ToString() == "2")
                    //    {
                    //        logInfo.Vote_PersonId = 1;
                    //    }
                    //    VoteRegisterController.InsertLogDisLike(logInfo);
                    //    DataTable dt = VoteRegisterController.GetVoteAccountInfo(msisdn, info.Rows[0]["Command_Code"].ToString());

                    //    reContent = AppEnv.GetSetting("Vote_Sms_ChargedSubSucess_UnLike").Replace("PersonName", dt.Rows[0]["Name"].ToString());
                    //    reContent = reContent.Replace("DislikeCount", dt.Rows[0]["Count"].ToString());
                    //    reContent = reContent.Replace("DislikeTop", dt.Rows[0]["Top"].ToString());
                    //}
                }
            }
            else if (type == "3")//HUY DICH VU
            {
                DataTable dt = VoteRegisterController.NewVoteRegisterUserLock(msisdn);

                if (dt.Rows[0]["RETURN_ID"].ToString() == "0")//CHUA DK USER
                {
                    reContent = AppEnv.GetSetting("Vote_Sms_LockUserError_Mobi");
                }
                else if (dt.Rows[0]["RETURN_ID"].ToString() == "1")
                {
                    reContent = AppEnv.GetSetting("Vote_Sms_LockUserSuccess_Mobi");
                }
                //DataTable dt = VoteRegisterController.VoteRegisterUserLock(msisdn, 1);

                //if (dt.Rows[0]["RETURN_ID"].ToString() == "0")//CHUA DK USER
                //{
                //    reContent = AppEnv.GetSetting("Vote_Sms_LockUserError_Mobi");
                //}
                //else if (dt.Rows[0]["RETURN_ID"].ToString() == "1")
                //{
                //    reContent = AppEnv.GetSetting("Vote_Sms_LockUserSuccess_Mobi");
                //}
            }
        }

        if (serviceCode == "T1") //DV GAME THANH_NU
        {
            if (type == "1")     //DK DV LAN DAU
            {
                var entity = new ThanhNuRegisteredUsers();
                entity.UserId              = msisdn;
                entity.RequestId           = "0";
                entity.ServiceId           = "2288";
                entity.CommandCode         = "DK";
                entity.ServiceType         = 1;
                entity.ChargingCount       = 0;
                entity.FailedChargingTimes = 0;
                entity.RegisteredTime      = DateTime.Now;
                entity.ExpiredTime         = DateTime.Now.AddDays(1);
                entity.RegistrationChannel = "SMS";
                entity.Status              = 1;
                entity.Operator            = GetTelco(msisdn);

                #region GOI HAM DK BEN DOI TAC

                string partnerResult = AppEnv.ThanhNuDangKy(msisdn);

                log.Debug(" ");
                log.Debug("**********");
                log.Debug("Partner_Thanh_Nu_smsKichHoat : " + partnerResult);
                log.Debug("**********");
                log.Debug(" ");

                string[] arrValue = partnerResult.Split('|');
                if (arrValue[0].Trim() == "1")
                {
                    ViSport_S2_Registered_UsersController.ThanhNuRegisterUserStatusUpdate(msisdn, 1);
                    reContent = "Ban da la thanh vien cua Game Thanh Nu. Click vao link sau de dang nhap Game " + arrValue[1];
                }
                else if (arrValue[0].Trim() == "0")
                {
                    DataTable value = ViSport_S2_Registered_UsersController.ThanhNuRegisterUserInsert(entity);
                    if (value.Rows[0]["RETURN_ID"].ToString() == "0")
                    {
                        reContent = "Chuc mung Quy Khach da dang ky thanh cong Game Thanh Nu Gia cuoc 1000d-ngay, Goi dich vu se duoc tu dong gia han hang ngay.Kich hoat tai khoan " + arrValue[1] + " .De huy dang ky, Quy Khach soan HUY TN gui 2288.";
                    }
                    else if (value.Rows[0]["RETURN_ID"].ToString() == "1")
                    {
                        ViSport_S2_Registered_UsersController.ThanhNuRegisterUserStatusUpdate(msisdn, 1);
                        reContent = "Ban da la thanh vien cua Game Thanh Nu. Click vao link sau de dang nhap Game " + arrValue[1];
                    }
                }

                #endregion
            }
            else if (type == "2")//CHARGED SUB
            {
                var partnerService = new vn.thanhnu.Service();

                DataTable dtUser = ViSport_S2_Registered_UsersController.ThanhNuGetUserInfo(msisdn);
                if (dtUser != null && dtUser.Rows.Count > 0)
                {
                    string partnerResult = partnerService.smsGiaHan(msisdn, "1");
                    if (partnerResult.Trim() == "1")
                    {
                        reContent = "Goi dich vu Game Thanh Nu  cua Quy Khach da duoc gia han thanh cong. Quy khach duoc cong 110 G_Coin vao tk. Cam on Quy Khach da su dung goi dich vu .";
                    }

                    #region LOG DOANH THU

                    //LOG DOANH THU
                    var e = new ThanhNuChargedUserLogInfo();

                    e.ID                   = ConvertUtility.ToInt32(dtUser.Rows[0]["ID"].ToString());
                    e.User_ID              = msisdn;
                    e.Request_ID           = "0";
                    e.Service_ID           = serviceId;
                    e.Command_Code         = "DK";
                    e.Service_Type         = 0;
                    e.Charging_Count       = 0;
                    e.FailedChargingTime   = 0;
                    e.RegisteredTime       = DateTime.Now;
                    e.ExpiredTime          = DateTime.Now.AddDays(1);
                    e.Registration_Channel = "SMS";
                    e.Status               = 1;
                    e.Operator             = GetTelco(msisdn);

                    e.Reason = "Succ";

                    e.Price         = 1000;
                    e.PartnerResult = partnerResult;

                    ViSport_S2_Registered_UsersController.ThanhNuChargedUserLog(e);

                    #endregion
                }
            }
            else if (type == "3")//HUY DICH VU
            {
                #region GOI HAM HUY BEN DOI TAC

                string partnerResult = AppEnv.ThanhNuHuy(msisdn);
                if (partnerResult.Trim() == "1")
                {
                    DataTable value = ViSport_S2_Registered_UsersController.ThanhNuRegisterUserStatusUpdate(msisdn, 0);
                    if (value.Rows[0]["RETURN_ID"].ToString() == "1")
                    {
                        reContent = "Toan bo tai khoan Game Thanh Nu cua Quy khach se bi huy.De dang ki lai Qk vui long soan tin DK TN gui 2288";
                    }
                }

                #endregion
            }
        }



        var aSerializer = new JavaScriptSerializer();

        var obj = new MT();
        var ct1 = new ContentInfo();
        obj.List = new ContentInfo[1];

        ct1.Type    = reType;
        ct1.Content = reContent;
        obj.List[0] = ct1;

        string strReturn = aSerializer.Serialize(obj);

        log.Debug(" ");
        log.Debug(" ");
        log.Debug("strReturn: " + strReturn);
        log.Debug(" ");
        log.Debug(" ");

        context.Response.ContentType = "text/html";
        context.Response.Write(strReturn);
    }