public string GetUnitName(int id) { Lebi_Units model = B_Lebi_Units.GetModel(id); if (model == null) { return(""); } return(Lang(model.Name)); }
protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("pro_units_list", "商品单位列表")) { PageReturnMsg = PageNoPowerMsg(); } PageSize = RequestTool.getpageSize(25); string where = "1=1"; models = B_Lebi_Units.GetList(where, "", PageSize, page); int recordCount = B_Lebi_Units.Counts(where); PageString = Pager.GetPaginationString("?page={0}", page, PageSize, recordCount); }
protected void Page_Load(object sender, EventArgs e) { int id = RequestTool.RequestInt("id", 0); if (id == 0) { if (!EX_Admin.Power("pro_units_add", "添加商品单位")) { WindowNoPower(); } } else { if (!EX_Admin.Power("pro_units_edit", "编辑商品单位")) { WindowNoPower(); } } model = B_Lebi_Units.GetModel(id); if (model == null) { model = new Lebi_Units(); } }