Example #1
0
        ///GetPK
        /// <summary>
        /// 根据数据表主键更新数据
        /// </summary>
        /// <param name="Tbuser">数据表实体对象</param>
        public static Exception Update(TbuserInfo Tbuser)
        {
            string sql = string.Format("update [Tbuser] set[name]='{0}',[pwd]='{1}',[sex]='{2}',[phone]='{3}',[address]='{4}',[email]='{5}',[remark]='{6}',[uname]='{7}' where[id]='{8}'", Tbuser.Name, Tbuser.Pwd, Tbuser.Sex, Tbuser.Phone, Tbuser.Address, Tbuser.Email, Tbuser.Remark, Tbuser.Uname, Tbuser.Id);

            return(DBM.Execute(sql));
        }
Example #2
0
        /// <summary>
        /// 根据数据表主键删除数据
        /// </summary>
        /// <param name="pkId">数据表实体对象</param>
        public static Exception Delete(object pkId)
        {
            string sql = "delete from [Tbuser]  where [id]=" + pkId.ToString();

            return(DBM.Execute(sql));
        }
Example #3
0
        ///GetPK
        /// <summary>
        /// 根据数据表主键更新数据
        /// </summary>
        /// <param name="Admin">数据表实体对象</param>
        public static Exception Update(AdminInfo Admin)
        {
            string sql = string.Format("update [Admin] set[Name]='{0}',[pass]='{1}' where[ID]='{2}'", Admin.Name, Admin.Pass, Admin.Id);

            return(DBM.Execute(sql));
        }
Example #4
0
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="Tbuser">数据表实体对象</param>
        public static Exception Add(TbuserInfo Tbuser)
        {
            string sql = string.Format("insert into [Tbuser] values ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}')", Tbuser.Name, Tbuser.Pwd, Tbuser.Sex, Tbuser.Phone, Tbuser.Address, Tbuser.Email, Tbuser.Remark, Tbuser.Uname);

            return(DBM.Execute(sql));
        }
Example #5
0
        ///GetPK
        /// <summary>
        /// 根据数据表主键更新数据
        /// </summary>
        /// <param name="Tbchuang">数据表实体对象</param>
        public static Exception Update(TbchuangInfo Tbchuang)
        {
            string sql = string.Format("update [Tbchuang] set[chuangNum]='{0}',[susheid]='{1}',[remark]='{2}',[pic]='{3}' where[id]='{4}'", Tbchuang.Chuangnum, Tbchuang.Susheid, Tbchuang.Remark, Tbchuang.Pic, Tbchuang.Id);

            return(DBM.Execute(sql));
        }
Example #6
0
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="Admin">数据表实体对象</param>
        public static Exception Add(AdminInfo Admin)
        {
            string sql = string.Format("insert into [Admin] values ('{0}','{1}')", Admin.Name, Admin.Pass);

            return(DBM.Execute(sql));
        }
Example #7
0
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="Tbchuang">数据表实体对象</param>
        public static Exception Add(TbchuangInfo Tbchuang)
        {
            string sql = string.Format("insert into [Tbchuang] values ('{0}','{1}','{2}','{3}')", Tbchuang.Chuangnum, Tbchuang.Susheid, Tbchuang.Remark, Tbchuang.Pic);

            return(DBM.Execute(sql));
        }
Example #8
0
        ///GetPK
        /// <summary>
        /// 根据数据表主键更新数据
        /// </summary>
        /// <param name="Tbsushe">数据表实体对象</param>
        public static Exception Update(TbsusheInfo Tbsushe)
        {
            string sql = string.Format("update [Tbsushe] set[ssname]='{0}',[remark]='{1}',[pic]='{2}' where[id]='{3}'", Tbsushe.Ssname, Tbsushe.Remark, Tbsushe.Pic, Tbsushe.Id);

            return(DBM.Execute(sql));
        }
Example #9
0
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="Tbsushe">数据表实体对象</param>
        public static Exception Add(TbsusheInfo Tbsushe)
        {
            string sql = string.Format("insert into [Tbsushe] values ('{0}','{1}','{2}')", Tbsushe.Ssname, Tbsushe.Remark, Tbsushe.Pic);

            return(DBM.Execute(sql));
        }
Example #10
0
        ///GetPK
        /// <summary>
        /// 根据数据表主键更新数据
        /// </summary>
        /// <param name="Tbruzhu">数据表实体对象</param>
        public static Exception Update(TbruzhuInfo Tbruzhu)
        {
            string sql = string.Format("update [Tbruzhu] set[chuangid]='{0}',[userid]='{1}',[ruzhudate]='{2}',[tuchudate]='{3}',[state]='{4}' where[id]='{5}'", Tbruzhu.Chuangid, Tbruzhu.Userid, Tbruzhu.Ruzhudate, Tbruzhu.Tuchudate, Tbruzhu.State, Tbruzhu.Id);

            return(DBM.Execute(sql));
        }
Example #11
0
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="Tbruzhu">数据表实体对象</param>
        public static Exception Add(TbruzhuInfo Tbruzhu)
        {
            string sql = string.Format("insert into [Tbruzhu] values ('{0}','{1}','{2}','{3}','{4}')", Tbruzhu.Chuangid, Tbruzhu.Userid, Tbruzhu.Ruzhudate, Tbruzhu.Tuchudate, Tbruzhu.State);

            return(DBM.Execute(sql));
        }