private void BindAllDataToControl(int Id) { CustomDetails model = client.GetCustomDetails(this.ParlourId, Id, Convert.ToInt32(ddlCustomType.SelectedValue)); if (model != null) { hdnId.Value = model.Id.ToString(); txtDescription.Text = model.Description; txtName.Text = model.Name; } }