Beispiel #1
0
 private void AddAlliance(ITextControl allyId,
     ITextControl allyName,
     int type,
     BaseDataBoundControl downListAlly)
 {
     string id = allyId.Text;
     string name = allyName.Text;
     if (!Misc.IsNumber(id) || (name.Length < 1))
     {
         LabelStatus.Text = "Specify correct values...";
         return;
     }
     DataBase dataBase = new DataBase();
     if (dataBase.AddExcludedAlliance(id, name, type))
     {
         PopulateExcludedAlliances(type, downListAlly);
         ClearTextFields();
     }
     else
     {
         LabelStatus.Text = "Can't save excluded Alliance!";
     }
 }