public JsonResult AddParent(Parent_Record pec) { ParentServices services = new ParentServices(); services.AddParent(pec); var stud_list = db.Student_Records.ToList(); var rel_list = db.Relations.ToList(); ViewBag.stud = stud_list; ViewBag.rel = rel_list; return(Json(new { msg = "save" }, JsonRequestBehavior.AllowGet)); }
private void txtParentServiceID_EditValueChanged(object sender, EventArgs e) { txtParentServiceName.EditValue = null; if (txtParentServiceID.EditValue == null || string.IsNullOrEmpty(txtParentServiceID.Text) || string.IsNullOrWhiteSpace(txtParentServiceID.Text)) { CommonViewsActions.FillListBoxControl(lstParentServices_All, ParentServices); return; } if (ChildrenServices != null && ChildrenServices.Count > 0) { List <Service_cu> filteredServices = ParentServices.FindAll(item => Convert.ToInt32(item.ID).Equals(Convert.ToInt32(txtParentServiceID.EditValue))); CommonViewsActions.FillListBoxControl(lstParentServices_All, filteredServices); } }