⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getuserjob.cs

📁 文件内含有文档
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using property.model.SystemInfo;
using property.control.LogInfo;
using property.model.GetConnection;
using System.Data.SqlClient;
using System.Data;
namespace property.control.SystemInfo
{
    class GetUserJob
    {
        SqlCommand com = null;
        SqlConnection con = null;
        UserJob job = new UserJob();
        GetConnection getcon = new GetConnection();
        

        #region //增加单位信息
        public string InsetJob(UserJob job)
        {
           string P_str_Add=null;
            try {
                con = getcon.GetCon();
                com = new SqlCommand();
                string P_StrUserInser = "insert into tb_userJob values('"+job.getUsername()+"','" + job.getUsermonofile() + "','" + job.getUseraddress() + "','" + job.getUseracridine() + "','" + job.getUserphone() + "')";
                com.Connection = con;
                com.CommandText = P_StrUserInser;
                int P_int_Inset = com.ExecuteNonQuery();
                if (P_int_Inset == 1)
                { P_str_Add = "OK"; }// end block 
                else
                { P_str_Add = "NO";}// end block else
                com.Connection.Close();
                con.Close();
                return P_str_Add;
            }// end try
            catch (Exception e)
            {
                 P_str_Add="Error";
                return P_str_Add;
            }// end block cathc
            
        
        }// end block nsetJob(UserJob job)
        #endregion
   
        public SqlDataReader getselect()
        {
           
           
                con = getcon.GetCon();
                com = new SqlCommand();
                string P_StrUserInser = "select top 1* from tb_UserJob  order by userId  desc";
                com.Connection = con;
                com.CommandText = P_StrUserInser;
                SqlDataReader dr =com.ExecuteReader();
                return dr;

        }// end block nsetJob(UserJob job)

   
}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -