예제 #1
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(string MenuName, string Pagelogo, string ParentId, string LinkAddress, string Icon, string Sort, string IsShow)
        {
            zhangte.Model.tb_navigation model = new zhangte.Model.tb_navigation();
            model.MenuName    = MenuName;
            model.Pagelogo    = Pagelogo;
            model.ParentId    = int.Parse(ParentId);
            model.LinkAddress = LinkAddress;
            model.Icon        = Icon;
            model.Sort        = int.Parse(Sort);
            model.IsShow      = int.Parse(IsShow);

            return(dal.Add(model));
        }
예제 #2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(string Id, string MenuName, string Pagelogo, string ParentId, string LinkAddress, string Icon, string Sort, string IsShow)
        {
            zhangte.Model.tb_navigation model = new zhangte.Model.tb_navigation();
            model = dal.GetModel(int.Parse(Id));
            //对于传入的model如果其中属性已经更改,则更改,否则保留原数据库中的数据。
            model.MenuName    = MenuName;
            model.Pagelogo    = Pagelogo;
            model.ParentId    = int.Parse(ParentId);
            model.LinkAddress = LinkAddress;
            model.Icon        = Icon;
            model.Sort        = int.Parse(Sort);
            model.IsShow      = int.Parse(IsShow);


            return(dal.Update(model));
        }
예제 #3
0
        /// <summary>
        /// 得到一个对象值系列
        /// </summary>
        public string Geteditdata(string Id)
        {
            zhangte.Model.tb_navigation model = new zhangte.Model.tb_navigation();
            model = dal.GetModel(int.Parse(Id));
            string retstr = "";

            retstr += model.Id + "|";
            retstr += model.MenuName + "|";
            retstr += model.Pagelogo + "|";
            retstr += model.ParentId + "|";
            retstr += model.LinkAddress + "|";
            retstr += model.Icon + "|";
            retstr += model.Sort + "|";
            retstr += model.IsShow + "|";

            return(retstr);
        }
예제 #4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add1(zhangte.Model.tb_navigation model)
 {
     return(dal.Add(model));
 }
예제 #5
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update1(zhangte.Model.tb_navigation model)
 {
     return(dal.Update(model));
 }