Beispiel #1
0
        public DataSet InsertPalletTimeOut(string strSQLServer, string strDataBase, string PalletName, string Customer, string AvailableDatetime)
        {
            wsSQL.SQLServerDBv2 SQL = new wsSQL.SQLServerDBv2();
            DataSet             ds  = new DataSet();
            int minutes             = int.Parse(AvailableDatetime);
            int FKCustomer          = int.Parse(Customer);

            string strSQL = "DECLARE	@return_value int "+
                            "EXEC	@return_value = [dbo].[up_InsertPalletTimeOut] "+
                            "@PalletName = '" + PalletName + "', " +
                            "@FKCustomer = " + FKCustomer + ", " +
                            "@LastUpdated = '" + DateTime.Now + "', " +
                            "@AvailableDatetime = '" + DateTime.Now.AddSeconds(minutes) + "'";


            try
            {
                ds = SQL.dsSQLQuery(strSQLServer, strDataBase, strSQL);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                ds = null;
            }
            return(ds);
        }
Beispiel #2
0
        public DataSet fnInsertBoardLoopsCounter(string strSQLServer, string strDataBase, string SerialNumber,
                                                 int LoopsNumber, string Userupdated, string Assembly)
        {
            wsSQL.SQLServerDBv2 SQL = new wsSQL.SQLServerDBv2();
            DataSet             ds  = new DataSet();

            string strSQL = null;

            strSQL = "EXEC up_AddSerialLoopsCounterOtro " +
                     "@SerialNumber = '" + SerialNumber + "', " +
                     "@LoopsNumber = '" + LoopsNumber + "', " +
                     "@Userupdated = '" + Userupdated + "', " +
                     "@Assembly = '" + Assembly + "' ";



            try
            {
                ds = SQL.dsSQLQuery(strSQLServer, strDataBase, strSQL);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                ds = null;
            }
            return(ds);
        }
        public DataSet getPalletLinkConfig(string strSQLServer, string strDataBase, string PKMachine)
        {
            wsSQL.SQLServerDBv2 SQL = new wsSQL.SQLServerDBv2();
            DataSet             ds  = new DataSet();

            string strSQL = "DECLARE	@return_value int "+
                            "EXEC	@return_value = [dbo].[up_GetPalletLinkConfig] "+
                            "@PKMachine = " + PKMachine;

            try
            {
                ds = SQL.dsSQLQuery(strSQLServer, strDataBase, strSQL);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                ds = null;
            }
            return(ds);
        }
Beispiel #4
0
        public DataSet GetCustomerTimeOut(string strSQLServer, string strDataBase, string FKCustomer)
        {
            wsSQL.SQLServerDBv2 SQL = new wsSQL.SQLServerDBv2();
            DataSet             ds  = new DataSet();

            string strSQL = "DECLARE	@return_value int "+
                            "EXEC	@return_value = [dbo].[up_GetPalletTimeOutByCustomer] "+
                            "@FKCustomer = '" + FKCustomer + "'";

            try
            {
                ds = SQL.dsSQLQuery(strSQLServer, strDataBase, strSQL);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                ds = null;
            }
            return(ds);
        }
Beispiel #5
0
        public DataSet getCustomersByUserInfo(string strSQLServer, string strDataBase, int user, int module)
        {
            wsSQL.SQLServerDBv2 SQL = new wsSQL.SQLServerDBv2();
            DataSet             ds  = new DataSet();

            string strSQL = "DECLARE	@return_value int "+
                            "EXEC	@return_value = [dbo].[up_GetCustomersByUser] "+
                            "@UserID = " + user + ", " +
                            "@Module = " + module;

            try
            {
                ds = SQL.dsSQLQuery(strSQLServer, strDataBase, strSQL);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                ds = null;
            }
            return(ds);
        }
Beispiel #6
0
        // Server and DB Test Group

        public DataSet getCustomersInfo(string strSQLServer, string strDataBase, string customer)
        {
            wsSQL.SQLServerDBv2 SQL = new wsSQL.SQLServerDBv2();
            DataSet             ds  = new DataSet();

            string strSQL = "DECLARE	@return_value int "+
                            "EXEC	@return_value = [dbo].[up_GetCustomersByName] "+
                            "@Combo = 1 " +
                            ",@CustomerName = " + customer;

            try
            {
                ds = SQL.dsSQLQuery(strSQLServer, strDataBase, strSQL);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                ds = null;
            }
            return(ds);
        }
Beispiel #7
0
        public DataSet UpdateCustomerTimeOut(string strSQLServer, string strDataBase, int gvPKTime, int gvTimeout, int gvPKUser)
        {
            wsSQL.SQLServerDBv2 SQL = new wsSQL.SQLServerDBv2();
            DataSet             ds  = new DataSet();

            string strSQL = "DECLARE	@return_value int "+
                            "EXEC	@return_value = [dbo].[up_UpdatePalletTimeOutByCustomer] "+
                            "@PKTimeOut = " + gvPKTime + ", " +
                            "@TimeOut = '" + gvTimeout + "', " +
                            "@pFKLastUpdatedUserID = " + gvPKUser;

            try
            {
                ds = SQL.dsSQLQuery(strSQLServer, strDataBase, strSQL);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                ds = null;
            }
            return(ds);
        }
        public DataSet checkIfAssyLocallyExistsUpd(string strSQLServer, string strDataBase, string Assy, int FKCustomer, string PalledId)
        {
            wsSQL.SQLServerDBv2 SQL = new wsSQL.SQLServerDBv2();
            DataSet             ds  = new DataSet();

            string strSQL = "DECLARE	@return_value int "+
                            "EXEC	@return_value = [dbo].[up_GetLocallyAssemblyByCustomerPalletLink] "+
                            "@FKCustomer = '" + FKCustomer + "', " +
                            "@Assy = '" + Assy + "', " +
                            "@PalletId = '" + PalledId + "'";


            try
            {
                ds = SQL.dsSQLQuery(strSQLServer, strDataBase, strSQL);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                ds = null;
            }
            return(ds);
        }
Beispiel #9
0
        public DataSet fnUpdateBoardLoopsCounter(string strSQLServer, string strDataBase, int PKBoardLoopCounter,
                                                 int LoopsNumber, string Userupdated)
        {
            wsSQL.SQLServerDBv2 SQL = new wsSQL.SQLServerDBv2();
            DataSet             ds  = new DataSet();

            string strSQL = null;

            strSQL = "EXEC up_UpdSerialLoopsCounter " +
                     "@PKBoardLoopCounter = '" + PKBoardLoopCounter + "', " +
                     "@LoopsNumber = '" + LoopsNumber + "', " +
                     "@Userupdated = '" + Userupdated + "' ";

            try
            {
                ds = SQL.dsSQLQuery(strSQLServer, strDataBase, strSQL);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                ds = null;
            }
            return(ds);
        }
Beispiel #10
0
        public DataSet fnInsertPalletLink(string strSQLServer, string strDataBase, String SerialNumber, string PalletId, String Operation, string User, int Available)
        {
            wsSQL.SQLServerDBv2 SQL = new wsSQL.SQLServerDBv2();
            DataSet             ds  = new DataSet();

            string strSQL = "EXEC up_InsertPalletLink " +
                            "@SerialNumber = '" + SerialNumber + "', " +
                            "@PalletId = '" + PalletId + "', " +
                            "@Operation = '" + Operation + "', " +
                            "@User = '******', " +
                            "@Available = '" + Available + "' ";


            try
            {
                ds = SQL.dsSQLQuery(strSQLServer, strDataBase, strSQL);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                ds = null;
            }
            return(ds);
        }