Пример #1
0
 public ActionResult FlowerCategoryDel()
 {
     Business.Sys_FlowerCategory Sys_FlowerCategory = new Business.Sys_FlowerCategory();
     if (Sys_FlowerCategory.Del(Request["ID"]))
     {
         return(Content("True"));
     }
     return(Content("False"));
 }
Пример #2
0
 public ActionResult FlowerCategoryEdit(Model.FlowerCategory FlowerCategory)
 {
     Business.Sys_FlowerCategory Sys_FlowerCategory = new Business.Sys_FlowerCategory();
     ViewData["success"] = "修改失败";
     if (Sys_FlowerCategory.Edit(FlowerCategory.FlowerCategoryType, FlowerCategory.id))
     {
         ViewData["success"] = "修改成功";
     }
     Response.Write("<script>parent.layer.closeAll();</script>");
     return(View());
 }
Пример #3
0
        public ActionResult GetFlowerCategoryList()
        {
            int    offset             = Convert.ToInt32(Request["offset"]);
            string FlowerCategoryType = Request["SelectItem"];

            Business.Sys_FlowerCategory Sys_FlowerCategory = new Business.Sys_FlowerCategory();
            StringBuilder sb = new StringBuilder();

            if (!string.IsNullOrEmpty(FlowerCategoryType))
            {
                sb.Append(" and id='" + FlowerCategoryType + "'");
            }
            return(Json(new { total = Sys_FlowerCategory.GetFlowerCategoryListCount(sb.ToString()), rows = Sys_FlowerCategory.FlowerCategoryList(offset, sb.ToString()) }, JsonRequestBehavior.AllowGet));
        }
Пример #4
0
        public List <SelectListItem> GetdeptSelectItems()
        {
            Business.Sys_FlowerCategory Sys_FlowerCategory = new Business.Sys_FlowerCategory();
            List <Model.FlowerCategory> FlowerCategoryList = Sys_FlowerCategory.GetListModel();
            List <SelectListItem>       deptSelectItems    = new List <SelectListItem>();
            SelectListItem items = new SelectListItem();

            items.Text     = "--请选择--";
            items.Value    = "";
            items.Selected = true;
            deptSelectItems.Add(items);
            foreach (Model.FlowerCategory d in FlowerCategoryList)
            {
                SelectListItem item = new SelectListItem();
                item.Text     = d.FlowerCategoryType;
                item.Value    = d.id.ToString();
                item.Selected = false;
                deptSelectItems.Add(item);
            }
            return(deptSelectItems);
        }
Пример #5
0
        public ActionResult CheckFlowerCategory()
        {
            string FlowerCategory = Request["FlowerCategory"]; Business.Sys_FlowerCategory Sys_FlowerCategory = new Business.Sys_FlowerCategory();

            if (Sys_FlowerCategory.Check(FlowerCategory))
            {
                return(Content("True"));
            }
            return(Content("False"));
        }
Пример #6
0
 public ActionResult FlowerCategoryEdit()
 {
     Business.Sys_FlowerCategory Sys_FlowerCategory = new Business.Sys_FlowerCategory();
     return(View(Sys_FlowerCategory.Get(Request["id"])));
 }