Exemple #1
0
    private int BuildAdditionasXmlForJQC(ref string AdditionasXml)
    {
        TextBox[] tb   = new TextBox[8];
        TextBox[] tb_2 = new TextBox[8];

        for (int i = 0; i < 8; i++)
        {
            tb[i]   = (TextBox)this.FindControl("tbJQC" + (i + 1).ToString());
            tb_2[i] = (TextBox)this.FindControl("tbJQC" + (i + 1).ToString() + "_2");

            if (tb[i].Text.Trim() == "")
            {
                Shove._Web.JavaScript.Alert(this.Page, "第 " + (i + 1).ToString() + " 个球队名称输入不完整!");

                return(-1);
            }
        }

        AdditionasXml = PF.BuildIsuseAdditionasXmlFor1Team(8,
                                                           tb[0].Text.Trim(), tb_2[0].Text.Trim(),
                                                           tb[1].Text.Trim(), tb_2[0].Text.Trim(),
                                                           tb[2].Text.Trim(), tb_2[2].Text.Trim(),
                                                           tb[3].Text.Trim(), tb_2[2].Text.Trim(),
                                                           tb[4].Text.Trim(), tb_2[4].Text.Trim(),
                                                           tb[5].Text.Trim(), tb_2[4].Text.Trim(),
                                                           tb[6].Text.Trim(), tb_2[6].Text.Trim(),
                                                           tb[7].Text.Trim(), tb_2[6].Text.Trim());

        return(0);
    }
 private int BuildAdditionasXmlForJQC(ref string AdditionasXml)
 {
     TextBox[] boxArray  = new TextBox[8];
     TextBox[] boxArray2 = new TextBox[8];
     for (int i = 0; i < 8; i++)
     {
         int num2 = i + 1;
         boxArray[i] = (TextBox)this.FindControl("tbJQC" + num2.ToString());
         int num3 = i + 1;
         boxArray2[i] = (TextBox)this.FindControl("tbJQC" + num3.ToString() + "_2");
         if (boxArray[i].Text.Trim() == "")
         {
             JavaScript.Alert(this.Page, "第 " + ((i + 1)).ToString() + " 个球队名称输入不完整!");
             return(-1);
         }
     }
     AdditionasXml = PF.BuildIsuseAdditionasXmlFor1Team(8, new string[] { boxArray[0].Text.Trim(), boxArray2[0].Text.Trim(), boxArray[1].Text.Trim(), boxArray2[0].Text.Trim(), boxArray[2].Text.Trim(), boxArray2[2].Text.Trim(), boxArray[3].Text.Trim(), boxArray2[2].Text.Trim(), boxArray[4].Text.Trim(), boxArray2[4].Text.Trim(), boxArray[5].Text.Trim(), boxArray2[4].Text.Trim(), boxArray[6].Text.Trim(), boxArray2[6].Text.Trim(), boxArray[7].Text.Trim(), boxArray2[6].Text.Trim() });
     return(0);
 }