getuserjob.cs

来自「财务凭证管理系统,主要是从事公司或部门的财务方面的管理。此系统给会计人员带来很大」· CS 代码 · 共 65 行

CS
65
字号
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 + =
减小字号Ctrl + -
显示快捷键?