コード例 #1
0
        //职位表假删除
        public static int jobdeletefalse(UserInfo uf)
        {
            sqltext = "update   UserInfo  set  enable='0' where uid='" + uf.Uid + "'";
            int i = (int)SQLHELPER.ExecuteNonQuery(sqltext);

            return(i);
        }
コード例 #2
0
 /// <summary>
 /// 发送邮件
 /// </summary>
 /// <param name="email"></param>
 /// <returns></returns>
 public static object sendEmai(ycEmail email)
 {
     sqltext = "insert into [dbo].[ycEmail]([Title],[detail],[sendtime],[writer],[receiver],[isRead],[isdelete],[isOwner])values('" + email.Title + "','" + email.Detail + "',getdate(),'" + email.Writer + "','" + email.Receiver + "','0','0','0')";
     SQLHELPER.ExecuteNonQuery(sqltext);
     sqltext = "insert into [dbo].[ycEmail]([Title],[detail],[sendtime],[writer],[receiver],[isRead],[isdelete],[isOwner])values('" + email.Title + "','" + email.Detail + "',getdate(),'" + email.Writer + "','" + email.Receiver + "','0','0','1')";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #3
0
ファイル: UserInfoService.cs プロジェクト: hanhanyh/HFourm
        public int add(UserInfo entity)
        {
            string sqlstr = "  insert into dbo.UserInfo( Name, NickName, PassWord, Sex, Birthday, Address, EMail)VALUES(@Name,@NickName,@Password,@Sex,@Birthday,@Address,@Email)";

            SqlParameter[] parameters =
            {
                new SqlParameter("@Name",     entity.Name),
                new SqlParameter("@NickName", entity.NickName),
                new SqlParameter("@Password", entity.PassWord),
                new SqlParameter("@Sex",      entity.Sex),
                new SqlParameter("@Birthday", entity.Birthday),
                new SqlParameter("@Address",  entity.Address),
                new SqlParameter("@Email",    entity.EMail)
            };
            return(SQLHELPER.ExecuteNonQuery(sqlstr, parameters));
        }
コード例 #4
0
 //更新头像
 public static object updateMyHeader(UserInfo info)
 {
     sqltext = "  update [dbo].[UserInfo] set  [headImgUrl]='" + info.HeadImgUrl + "' where [uid]='" + info.Uid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #5
0
 /// <summary>
 /// 职位删除
 /// </summary>
 /// <param name="uf"></param>
 /// <returns></returns>
 public static object delete(int jid)
 {
     sqltext = "delete from [dbo].[departjob] where [jobid]='" + jid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #6
0
ファイル: OrderServer.cs プロジェクト: hanhanyh/ycfzShop
 /// <summary>
 /// 发货(修改状态为 发货,填写发货方式,运单号,订单Id)
 /// </summary>
 /// <param name="order"></param>
 /// <returns></returns>
 public static object sendOrder(YC_Order order)
 {
     sqltext = "update [dbo].[YC_Order] set SendType='" + order.Sendtype + "',SendTime=convert(char(10),getdate(),120)+' '+Convert(varchar(8),Getdate(),108),WayNumber='" + order.WayNumber + "' where OID='" + order.OID + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #7
0
 //真删除
 public static object trueDeleteBYEID(int eid)
 {
     sqltext = "	delete from [dbo].[ycEmail] where [EID]='" + eid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #8
0
 //增加商品类型
 public static object add(YC_GoodType gt)
 {
     sqltext = "  insert into [dbo].[YC_GoodType]([Name],[Description])values('" + gt.Name + "','" + gt.Description + "')";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #9
0
ファイル: OrderServer.cs プロジェクト: hanhanyh/ycfzShop
 /// <summary>
 /// 生成订单  下单
 /// </summary>
 /// <param name="order"></param>
 /// <returns></returns>
 public static object GenerateOrder(YC_Order order)
 {
     sqltext = "  INSERT INTO [dbo].[YC_Order]([GID],[UID],[Price],[Count],[SendType],[Address],[BuyTime],[SendTime],[FinishedTime],[GoodSize],[WayNumber])values('" + order.GID + "', '" + order.UID + "', '" + order.Price + "', '" + order.Count + "',  '', '" + order.Address + "', convert(char(10),getdate(),120)+' '+Convert(varchar(8),Getdate(),108), null, null, '" + order.GoodSize + "', '" + order.WayNumber + "'); ";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #10
0
 //删除
 public static object delete(int gid)
 {
     sqltext = "  delete from [dbo].[Gongggao] where gid='" + gid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 } //查询所有
コード例 #11
0
 //删除一个部门
 public static object delete(int did)
 {
     sqltext = "delete from [dbo].[department] where did='" + did + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #12
0
 /// <summary>
 /// 修改(包括图片)
 /// </summary>
 /// <param name="web"></param>
 /// <returns></returns>
 public static object update(YC_Website web)
 {
     sqltext = "  update  [dbo].[YC_WebSite] set [WName]='" + web.Wname + "',[LogoUrl]='" + web.Logourl + "',[LunboImgUrl]='" + web.Lunboimgurl + "',[CompanyDescription]='" + web.Companydescription + "',[OurTeam]='" + web.Ourteam + "',[ContactUs]='" + web.Contactus + "',[ContactUsWeChatImage]='" + web.ContactUsWeChatImage + "',[TodayMovieUrl]='" + web.TodayMovieUrl + "' where [WID]='1'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #13
0
 /// <summary>
 /// 修改(不包括图)
 /// </summary>
 /// <param name="web"></param>
 /// <returns></returns>
 public static object updatenopic(YC_Website web)
 {
     sqltext = "    update  [dbo].[YC_WebSite] set [WName]='" + web.Wname + "',[CompanyDescription]='" + web.Companydescription + "',[OurTeam]='" + web.Ourteam + "',[ContactUs]='" + web.Contactus + "' where [WID]='1';";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #14
0
        //增加
        public static object add(YC_Website wb)
        {
            sqltext = "  insert into [dbo].[YC_WebSite]([WName],[LogoUrl],[LunboImgUrl],[CompanyDescription],[OurTeam],[ContactUs],[ContactUsWeChatImage],[TodayMovieUrl])VALUES  ('" + wb.Wname + "','" + wb.Logourl + "','" + wb.Lunboimgurl + "','" + wb.Companydescription + "','" + wb.Ourteam + "','" + wb.Contactus + "','" + wb.ContactUsWeChatImage + "','" + wb.TodayMovieUrl + "')";

            return(SQLHELPER.ExecuteNonQuery(sqltext));
        }
コード例 #15
0
ファイル: AddressServer.cs プロジェクト: hanhanyh/ycfzShop
 ///删除一个收货地址
 public static object deleteAddress(int aid)
 {
     sqltext = "delete from [dbo].[YC_Address] where AID='" + aid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #16
0
ファイル: AddressServer.cs プロジェクト: hanhanyh/ycfzShop
 //增加一个收货地址
 public static object addAddress(YC_Address address)
 {
     sqltext = "  insert into [dbo].[YC_Address](UID,Address,Phone,MailNumber,Name)values('" + address.UID + "','" + address.Address + "','" + address.Phone + "','" + address.MailNumber + "','" + address.Name + "')";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #17
0
 //添加商品
 public static object add(YC_Goods good)
 {
     sqltext = " insert into [dbo].[YC_Goods]([GTID],[Name],[SCPrice],[CXPrice],[DesImg1Url],[DesImg2Url],[DesImg3Url],[DetailImages],[AllSize])values('" + good.Gtid + "', '" + good.Name + "', '" + good.SCPrice + "', '" + good.SCPrice + "', '" + good.DesImg1Url + "', '" + good.DesImg2Url + "', '" + good.DesImg3Url + "', '" + good.DetailImages + "','" + good.AllSize + "'); ";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #18
0
 //标记日程为已完成
 public static object setFinished(int rid)
 {
     sqltext = "  update [dbo].[richeng] set [isFinished]='1' where rid='" + rid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #19
0
ファイル: UserServer.cs プロジェクト: hanhanyh/ycfzShop
 /// <summary>
 /// 后台管理中,管理员只能更新一部分用户资料
 /// </summary>
 /// <param name="U"></param>
 /// <returns></returns>
 public static object UpdateaPart(YC_User U)
 {
     sqltext = "  update [dbo].[YC_User] set [NickName]='" + U.Nickname + "',[Sex]='" + U.Sex + "',[Address]='" + U.Address + "',[Phone]='" + U.Phone + "',[QQ]='" + U.Qq + "' where [UID]='" + U.Uid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #20
0
 /// <summary>
 /// 根据ID删除商品
 /// </summary>
 /// <param name="gid"></param>
 /// <returns></returns>
 public static object deleteGoodById(int gid)
 {
     sqltext = "delete from [dbo].[YC_Goods] where [GID]='" + gid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #21
0
 /// <summary>
 /// 添加日程
 /// </summary>
 /// <param name="r"></param>
 /// <returns></returns>
 public static object add(richeng r)
 {
     sqltext = "  insert into [dbo].[richeng](uid,detail,zyLevel,time,isFinished)values('" + r.Uid + "','" + r.Detail + "','" + r.ZyLevel + "','" + r.Time + "','0')";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #22
0
ファイル: UserServer.cs プロジェクト: hanhanyh/ycfzShop
 /// <summary>
 /// 更新密码 传入用户名 和密码
 /// </summary>
 /// <param name="u"></param>
 /// <returns></returns>
 public static object updatePwd(YC_User u)
 {
     sqltext = "  update [dbo].[YC_User] set [PassWord]='" + u.Password + "' where [Name]='" + u.Name + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #23
0
 //删除日程
 public static object deleteByRID(int rid)
 {
     sqltext = " delete from [dbo].[richeng] where [rid]='" + rid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #24
0
ファイル: UserServer.cs プロジェクト: hanhanyh/ycfzShop
 /// <summary>
 /// 增加用户
 /// </summary>
 public static object add(YC_User user)
 {
     sqltext = "insert into [dbo].[YC_User]([Name],[NickName],[PassWord],[Address],[Sex],[Admin],[Phone],[QQ],Enable,Moneysum,RegDateTime)values('" + user.Name + "','" + user.Nickname + "','" + user.Password + "','" + user.Address + "','" + user.Sex + "','" + 0 + "','" + user.Phone + "','" + user.Qq + "','1','0.00',convert(char(10),getdate(),120)+' '+Convert(varchar(8),Getdate(),108))";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #25
0
 //删除商品类型
 public static object delete(int id)
 {
     sqltext = "  delete from [dbo].[YC_GoodType] where [GTID]='" + id + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #26
0
ファイル: UserServer.cs プロジェクト: hanhanyh/ycfzShop
 /// <summary>
 /// 删除用户
 /// </summary>
 /// <param name="user"></param>
 /// <returns></returns>
 public static object delete(YC_User user)
 {
     sqltext = "delete from [dbo].[YC_User]  where UID='" + user.Uid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #27
0
ファイル: OrderServer.cs プロジェクト: hanhanyh/ycfzShop
 /// <summary>
 /// 关闭交易
 /// </summary>
 /// <param name="oid"></param>
 /// <returns></returns>
 public static object Close(int oid)
 {
     sqltext = "  update [dbo].[YC_Order] set [isClosed]='1' where [OID]='" + oid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #28
0
ファイル: UserServer.cs プロジェクト: hanhanyh/ycfzShop
 //更新用户资料
 public static object update(YC_User user)
 {
     sqltext = "insert into [dbo].[YC_User]([Name],[NickName],[PassWord],[Address],[Sex],[Admin],[Phone],[QQ],Enable)values('" + user.Name + "','" + user.Nickname + "','" + user.Password + "','" + user.Address + "','" + user.Sex + "','" + user.Admin + "','" + user.Phone + "','" + user.Qq + "','1')";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #29
0
ファイル: OrderServer.cs プロジェクト: hanhanyh/ycfzShop
 /// <summary>
 /// 确认收收货  订单完成,设置FinishedTime
 /// </summary>
 /// <param name="order"></param>
 /// <returns></returns>
 public static object OrderFinished(YC_Order order)
 {
     sqltext = "  update [dbo].[YC_Order] set [FinishedTime]=(convert(char(10),getdate(),120)+' '+Convert(varchar(8),Getdate(),108)) where OID='" + order.OID + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }
コード例 #30
0
 //更新
 public static object updateMYInfo(UserInfo uinfo)
 {
     sqltext = "  update [dbo].[UserInfo] set [name]='" + uinfo.Name + "',[sex]='" + uinfo.Sex + "',[birthday]='" + uinfo.Birthday + "',[qq]='" + uinfo.Qq + "',[phone]='" + uinfo.Phone + "',[address]='" + uinfo.Address + "' where uid='" + uinfo.Uid + "'";
     return(SQLHELPER.ExecuteNonQuery(sqltext));
 }