Example #1
0
 public void GetConfigInfoByID(int ID)
 {
     transportdata = new TransportData();
     DS            = transportdata.GetConfigInfoByID(ID);
     if (!Comman.Comman.IsDataSetEmpty(DS))
     {
         dpConfigName.SelectedItem.Text = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["CONFIGNAME"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["CONFIGNAME"].ToString();
         dpConfigkey.SelectedItem.Text  = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["CONFIGKEY"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["CONFIGKEY"].ToString();
         txtConfigvalue.Text            = string.IsNullOrEmpty(DS.Tables[0].Rows[0]["CONFIGVALUE"].ToString()) ? string.Empty : DS.Tables[0].Rows[0]["CONFIGVALUE"].ToString();
         dpIsActive.ClearSelection();
         if (DS.Tables[0].Rows[0]["ISACTIVE"].ToString() == "True")
         {
             dpIsActive.Items.FindByValue("1").Selected = true;
         }
         if (DS.Tables[0].Rows[0]["ISACTIVE"].ToString() == "False")
         {
             dpIsActive.Items.FindByValue("2").Selected = true;
         }
     }
 }