private void RptBind() { Cms.BLL.sc_stores bll = new Cms.BLL.sc_stores(); DataTable dt = bll.GetList("").Tables[0]; this.rptList.DataSource = dt; this.rptList.DataBind(); Cms.BLL.C_Column cm = new Cms.BLL.C_Column(); string classname = cm.GetModel(27).className; bool bladd = adminUser.setpurview(classname, "add"); bool blEdit = adminUser.setpurview(classname, "Edit"); bool blDelete = adminUser.setpurview(classname, "Delete"); if (!bladd) { btnadd.Visible = false; } if (!blEdit) { btnSave.Visible = false; } if (!blDelete) { btnDelete.Visible = false; } }
public void bind_date(int _id) { Cms.BLL.C_order_integral bll = new Cms.BLL.C_order_integral(); Cms.Model.C_order_integral model = bll.GetModel(_id); ordernum.InnerHtml = model.order_num; updateTime.InnerHtml = model.updateTime.ToString(); OrderStatus.InnerHtml = getState(Convert.ToInt32(model.order_status)); countprice.InnerHtml = model.price_sum.ToString(); Quantity.InnerHtml = model.quantity_sum.ToString(); integral_sum.InnerHtml = model.integral_sum.ToString(); note.InnerHtml = model.note.ToString(); recommended_code.InnerHtml = model.recommended_code.ToString(); #region 会员信息===================== int struserid = Convert.ToInt32(model.user_id); Cms.BLL.C_user blluser = new Cms.BLL.C_user(); DataSet ds2 = blluser.GetList("id=" + struserid); if (ds2 != null && ds2.Tables[0].Rows.Count > 0) { UserName.InnerHtml = ds2.Tables[0].Rows[0]["username"].ToString(); userMoney.InnerHtml = Convert.ToDecimal(ds2.Tables[0].Rows[0]["userMoney"]).ToString("0.00"); userJifen.InnerHtml = ds2.Tables[0].Rows[0]["userscore"].ToString(); } else { userinfo.InnerHtml = "匿名用户"; } #endregion #region 产品信息=========================== Cms.BLL.C_order_integralsub bllordersub = new Cms.BLL.C_order_integralsub(); DataSet ds1 = bllordersub.GetList("order_id=" + _id); if (ds1 != null && ds1.Tables[0].Rows.Count > 0) { Repeaterordersub.DataSource = ds1.Tables[0].DefaultView; Repeaterordersub.DataBind(); } #endregion #region 收货信息=========================== DataSet ds3 = new Cms.BLL.sc_stores().GetList("id=" + model.storesId); if (ds3 != null && ds3.Tables[0].Rows.Count > 0) { RepAddress.DataSource = ds3.Tables[0].DefaultView; RepAddress.DataBind(); } #endregion }
protected void btnDelete_Click(object sender, EventArgs e) { Cms.BLL.sc_stores bll = new Cms.BLL.sc_stores(); for (int i = 0; i < rptList.Items.Count; i++) { int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value); CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId"); if (cb.Checked) { bll.Delete(id); } } adminUser.AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除" + this.channel_name + "门店信息"); //记录日志 JscriptMsg("删除数据成功!", Utils.CombUrlTxt("storeslist.aspx", "channel_id={0}", this.channel_id.ToString()), "Success"); }
private bool DoEdit(int _id) { try { Cms.BLL.sc_stores bll = new Cms.BLL.sc_stores(); Cms.Model.sc_stores model = bll.GetModel(_id); model.location = Province.SelectedValue; model.city = City.SelectedValue; model.county = District.SelectedValue; model.storename = txtTitle.Text.Trim(); model.sort_id = int.Parse(txtSortId.Text.Trim()); string urlhot = Request.Url.Host.ToString(); if (txtImgUrl.Value.IndexOf("http") > -1 || txtImgUrl.Value.IndexOf("HTTP") > -1 || txtImgUrl.Value.IndexOf("https") > -1 || txtImgUrl.Value.IndexOf("HTTPS") > -1) { urlhot = ""; } else { urlhot = "http://" + urlhot; } model.picurl = urlhot + txtImgUrl.Value.Trim(); model.linkurl = txtLinkUrl.Text.Trim(); model.info = txtContent.Value; model.isHidden = Convert.ToInt32(this.isHidden.SelectedValue);//显示状态 model.latitude = tblatitude.Text; model.longitude = tblongitude.Text; // model.updatetime = DateTime.Now; model.tel = tbphone.Text; model.address = tbaddress.Text; model.verificationPass = verificationPass.Text; if (bll.Update(model)) { return(true); } } catch { return(false); } return(false); }
private void ShowInfo(int _id) { Cms.BLL.sc_stores bll = new Cms.BLL.sc_stores(); Cms.Model.sc_stores model = bll.GetModel(_id); this.Province.SelectedValue = model.location; bind_City(Convert.ToInt32(model.location), City); this.City.SelectedValue = model.city; bind_District(Convert.ToInt32(model.city), District); this.District.SelectedValue = model.county; txtTitle.Text = model.storename; txtSortId.Text = model.sort_id.ToString(); tblatitude.Text = model.latitude; Application["latitude"] = model.latitude; Application["longitude"] = model.longitude; tblongitude.Text = model.longitude; txtLinkUrl.Text = model.linkurl; txtImgUrl.Value = model.picurl; txtContent.Value = model.info; this.isHidden.SelectedValue = model.isHidden.ToString();//显示状态 tbphone.Text = model.tel; tbaddress.Text = model.address; verificationPass.Text = model.verificationPass; }