Ejemplo n.º 1
0
    private void Show()
    {
        EasyDataProvide ParentChildren = new EasyDataProvide("ParentChildren");
        ParentChildren.AddParameter("student_id",Request["id"]);
        DataRow pcRow = ParentChildren.GetSingleRow("student_id=@student_id");
        if(pcRow==null)
        {
            Panel2.Visible = true;
            Panel1.Visible = false;
            return;
        }else
        {
            Panel1.Visible = true;
            Panel2.Visible = false;
        }

        DataRow row = _people.FillPlaceHolderControlsById(pcRow["parent_id"].ToString());
        if (row == null) return;
        myPhoto.ImageUrl = row["myPhoto"].ToString() == "" ? (row["gender"].ToString() == "True" ? "~/images/Male90x85.jpg" : "~/images/FeMale90x85.jpg") : String.Format("{0}/{1}/{2}/M{3}", ConfigurationManager.AppSettings["FileUploadPath"], (new Person()).School_id, row["id"], row["myPhoto"]);

        gender.Text = SCode.ToScodeGenderName(gender.Text);
        DParent dParent = new DParent(pcRow["parent_id"].ToString());
        telephone_id.Text = dParent.Phone;
        address_id.Text = dParent.Address;
        occupation.Text = dParent.Occupation;
        username.Text = dParent.Account;
        emailAddress.Text = dParent.Email;
        schoolName.Text = dParent.SchoolName;
        enable.Text = enable.Text.ToScodeEnableName();
        description.Text = My.WebForm.TXT2HTML(description.Text);
        EasyDataProvide people = new EasyDataProvide("People");
        DataRow peoplwRow = people.GetById(Request["id"]);
        StudentName.Text = peoplwRow["name"].ToString();
    }
 private void Show()
 {
     DParent parent=new DParent((new Person()).people_id);
     DataTable dt = parent.GetMyChildrens();
     DataList1.DataSource = dt;
     DataList1.DataBind();
 }
Ejemplo n.º 3
0
    private void Show()
    {
        DataRow row = _people.FillPlaceHolderControlsById(Request["id"]);
        if (row == null) return;
        myPhoto.ImageUrl = row["myPhoto"].ToString() == "" ? (row["gender"].ToString() == "True" ? "~/images/Male90x85.jpg" : "~/images/FeMale90x85.jpg") : String.Format("{0}/{1}/{2}/M{3}", ConfigurationManager.AppSettings["FileUploadPath"], (new Person()).School_id, row["id"], row["myPhoto"]);

        gender.Text = SCode.ToScodeGenderName(gender.Text);
          //  btnDisable.Text = SCode.GetDisableButtonName(row["disable"].ToString());
        DParent dParent = new DParent(Request["id"]);
        telephone_id.Text = dParent.Phone;
        address_id.Text = dParent.Address;
        occupation.Text = dParent.Occupation;
        username.Text = dParent.Account;
        emailAddress.Text = dParent.Email;
        schoolName.Text = dParent.SchoolName;
        enable.Text = enable.Text.ToScodeEnableName();
        description.Text = My.WebForm.TXT2HTML(description.Text);

        ParentName.Text = row["name"].ToString();
    }
Ejemplo n.º 4
0
    private void Show()
    {
        ViewState["tel"] = "";
        ViewState["address"] = "";
        DataRow row = _people.FillPlaceHolderControlsById(Request["id"]);
        if (row == null) return;
        myPhoto.ImageUrl = row["myPhoto"].ToString() == "" ? (row["gender"].ToString() == "True" ? "~/images/Male90x85.jpg" : "~/images/FeMale90x85.jpg") : String.Format("{0}/{1}/{2}/M{3}", ConfigurationManager.AppSettings["FileUploadPath"], (new Person()).School_id, row["id"], row["myPhoto"]);

        DataRow telRow = _telephone.GetById(row["telephone_id"].ToString());
        if (telRow != null)
        {
            ViewState["tel"] = telRow["id"].ToString();
            areaCode.Value = telRow["areaCode"].ToString();
            numberCode.Value = telRow["numberCode"].ToString();
        }

        DataRow areaRow = _address.GetById(row["address_id"].ToString());
        if (areaRow != null)
        {
            ViewState["address"] = areaRow["id"].ToString();
            hidzip.Value = areaRow["zip"].ToString();
            address.Value = areaRow["address"].ToString();
        }
        DParent dParent = new DParent(Request["id"]);
        occupation.Text = dParent.Occupation;
        username.Text = dParent.Account;
        emailAddress.Text = dParent.Email;

        ParentName.Text = row["name"].ToString();
    }