Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/ASP.NET/CS/HomeRealtor/Controls/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/ASP.NET/CS/HomeRealtor/Controls/Details.ascx.cs

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.ComponentModel;
using DevExpress.Web.ASPxCallbackPanel;
using System.Data;

public partial class Details : System.Web.UI.UserControl {
    protected void Page_Load(object sender, EventArgs e) {
    }

    protected void cpDetails_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e) {
        LoadByID(e.Parameter);
    }
    public void LoadByID(string ID){
        DataRow row = HomesDataProvider.GetHome(ID);
        if(row == null)
            return;
        Image.Src = "~/" + Utils.GetImageSrc(ID);
        Buy.Text = Utils.GetPrice(row["Price"]);
        Beds.Text = row["Beds"].ToString();
        Baths.Text = row["Baths"].ToString();
        HouseSize.Text = row["HouseSize"].ToString();
        LotSize.Text = row["LotSize"].ToString();
        Price_sqf.Text = Utils.GetPriceForSqf(row["HouseSize"], row["Price"]);

        YearBuilt.Text = row["YearBuilt"].ToString();
        PropertyType.Text = Utils.GetPropertyType(row["Type"]);

        Address.Text = Utils.ExtractFirstRow(row["Address"]);
        Address2.Text = Utils.ExtractSecondRow(row["Address"]);
        Features.Text = (string)row["Features"];
    }
}