public string Translate(string apple)
 {
     if (translator == 1)
     {
         var text = TransG.TranslateLiteAsync(apple, Language.Auto, Language.English).GetAwaiter().GetResult();
         return(text.MergedTranslation);
     }
     else
     {
         var text = TransY.Translate(apple, "en");
         return(text.Text[0]);
     }
 }
Beispiel #2
0
        public static TransG TranDataBind(IDataReader drTran)
        {
            TransG tObject = new TransG();

            if (drTran.Read())
            {
                tObject.GameID         = null == drTran["gameid"] ? 0 : Convert.ToInt32(drTran["gameid"]);
                tObject.GamePoints     = null == drTran["gamepoints"] ? 0 : Convert.ToInt32(drTran["gamepoints"]);
                tObject.state          = null == drTran["state"] ? 0 : Convert.ToInt32(drTran["state"]);
                tObject.TranGiftPoints = null == drTran["GiftPoints"] ? 0 : Convert.ToInt32(drTran["GiftPoints"]);
                tObject.TranPoints     = null == drTran["Points"] ? 0 : Convert.ToInt32(drTran["Points"]);
                tObject.TranTime       = null == drTran["time"] ? DateTime.Now : Convert.ToDateTime(drTran["time"]);
                tObject.UserID         = null == drTran["userid"] ? 0 : Convert.ToInt32(drTran["userid"]);
                tObject.GUserID        = null == drTran["userid"] ? 0 : Convert.ToInt32(drTran["guserid"]);
                tObject.TranID         = null == drTran["id"] ? string.Empty : drTran["id"].ToString();
                tObject.TranIP         = null == drTran["TranIP"] ? string.Empty : drTran["TranIP"].ToString();
                tObject.Phone          = null == drTran["phone"] ? string.Empty : drTran["phone"].ToString();
                drTran.Close();
            }
            return(tObject);
        }
Beispiel #3
0
        public static void gamepaysend(string sGTranID)
        {
            TransG tgObject = TransGBLL.UserTranSel(sGTranID);
            string sReturn  = string.Empty;

            if (tgObject.state == 1)
            {
                string        sUrl   = "http://union.dao50.com/tarns/transGame.aspx";
                int           price  = tgObject.TranPoints / 10;
                StringBuilder sbText = new StringBuilder();
                sbText.AppendFormat("orderid={0}&", tgObject.TranID.Trim());
                sbText.AppendFormat("userid={0}&", tgObject.UserID);
                sbText.AppendFormat("gameid={0}&", tgObject.GameID);
                sbText.AppendFormat("ordertime={0}&", tgObject.TranTime);
                sbText.AppendFormat("gameuserid={0}&", tgObject.GUserID);
                sbText.AppendFormat("price={0}&", price.ToString());
                sbText.AppendFormat("points={0}&", tgObject.TranPoints);
                sbText.AppendFormat("giftpoints={0}&", tgObject.TranGiftPoints);
                sbText.AppendFormat("tranip={0}", tgObject.TranIP);
                sReturn = string.Format("{0}?{1}", sUrl, sbText.ToString());
            }
            ProvideCommon.GetPageInfo(sReturn);
        }