protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CheckPower(AdminPower.加盟餐馆管理); var id = Convert.ToInt32(Request.QueryString["id"]); var data = from shop in ShopBll.GetShops() join feedback in ShopBll.GetShopFeedbacks() on shop.ShopID equals feedback.ShopId where feedback.ShopFeedbackID == id select new {shop,feedback}; Feedback = data.First().feedback; FeedbackShop = data.First().shop; } }
protected void btnRegister_OnClick(object sender, EventArgs e) { var shop = new Ye_Shop() { ShopAccount = tbxUserName.Text.Trim(), ShopPassword = DESUtil.Encrypt(tbxUserPwd.Text.Trim()), RegisterTime = DateTime.Now, LastLoginTime = DateTime.Now, ShopName = tbxShopName.Text, ShopAddress = tbxAddr.Text, ShopMobile = tbxShopMobile.Text, ShopEmail = tbxShopEmail.Text, ShopFax = tbxShopFax.Text, ShopZip = tbxShopZip.Text, ShopDesc = "", ShopLogoImg = "", ShopMainImg = "", ShopQQ = "", ShopQRCodeImg = "", Longitude = 0, Latitude = 0, DeliveryTime = "", DeliveryMinPrice = 0, RecommendLevel = 0, IsChecked = false, OpeningBeginMinute = 0, OpeningEndMinute = 0, Rank = 3, Clicks = 0, }; if (ShopBll.AddShop(shop)) { WebUtil.AlertAndRedirect("您的餐馆已成功注册,请耐心等待审核!", "Login.aspx"); } else { WebUtil.Alert("餐馆注册失败!"); } }