Пример #1
0
 private void btnClear_Click(object sender, EventArgs e)
 {
     GridData.ClearSelection();
     bsAdmition.SuspendBinding();
     foreach (DataGridViewRow dvr in GridData.Rows)
     {
         dvr.Visible = true;
     }
     bsAdmition.ResumeBinding();
 }
Пример #2
0
        private void btnfind_Click(object sender, EventArgs e)
        {
            GridData.ClearSelection();
            bsAdmition.SuspendBinding();
            string   txtLoc  = txtLocation.Text.Trim();
            string   txtDes  = txtDescription.Text.Trim();
            DateTime chkDate = Convert.ToDateTime(String.Format("{0:yyyy/MM/dd}", dtpdate.Value) + " " + txttime.Text);

            foreach (DataGridViewRow dvr in GridData.Rows)
            {
                trn_patient_surgery sur = (trn_patient_surgery)dvr.DataBoundItem;
                if (sur.tpg_location.Contains(txtLoc) && sur.tpg_desc.Contains(txtDes) && sur.tpg_chk_date.Value.Date == chkDate.Date)
                {
                    dvr.Visible = true;
                }
                else
                {
                    dvr.Visible = false;
                }
            }
            bsAdmition.ResumeBinding();
        }