Beispiel #1
0
 public static void DELETE_BANG_CHIEN_DAT_CUOC_DATA(string string_0, string string_1, int int_0, int int_1)
 {
     DBA.ExeSqlCommand(string.Format("DELETE FROM BANG_CHIEN_TIEN_DAT_CUOC WHERE UserId = '{0}' and UserName='******' and UserName='******'", string_0, string_1, int_0));
     if (int_1 == 1)
     {
         DBA.ExeSqlCommand(string.Format("UPDATE TBL_XWWL_Guild SET Thang=Thang+1 WHERE ID='{0}'", int_0));
         RxjhClass.INSERT_BACH_BAO_GHI_CHEP(string_0, string_1, 0, "Bang chien thang loi duoc", 1, 50);
         return;
     }
     if (int_1 != -1)
     {
         if (int_1 == 0)
         {
             DBA.ExeSqlCommand(string.Format("UPDATE TBL_XWWL_Guild SET Hoa=Hoa+1 WHERE ID='{0}'", int_0));
         }
         return;
     }
     DBA.ExeSqlCommand(string.Format("UPDATE TBL_XWWL_Guild SET Bai=Bai+1 WHERE ID='{0}'", int_0));
     RxjhClass.INSERT_BACH_BAO_GHI_CHEP(string_0, string_1, 0, "Bang chien that bai thua tran", 1, 50);
 }
Beispiel #2
0
        public static int SetUserName(string string_0, string string_1, int int_0, byte[] byte_0, string string_2)
        {
            byte[] numArray  = new byte[73];
            byte[] numArray1 = new byte[1095];
            byte[] numArray2 = new byte[2628];
            byte[] bytes     = BitConverter.GetBytes(RxjhClass.GetDBItmeId());
            byte[] bytes1    = new byte[4];
            byte[] bytes2    = new byte[4];
            bytes2 = BitConverter.GetBytes(1);
            switch (int_0)
            {
            case 1:
            {
                bytes1 = BitConverter.GetBytes(100200002);
                break;
            }

            case 2:
            {
                bytes1 = BitConverter.GetBytes(200200002);
                break;
            }

            case 3:
            {
                bytes1 = BitConverter.GetBytes(300200002);
                break;
            }

            case 4:
            {
                bytes1 = BitConverter.GetBytes(400200002);
                break;
            }

            case 5:
            {
                bytes1 = BitConverter.GetBytes(500200002);
                break;
            }

            case 6:
            {
                bytes1 = BitConverter.GetBytes(700200002);
                break;
            }

            case 7:
            {
                bytes1 = BitConverter.GetBytes(800200001);
                break;
            }

            case 8:
            {
                bytes1 = BitConverter.GetBytes(100204001);
                break;
            }

            case 9:
            {
                bytes1 = BitConverter.GetBytes(200204001);
                break;
            }

            case 10:
            {
                bytes1 = BitConverter.GetBytes(900200001);
                break;
            }
            }
            Buffer.BlockCopy(bytes, 0, numArray, 0, 4);
            Buffer.BlockCopy(bytes1, 0, numArray, 8, 4);
            Buffer.BlockCopy(bytes2, 0, numArray, 12, 4);
            Buffer.BlockCopy(numArray, 0, numArray2, 0, 73);
            if (World.Login_tang_le_bao_co_hay_khong_mo_ra == 1)
            {
                byte[] numArray3 = new byte[73];
                byte[] bytes3    = BitConverter.GetBytes(RxjhClass.GetDBItmeId());
                byte[] bytes4    = BitConverter.GetBytes(World.Login_tang_le_bao_trang_phuc);
                Buffer.BlockCopy((Array)bytes3, 0, numArray3, 0, 4);
                Buffer.BlockCopy(bytes4, 0, numArray3, 8, 4);
                Buffer.BlockCopy(bytes2, 0, numArray3, 12, 4);
                Buffer.BlockCopy(numArray3, 0, numArray2, 73, 73);
            }
            int num  = 0;
            int num1 = 0;

            while (num1 < 4)
            {
                string    str       = string.Format("Select FLD_INDEX FROM TBL_XWWL_Char Where FLD_ID=@FLD_ID and FLD_INDEX=@INDEX", new object[0]);
                DataTable dataTable = DBA.smethod_9(str, new SqlParameter[] { SqlDBA.MakeInParam("@INDEX", SqlDbType.Int, 0, num1), SqlDBA.MakeInParam("@FLD_ID", SqlDbType.VarChar, 30, string_0) });
                if (dataTable.Rows.Count != 0)
                {
                    dataTable.Dispose();
                    num1++;
                }
                else
                {
                    num = num1;
                    dataTable.Dispose();
                    break;
                }
            }
            string    str1       = string.Format("Select FLD_INDEX FROM TBL_XWWL_Char Where FLD_ID=@FLD_ID", new object[0]);
            DataTable dataTable1 = DBA.smethod_9(str1, new SqlParameter[] { SqlDBA.MakeInParam("@FLD_ID", SqlDbType.VarChar, 30, string_0) });

            if (dataTable1.Rows.Count >= 4)
            {
                dataTable1.Dispose();
                return(-1);
            }
            dataTable1.Dispose();
            string str2 = string.Format("EXEC XWWL_INT_USER_DATA @FLD_ID,@name,@fqid,@rwid,@zy,@coue,@xrwhex,@xrwhex2", new object[0]);

            if (DBA.smethod_4(str2, new SqlParameter[] { SqlDBA.MakeInParam("@FLD_ID", SqlDbType.VarChar, 30, string_0), SqlDBA.MakeInParam("@name", SqlDbType.VarChar, 30, string_1), SqlDBA.MakeInParam("@fqid", SqlDbType.VarChar, 20, string_2), SqlDBA.MakeInParam("@rwid", SqlDbType.Int, 0, num), SqlDBA.MakeInParam("@zy", SqlDbType.Int, 0, int_0), SqlDBA.MakeInParam("@coue", SqlDbType.VarBinary, 10, byte_0), SqlDBA.MakeInParam("@xrwhex", SqlDbType.VarBinary, (int)numArray1.Length, numArray1), SqlDBA.MakeInParam("@xrwhex2", SqlDbType.VarBinary, (int)numArray2.Length, numArray2) }) != -1)
            {
                return(1);
            }
            return(-1);
        }
Beispiel #3
0
 static RxjhClass()
 {
     RxjhClass.ZYDNGuard();
 }