示例#1
0
        protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            string str2;
            int    result = 0;

            int.TryParse(e.CommandArgument.ToString(), out result);
            if ((result > 0) && ((str2 = e.CommandName) != null))
            {
                if (str2 == "setdefault")
                {
                    DistributorGradeBrower.SetAgentGradeDefault(result);
                    this.ReLoad(true);
                }
                else if (str2 == "del")
                {
                    string str3 = DistributorGradeBrower.DelOneAgentGrade(result);
                    if (str3 != null)
                    {
                        if (str3 == "-1")
                        {
                            this.ShowMsg("不能删除,因为该等级下面已经有代理商!", false);
                            return;
                        }
                        if (str3 == "1")
                        {
                            this.ReLoad(true);
                            return;
                        }
                    }
                    this.ShowMsg("删除失败", false);
                }
            }
        }