using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using System.Collections.Specialized;
//using SystemFramework;
using DataLinkMesWork;

namespace bizFacade
{
    /// <summary>
    /// 电子看板信息系统
    /// </summary>
    public partial class BaseDataSystemMES
    {
        /// <summary>
        ///  电子看板_零件图号_生产厂家_厂家_查询
        /// </summary>
        /// <param name="dt"></param>
        static public void Factory_Select(out DataTable dt)
        {
            string sql;
            sql = " exec 电子看板_零件图号_生产厂家_厂家_查询";
            DataAccess.ExecuteDataTable(sql, out  dt);
        }


        /// <summary>
        ///  电子看板_零件图号_生产厂家_厂家_快速_查询
        /// </summary>
        /// <param name="str"></param>
        /// <param name="dt"></param>
        static public void Factory_kuaisu_Select(string str ,out DataTable dt)
        {
            string procedureName;
            procedureName = "电子看板_零件图号_生产厂家_厂家_快速_查询";
            SqlParameter[] thisParms = new SqlParameter[1];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@零件图号", str);
            DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms, out dt); 
        }

        /// <summary>
        /// 电子看板_零件图号_生产厂家_厂家_增加
        /// </summary>
        static public bool Factory_Insert(string Lingjian_tuhao, string Wuliaohao,
            string Gongyingshang_number, string Gongyingshang_name, string Gongyingshang_shortname)
        {
            string procedureName;
            procedureName = "电子看板_零件图号_生产厂家_厂家_增加";
            SqlParameter[] thisParms = new SqlParameter[5];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@零件图号", Lingjian_tuhao);
            thisParms[1] = new System.Data.SqlClient.SqlParameter("@物料号", Wuliaohao);
            thisParms[2] = new System.Data.SqlClient.SqlParameter("@供应商代码", Gongyingshang_number);
            thisParms[3] = new System.Data.SqlClient.SqlParameter("@供应商名称", Gongyingshang_name);
            thisParms[4] = new System.Data.SqlClient.SqlParameter("@供应商简称", Gongyingshang_shortname);
            return DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
        }

        /// <summary>
        /// 电子看板_零件图号_生产厂家_厂家_修改
        /// </summary>
        static public bool Factory_Update(int Changjia_num, string Lingjian_tuhao, string Wuliaohao,
            string Gongyingshang_number, string Gongyingshang_name, string Gongyingshang_shortname)
        {
            string procedureName;
            procedureName = "电子看板_零件图号_生产厂家_厂家_修改";
            SqlParameter[] thisParms = new SqlParameter[6];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@厂家代码", Changjia_num);
            thisParms[1] = new System.Data.SqlClient.SqlParameter("@零件图号", Lingjian_tuhao);
            thisParms[2] = new System.Data.SqlClient.SqlParameter("@物料号", Wuliaohao);
            thisParms[3] = new System.Data.SqlClient.SqlParameter("@供应商代码", Gongyingshang_number);
            thisParms[4] = new System.Data.SqlClient.SqlParameter("@供应商名称", Gongyingshang_name);
            thisParms[5] = new System.Data.SqlClient.SqlParameter("@供应商简称", Gongyingshang_shortname);
            return DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
        }

        /// <summary>
        /// 电子看板_零件图号_生产厂家_厂家_删除
        /// </summary>
        /// <param name="Changjia_num">序号</param>
        static public bool Factory_Delete(int Changjia_num)
        {
            string procedureName;
            procedureName = "电子看板_零件图号_生产厂家_厂家_删除";
            SqlParameter[] thisParms = new SqlParameter[1];
            thisParms[0] = new System.Data.SqlClient.SqlParameter("@厂家代码", Changjia_num);
            return DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms);
        }
       
      
      
    }
}
