WELOA.DAL/Equipment/sb_warehousingDAO.cs

(开头部分) 24KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WELOA.Model;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using LSDAL_SQL;

namespace SBDAL_SQL
{
    public class sb_warehousingDAO
    {
        
        private DateSetInformation dsinfo = new DateSetInformation();
        private ls_exception exlog = new ls_exception();
        private ls_publicclass publicclassDAO = new ls_publicclass();
        private Polytechnic trinfo = new Polytechnic();

        
        public Polytechnic delWarehousing(string strId)
        {
            using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["lsstring"].ConnectionString))
            {
                SqlCommand command = connection.CreateCommand();
                command.CommandType = CommandType.Text;
                command.CommandText = "DELETE [sb_warehousing] WHERE id=@id AND audited <>'通过'";
                command.Parameters.AddWithValue("@id", strId);
                try
                {
                    if (connection.State == ConnectionState.Closed)
                    {
                        connection.Open();
                    }
                    this.trinfo.rowsnum = command.ExecuteNonQuery();
                }
                catch (Exception exception)
                {
                    this.exlog.insexception("sb_warehousingDAO.cs delWarehousing", exception.Message);
                    this.trinfo.nException = 1;
                    return this.trinfo;
                }
                return this.trinfo;
            }
        }

        public Polytechnic insWarehousing(string strDevicenumber, string strCategories, string strDevicename, string strType, string strConfiguration, int nTestingDays, DateTime dtTesttestingtime, int nInitialinventory, string strUnit, string strSn, double dUnitprice, string strSupplier, string strTransactor, string strProducers, string strInvoice, DateTime dtWarrantydate, string strManager, string strLocation, string strPicurl)
        {
            this.trinfo.rowsnum = -1;
            this.trinfo.nException = -1;
            using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["lsstring"].ConnectionString))
            {
                SqlCommand command = connection.CreateCommand();
                command.CommandType = CommandType.Text;
                command.CommandText = "INSERT INTO sb_warehousing \r\n                    (devicenumber,categories,devicename,type,configuration,testingdays,testingtime,initialinventory,unit,sn,unitprice,supplier,transactor,\r\n                    producers,invoice,warrantydate,manager,intostoragetime,location,audited,picurl)\r\n                    VALUES (@devicenumber,@categories,@devicename,@type,@configuration,@testingdays,@testingtime,@initialinventory,@unit,@sn,@unitprice,\r\n                    @supplier,@transactor,@producers,@invoice,@warrantydate,@manager,@intostoragetime,@location,@audited,@picurl)";
                command.Parameters.AddWithValue("@devicenumber", strDevicenumber);
                command.Parameters.AddWithValue("@categories", strCategories);
                command.Parameters.AddWithValue("@devicename", strDevicename);
                command.Parameters.AddWithValue("@type", strType);
后面还有 407 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。