Ejemplo n.º 1
0
 public static void SetBetDetail(string STime, string UserId, string BetId, string Detail)
 {
     BetDetailDAL.SaveContentFile(Detail, string.Concat(new string[]
     {
         STime,
         "\\",
         UserId,
         "\\",
         BetId,
         ".js"
     }));
 }
Ejemplo n.º 2
0
 public static string GetBetDetail(string STime, string UserId, string BetId)
 {
     if (string.IsNullOrEmpty(BetDetailDAL.ReadContentFile(STime + "\\" + UserId + "\\" + BetId + ".js")))
     {
         string str = "";
         using (DbOperHandler dbOperHandler = new ComData().Doh())
         {
             dbOperHandler.Reset();
             dbOperHandler.SqlCmd = "select [Detail] from N_UserBet where Id=" + BetId;
             DataTable dataTable = dbOperHandler.GetDataTable();
             str = string.Concat(dataTable.Rows[0]["Detail"]);
             dataTable.Clear();
             dataTable.Dispose();
         }
         return(BetDetailDAL.ReadContentFile(STime + "\\" + UserId + "\\" + str + ".js"));
     }
     return(BetDetailDAL.ReadContentFile(STime + "\\" + UserId + "\\" + BetId + ".js"));
 }
Ejemplo n.º 3
0
        private static string ReadContentFile(string fileName)
        {
            string str = BetDetailDAL.Folder + fileName;

            if (!BetDetailDAL.FileExists(str))
            {
                return("");
            }
            try
            {
                StreamReader streamReader = new StreamReader(str, Encoding.UTF8);
                string       end          = streamReader.ReadToEnd();
                streamReader.Close();
                return(end);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 4
0
        private static string ReadContentFile(string fileName)
        {
            string text = BetDetailDAL.Folder + fileName;

            if (!BetDetailDAL.FileExists(text))
            {
                return("");
            }
            string result;

            try
            {
                StreamReader streamReader = new StreamReader(text, Encoding.UTF8);
                string       text2        = streamReader.ReadToEnd();
                streamReader.Close();
                result = text2;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Ejemplo n.º 5
0
 public static bool connectState(string path)
 {
     return(BetDetailDAL.connectState(path, "", ""));
 }
Ejemplo n.º 6
0
 public static void SetYouleDetail(string STime, string UserId, string BetId, string Detail)
 {
     BetDetailDAL.SaveContentFile(Detail, STime + "\\" + UserId + "\\" + BetId + ".js");
 }
Ejemplo n.º 7
0
 private static void SaveContentFile(string TxtStr, string fileName)
 {
     BetDetailDAL.SaveContentFile(TxtStr, fileName, "2");
 }