public string IsUseableName(HttpContext context) //判断分类是否可以添加 { bool flg = false; string id = context.Request.Form["id"]; string pid = context.Request.Form["pid"]; string fname = context.Request.Form["fname"]; if (!string.IsNullOrEmpty(fname) && !string.IsNullOrEmpty(pid) && !string.IsNullOrEmpty(id)) { BCtrl_Categories cate = new BCtrl_Categories(); flg = cate.IsUserable(int.Parse(pid), fname, int.Parse(id)); if (flg) { return("true"); } else { return("false"); } } else { return("false"); } }
private DataTable GetQueryData(bool isDownload) { BCtrl_Categories bll = new BCtrl_Categories(); int totalcnt = 0; CategoriesSearchEntity entity = new CategoriesSearchEntity(); entity.PageSize = base.PageSize; entity.PageIndex = base.PageIndex; if (!string.IsNullOrEmpty(_StrCategoriesName)) { entity.CalendarTypeName = _StrCategoriesName; } if (_StrParentCalendarID > 0) { entity.ParentCalendarTypeID = _StrParentCalendarID; } else { entity.ParentCalendarTypeID = -1; } entity.UseDBPagination = !isDownload; entity.OrderfieldType = OrderFieldType.Asc; DataTable table = bll.QueryCategoriesTable(entity, out totalcnt); base.TotalRecords = totalcnt; return(table); }
public void DateBind() { BCtrl_Categories bll = new BCtrl_Categories(); List <CategoriesEntity> list = bll.CategoriesFirstLevel(); foreach (CategoriesEntity item in list) { this.txtCategoriesName.Items.Add(new ListItem(item.CalendarTypeName, item.CalendarTypeID.ToString())); } pid = int.Parse(this.txtCategoriesName.Value); }
public string DeleteCategories(HttpContext contex) { string id = contex.Request.Form["id"].ToString(); string str = "{\"status\":0}"; var strr = new { status = "0" }; BCtrl_Categories bll = new BCtrl_Categories(); if (bll.deleteCategories(id) == "0") { str = "{\"status\":0}"; } else if (bll.deleteCategories(id) == "1") { str = "{\"status\":1}"; } else { str = "{\"status\":2}"; } return(str); }