Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         hdRestaurantID.Value = getRestaurantID();
         hdMemberID.Value     = getMemberID();
         string           restaurantID = getRestaurantID();
         MODEL.Restaurant model        = svRestaurant.getRestaurant(restaurantID);
         if (model != null)
         {
             txtRestaurantName.Value = model.RestaurantName;
         }
     }
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //if(Session["session_memberID"] == null)
                //{
                //    Response.Redirect("../MemberLogin.aspx", true);
                //}
                hdRestaurantID.Value = getRestaurantID();
                hdMemberID.Value     = getMemberID();


                BindComboProvince();
                BindComboAmphur(ddlProvince.SelectedValue.ToString().Trim());
                BindComboTumbon(ddlAmphur.SelectedValue.ToString().Trim());

                MODEL.Restaurant res = new MODEL.Restaurant();
                res = svRestaurant.getRestaurant(hdRestaurantID.Value);
                if (res != null)
                {
                    if (res.RestaurantID != "")
                    {
                        txtRestaurantName.Value   = res.RestaurantName;
                        txtAddressNo.Value        = res.ContactAddressNo;
                        txtAddressMoo.Value       = res.ContactMoo;
                        txtAddressSoi.Value       = res.ContactSoi;
                        txtAddressRoad.Value      = res.ContactSoi;
                        txtContactName.Value      = res.ContactName;
                        txtContactLastname.Value  = res.ContactLastName;
                        ddlProvince.SelectedValue = res.ContactProvince.ToString().Trim();
                        ddlAmphur.SelectedValue   = res.ContactAmphur.ToString().Trim();
                        ddlTumbon.SelectedValue   = res.ContactTumbon.ToString().Trim();
                        txtZipCode.Value          = res.ContactZipcode;
                        txtTel.Value     = res.ContactTel;
                        txtPhone.Value   = res.ContactPhone;
                        imgFood.ImageUrl = "~/ImagesRestaurant/" + hdRestaurantID.Value + ".jpg";
                        hid_lat.Value    = res.RestaurantLast;
                        hid_lng.Value    = res.RestaurantLong;
                    }
                }
            }
        }