Exemplo n.º 1
0
 protected void bindplace()
 {
     try
     {
         ds2.Dispose();
         ds2.Reset();
         ds2 = d2.Bindplace();
         if (ds2.Tables[0].Rows.Count > 0)
         {
             chklstplace.DataSource     = ds2;
             chklstplace.DataTextField  = "Stage_Name";
             chklstplace.DataValueField = "Stage_id";
             chklstplace.DataBind();
             chklstplace.SelectedIndex = chklstplace.Items.Count - 1;
             for (int i = 0; i < chklstplace.Items.Count; i++)
             {
                 chklstplace.Items[i].Selected = true;
                 if (chklstplace.Items[i].Selected == true)
                 {
                     count += 1;
                 }
                 if (chklstvechile.Items.Count == count)
                 {
                     chkplace.Checked = true;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         d2.sendErrorMail(ex, collegecode, "TransportReport.aspx");
     }
 }