public static bool ObjectToBool(object o)
 {
     return(TypeUtil.ObjectToBool(o, false));
 }
 public static int ObjectToInt(object o)
 {
     return(TypeUtil.ObjectToInt(o, 0));
 }
 public static bool ToBool(string s)
 {
     return(TypeUtil.StringToBool(s, false));
 }
 public static long ObjectToLong(object strValue)
 {
     return(TypeUtil.ObjectToLong(strValue, 0L));
 }
 public static int StringToInt(string s)
 {
     return(TypeUtil.StringToInt(s, 0));
 }
 public static decimal ObjectToDecimal(object o)
 {
     return(TypeUtil.ObjectToDecimal(o, 0m));
 }
 public static decimal StringToDecimal(string s)
 {
     return(TypeUtil.StringToDecimal(s, 0m));
 }
        public static string GetAgentRightKeys(int agentRight, int aguRight, int isclient)
        {
            string text = "";

            if (isclient == 2)
            {
                text = TypeUtil.addkeys(text, "recharges");
            }
            else
            {
                text = TypeUtil.addkeys(text, "new");
                if (isclient == 1)
                {
                    text = TypeUtil.addkeys(text, "pay");
                    text = TypeUtil.addkeys(text, "payOrder");
                }
                if (TypeUtil.AgentRight(agentRight, aguRight))
                {
                    if (aguRight <= 128)
                    {
                        if (aguRight <= 16)
                        {
                            switch (aguRight)
                            {
                            case 1:
                                text = TypeUtil.addkeys(text, "recharges");
                                text = TypeUtil.addkeys(text, "payunline");
                                break;

                            case 2:
                                text = TypeUtil.addkeys(text, "gameRecord");
                                break;

                            case 3:
                                break;

                            case 4:
                                text = TypeUtil.addkeys(text, "balance");
                                break;

                            default:
                                if (aguRight != 8)
                                {
                                    if (aguRight == 16)
                                    {
                                        text = TypeUtil.addkeys(text, "notice");
                                    }
                                }
                                else
                                {
                                    text = TypeUtil.addkeys(text, "accountScoreList");
                                }
                                break;
                            }
                        }
                        else
                        {
                            if (aguRight != 32)
                            {
                                if (aguRight != 64)
                                {
                                    if (aguRight == 128)
                                    {
                                        text = TypeUtil.addkeys(text, "agent");
                                    }
                                }
                                else
                                {
                                    text = TypeUtil.addkeys(text, "game");
                                }
                            }
                            else
                            {
                                text = TypeUtil.addkeys(text, "revise");
                            }
                        }
                    }
                    else
                    {
                        if (aguRight <= 1024)
                        {
                            if (aguRight != 256)
                            {
                                if (aguRight != 512)
                                {
                                    if (aguRight == 1024)
                                    {
                                        text = TypeUtil.addkeys(text, "change");
                                    }
                                }
                                else
                                {
                                    text = TypeUtil.addkeys(text, "recordcs");
                                }
                            }
                            else
                            {
                                text = TypeUtil.addkeys(text, "baobiao");
                            }
                        }
                        else
                        {
                            if (aguRight <= 4096)
                            {
                                if (aguRight != 2048)
                                {
                                    if (aguRight == 4096)
                                    {
                                        text = TypeUtil.addkeys(text, "game_win");
                                    }
                                }
                                else
                                {
                                    text = TypeUtil.addkeys(text, "agent_win");
                                }
                            }
                            else
                            {
                                if (aguRight != 8192)
                                {
                                    if (aguRight == 16384)
                                    {
                                        text = TypeUtil.addkeys(text, "DuiHuanRecord");
                                    }
                                }
                                else
                                {
                                    text = TypeUtil.addkeys(text, "money");
                                }
                            }
                        }
                    }
                }
            }
            return(text);
        }
 public static System.DateTime ObjectToDateTime(object o)
 {
     return(TypeUtil.ObjectToDateTime(o, System.DateTime.Now));
 }
Exemple #10
0
 public static System.DateTime StringToDateTime(string s)
 {
     return(TypeUtil.StringToDateTime(s, System.DateTime.Now));
 }