protected void SaveBtn_Click(object sender, EventArgs e) { M_UserInfo mu = buser.GetLogin(); M_UserRecei model = new M_UserRecei(); bool isupdate = false; if (Mid > 0) { model = receBll.GetSelect(Mid, mu.UserID); isupdate = true; } model.UserID = mu.UserID; model.Email = mu.Email; //model.Provinces = Request.Form["province_dp"] + "|" + Request.Form["city_dp"] + "|" + Request.Form["county_dp"]; model.CityCode = Request.Form["province_dp"] + "|" + Request.Form["city_dp"] + "|" + Request.Form["county_dp"]; //model.CityCode = province_dp.SelectedValue + " " + city_dp.ValueSelectedValue + " " + county_dp.SelectedValue; model.Provinces = pro_hid.Value; model.Street = Street_T.Text; model.Zipcode = ZipCode_T.Text; model.ReceivName = ReceName_T.Text; model.MobileNum = MobileNum_T.Text; model.phone = Area_T.Text + "-" + Phone_T.Text; model.isDefault = Def_chk.Checked ? 1 : 0; if (isupdate) { receBll.GetUpdate(model); } else { model.ID = receBll.GetInsert(model); } if (Def_chk.Checked) { receBll.SetDef(model.ID); } if (!string.IsNullOrEmpty(Request.QueryString["ReturnUrl"])) { function.WriteSuccessMsg("保存地址成功!", Request.QueryString["ReturnUrl"]); } else { function.Script(this, "Refresh()"); } }
public int Recei_SetDef(int id) { receBll.SetDef(id); return(1); }