Beispiel #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"
     }));
 }
Beispiel #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"));
 }
Beispiel #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;
            }
        }
Beispiel #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);
        }
Beispiel #5
0
 public static bool connectState(string path)
 {
     return(BetDetailDAL.connectState(path, "", ""));
 }
Beispiel #6
0
 public static void SetYouleDetail(string STime, string UserId, string BetId, string Detail)
 {
     BetDetailDAL.SaveContentFile(Detail, STime + "\\" + UserId + "\\" + BetId + ".js");
 }
Beispiel #7
0
 private static void SaveContentFile(string TxtStr, string fileName)
 {
     BetDetailDAL.SaveContentFile(TxtStr, fileName, "2");
 }