public void FillDeviceTypeCombo()
        {
            DataTable dt = new DataTable();

            dt = VSWebBL.ReportsBL.ReportsBL.Ins.FillDeviceTypeComboforhistoricalresponseBL();


            // SqlQuery = "select Distinct DeviceType from DeviceDailyStats";

            // SqlDataAdapter da = new SqlDataAdapter(SqlQuery, con);
            // DataSet ds = new DataSet();
            // da.Fill(ds, "DeviceDailyStats");
            // dt = ds.Tables[0];
            // dt.Rows.Add(dt.NewRow()[0]["All"]);
            DataRow dr1 = dt.NewRow();

            dr1[0] = "BlackBerry";
            dt.Rows.Add(dr1);
            DataRow dr2 = dt.NewRow();

            dr2[0] = "NotesMail";
            dt.Rows.Add(dr2);
            DataRow dr3 = dt.NewRow();

            dr3[0] = "All";
            //dt.Rows.Add(dr3);
            //DataRow r=new DataRow();

            dt.Rows.InsertAt(dr3, 0);

            DeviceTypeComboBox.DataSource = dt;
            DeviceTypeComboBox.TextField  = "DeviceType";
            DeviceTypeComboBox.ValueField = "DeviceType";
            DeviceTypeComboBox.DataBind();
        }
Beispiel #2
0
 private void fillServerTypesComboBox()
 {
     //6/30/2014 NS added for VSPLUS-789
     try
     {
         DataTable ServerDataTable = VSWebBL.SecurityBL.ServerTypesBL.Ins.GetAllData();
         if (ServerDataTable.Rows.Count > 0)
         {
             DeviceTypeComboBox.DataSource = ServerDataTable;
             DeviceTypeComboBox.TextField  = "ServerType";
             DeviceTypeComboBox.ValueField = "ID";
             DeviceTypeComboBox.DataBind();
         }
     }
     catch (Exception ex)
     {
         //6/27/2014 NS added for VSPLUS-634
         Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
     }
 }