protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["change"] == "edit" && aid != -1) { ShowInfo(this.aid); } WebConn.ManageInfoType sex = (WebConn.ManageInfoType)typid; switch (sex) { case WebConn.ManageInfoType.自驾车租赁: stTitle = WebConn.ManageInfoType.自驾车租赁.ToString(); break; case WebConn.ManageInfoType.万宁站租车服务: stTitle = WebConn.ManageInfoType.万宁站租车服务.ToString(); break; case WebConn.ManageInfoType.自行车租赁: stTitle = WebConn.ManageInfoType.自行车租赁.ToString(); break; } string reqStrUrl = "BDZCList.aspx?tid=" + typid; hidTyp.Value = typid + ""; if (Request.UrlReferrer != null) { reqStrUrl = Request.UrlReferrer.ToString(); } btn_Back.Attributes.Add("onclick", "window.location.href='" + reqStrUrl + "';return false;"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { using (WXDBEntities db = new WXDBEntities()) { if (!string.IsNullOrEmpty(Request["del"]) && WebUtil.IsDigit(Request["del"])) { int tmpid = Convert.ToInt32(Request["del"]); AResource model = //DbSession.Default.From<Article>().Where(s => s.AritcleID.Equals(tmpid)).ToFirstDefault(); db.AResource.Where(s => s.RId == tmpid).FirstOrDefault(); if (model != null) { //model.Attach(); db.AResource.DeleteObject(model); //model. = 2; //model.UpdateTime = DateTime.Now; // int ts = DbSession.Default.Update<Article>(model); db.SaveChanges(); } } } } BindRepeater(); WebConn.ManageInfoType sex = (WebConn.ManageInfoType)typid; switch (sex) { case WebConn.ManageInfoType.半岛美食: stTitle = WebConn.ManageInfoType.半岛美食.ToString(); break; case WebConn.ManageInfoType.万宁四诊: stTitle = WebConn.ManageInfoType.万宁四诊.ToString(); break; case WebConn.ManageInfoType.其他美食: stTitle = WebConn.ManageInfoType.其他美食.ToString(); break; case WebConn.ManageInfoType.特色小吃: stTitle = WebConn.ManageInfoType.特色小吃.ToString(); break; case WebConn.ManageInfoType.美食餐厅: stTitle = WebConn.ManageInfoType.美食餐厅.ToString(); break; } string reqStrUrl = "BDMSList.aspx?tid=" + typid; //if (Request.UrlReferrer != null) //{ // reqStrUrl = Request.UrlReferrer.ToString(); //} btn_Back.Attributes.Add("onclick", "window.location.href='" + reqStrUrl + "';return false;"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { using (WXDBEntities db = new WXDBEntities()) { if (!string.IsNullOrEmpty(Request["del"]) && WebUtil.IsDigit(Request["del"])) { int tmpid = Convert.ToInt32(Request["del"]); Article model = db.Article.Where(s => s.AritcleID == tmpid).FirstOrDefault(); if (model != null) { model.Status = 2; //string strsql = "update Article set status=1 where Type=" + model.ID; //db.ExecuteStoreCommand(strsql); //db.ArticleType.DeleteObject(model); db.SaveChanges(); } } } BindRepeater(typid); } if (typid != -1) { WebConn.ManageInfoType sex = (WebConn.ManageInfoType)typid; switch (sex) { case WebConn.ManageInfoType.半岛美食: sttitle = WebConn.ManageInfoType.半岛美食.ToString(); break; case WebConn.ManageInfoType.万宁四诊: sttitle = WebConn.ManageInfoType.万宁四诊.ToString(); break; case WebConn.ManageInfoType.其他美食: sttitle = WebConn.ManageInfoType.其他美食.ToString(); break; case WebConn.ManageInfoType.特色小吃: sttitle = WebConn.ManageInfoType.特色小吃.ToString(); break; case WebConn.ManageInfoType.美食餐厅: sttitle = WebConn.ManageInfoType.美食餐厅.ToString(); break; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { using (WXDBEntities db = new WXDBEntities()) { if (!string.IsNullOrEmpty(Request["del"]) && WebUtil.IsDigit(Request["del"])) { int tmpid = Convert.ToInt32(Request["del"]); AResource model = //DbSession.Default.From<Article>().Where(s => s.AritcleID.Equals(tmpid)).ToFirstDefault(); db.AResource.Where(s => s.RId == tmpid).FirstOrDefault(); if (model != null) { //model.Attach(); db.AResource.DeleteObject(model); //model. = 2; //model.UpdateTime = DateTime.Now; // int ts = DbSession.Default.Update<Article>(model); db.SaveChanges(); } } } hidtype.Value = stypid + ""; BindRepeater(); } int tmpid1 = Convert.ToInt32(hidtype.Value); WebConn.ManageInfoType sex = (WebConn.ManageInfoType)tmpid1; string reqStrUrl = string.Empty; switch (sex) { case WebConn.ManageInfoType.半岛住宿: stTitle = WebConn.ManageInfoType.半岛住宿.ToString(); //reqStrUrl = "BDZSList.aspx";//"BDMSList.aspx?tid=" + hidtype.Value; break; case WebConn.ManageInfoType.富饶特产: stTitle = WebConn.ManageInfoType.富饶特产.ToString(); break; case WebConn.ManageInfoType.滨海风情餐饮购物街: stTitle = WebConn.ManageInfoType.滨海风情餐饮购物街.ToString(); break; } reqStrUrl = "BDZSList.aspx?tid=" + stypid; btn_Back.Attributes.Add("onclick", "window.location.href='" + reqStrUrl + "';return false;"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["change"] == "edit" && aid != -1) { ShowInfo(this.aid); } string reqStrUrl = "BannerList.aspx"; WebConn.ManageInfoType sex = (WebConn.ManageInfoType)typid; switch (sex) { case WebConn.ManageInfoType.半岛住宿: sttitle = WebConn.ManageInfoType.半岛住宿.ToString(); reqStrUrl = "BannerList.aspx?typid=" + typid; //"BDMSList.aspx?tid=" + hidtype.Value; break; case WebConn.ManageInfoType.富饶特产: sttitle = WebConn.ManageInfoType.富饶特产.ToString(); reqStrUrl = "BannerList.aspx?typid=" + typid; break; case WebConn.ManageInfoType.滨海风情餐饮购物街: sttitle = WebConn.ManageInfoType.滨海风情餐饮购物街.ToString(); reqStrUrl = "BannerList.aspx?typid=" + typid; break; default: reqStrUrl = "BannerList.aspx?typid=17"; break; } //if (Request.UrlReferrer != null) //{ // reqStrUrl = Request.UrlReferrer.ToString(); //} btn_Back.Attributes.Add("onclick", "window.location.href='" + reqStrUrl + "';return false;"); } }