//private void autoCompleteDoctor_currentChangeHandler(object sender, UIcontrol.completeArgs e) //{ // txtDoctorCode.Text = e.valueData == null ? "" : e.valueData.ToString(); // trn_teeth_hdr patientTeeth = BsPatientTeeth.OfType<trn_teeth_hdr>().FirstOrDefault(); // patientTeeth.tth_doctor_code = txtDoctorCode.Text; //} private void chList_ItemCheck(object sender, ItemCheckEventArgs e) { clsSourceMaster item = (clsSourceMaster)chList.Items[e.Index]; trn_teeth_doc_result result = BsTeethDoctor.OfType <trn_teeth_doc_result>().Where(x => x.mdr_id == item.val).FirstOrDefault(); if (e.NewValue == CheckState.Checked) { if (result == null) { BsTeethDoctor.Add(new trn_teeth_doc_result { mdr_id = item.val, tdr_create_by = username, tdr_update_by = username }); } } else { if (result != null) { BsTeethDoctor.Remove(result); } } }