Exemplo n.º 1
0
        private void BindData()
        {
            BSO.PhoneBookBSO objBSO = new PhoneBookBSO();
            DataTable dtb = objBSO.GetDetial(Id);
            if (dtb != null)
            {
                if (dtb.Rows.Count > 0)
                {
                    txtFullName.Text = dtb.Rows[0]["FullName"].ToString();
                    txtHomePhone.Text = dtb.Rows[0]["HomePhone"].ToString();
                    txtofficePhone.Text = dtb.Rows[0]["officePhone"].ToString();

                    txtPhone1.Text = dtb.Rows[0]["Phone1"].ToString();
                    txtPhone2.Text = dtb.Rows[0]["Phone2"].ToString();
                    txtAddress.Text = dtb.Rows[0]["Address"].ToString();
                    txtEmail.Text = dtb.Rows[0]["Email"].ToString();
                    txtOrder.Text = dtb.Rows[0]["Orders"].ToString();
                    try
                    {
                        if (dtb.Rows[0]["ParentId"].ToString() != "0")
                        {
                            ddlDepartment.SelectedValue = dtb.Rows[0]["ParentId"].ToString();
                        }
                    }
                    catch { }

                }
            }
        }