public DataSet LinkNonUniqueComponent(string strSQLServer, string strDataBase, int WipID, string LinkData, int LinkMaterialID, string User, int RouteStepID, int EquipmentID) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_LinkNonUniqueComponent @WipID, @LinkData, @LinkMaterialID, @User, @RouteStepID, @EquipmentID"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@WipID", DataAccessNet.Command.ParameterType.Int, WipID); objSQLCommand.AddParameter("@LinkData", DataAccessNet.Command.ParameterType.NChar, LinkData); objSQLCommand.AddParameter("@LinkMaterialID", DataAccessNet.Command.ParameterType.Int, LinkMaterialID); objSQLCommand.AddParameter("@User", DataAccessNet.Command.ParameterType.NChar, User); objSQLCommand.AddParameter("@RouteStepID", DataAccessNet.Command.ParameterType.Int, RouteStepID); objSQLCommand.AddParameter("@EquipmentID", DataAccessNet.Command.ParameterType.Int, EquipmentID); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet checkIfAssyLocallyExistsUpd(string strSQLServer, string strDataBase, string Assy, int FKCustomer, string PalledId) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_GetLocallyAssemblyByCustomerTEMPORAL @FKCustomer, @Assy, @PalletId"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@Assy", DataAccessNet.Command.ParameterType.VarChar, Assy); objSQLCommand.AddParameter("@FKCustomer", DataAccessNet.Command.ParameterType.Int, FKCustomer); objSQLCommand.AddParameter("@PalletId", DataAccessNet.Command.ParameterType.VarChar, PalledId); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet GetWIPID(string strSQLServer, string strDataBase, string Serial) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "SELECT [Wip_ID]" + " FROM CHISQLV10A.[JEMS].[dbo].[WP_Wip]" + " WHERE SerialNumber = @Serial"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@Serial", DataAccessNet.Command.ParameterType.NChar, Serial); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet ShowAssemblies(string strSQLServer, string strDataBase, int Customer) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "SELECT TOP 1000 [PKAssembly]" + ",[Assembly]" + ",[Rows]" + ",[Columns]" + ",[Rows] * [Columns] as Pieces" + ",[FKCustomer]" + ",U.FirstName + ' ' + U.LastName as UserUpdater" + ",A.[LastUpdated]" + ",PalletID" + " FROM [ValeoApps].[dbo].[CT_Assemblies] A" + " INNER JOIN SC_Users U ON U.PKUser = A.FKUserUpdater" + " WHERE FKCustomer = @Customer"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@Customer", DataAccessNet.Command.ParameterType.Int, Customer); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet checkIfAssyLocallyExists(string strSQLServer, string strDataBase, string Assy, int FKCustomer) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "SELECT [PKAssembly]" + ",[Assembly]" + ",[Rows]" + ",[Columns]" + ",[FKCustomer]" + ",[FKUserUpdater]" + ",[LastUpdated]" + ",[Available]" + ",PalletID" + " FROM CT_Assemblies" + " WHERE [Assembly] = @Assy AND FKCustomer = @FKCustomer"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@Assy", DataAccessNet.Command.ParameterType.NChar, Assy); objSQLCommand.AddParameter("@FKCustomer", DataAccessNet.Command.ParameterType.Int, FKCustomer); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet UpdateBoardLoopsCounter(string strSQLServer, string strDataBase, int PKBoardLoopCounter, int LoopsNumber, string Userupdated) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_UpdSerialLoopsCounter @PKBoardLoopCounter, @LoopsNumber, @Userupdated"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@PKBoardLoopCounter", DataAccessNet.Command.ParameterType.Int, PKBoardLoopCounter); objSQLCommand.AddParameter("@LoopsNumber", DataAccessNet.Command.ParameterType.Int, LoopsNumber); objSQLCommand.AddParameter("@Userupdated", DataAccessNet.Command.ParameterType.VarChar, Userupdated); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet InsertAssembly(string strSQLServer, string strDataBase, int Updater, string Assy, int Rows, int Columns, int FKCustomer, string PalletID) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_AddAssembly @Updater, @Assy, @Rows, @Columns, @FKCustomer, @PalletID"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@Updater", DataAccessNet.Command.ParameterType.Int, Updater); objSQLCommand.AddParameter("@Assy", DataAccessNet.Command.ParameterType.NChar, Assy); objSQLCommand.AddParameter("@Rows", DataAccessNet.Command.ParameterType.Int, Rows); objSQLCommand.AddParameter("@Columns", DataAccessNet.Command.ParameterType.Int, Columns); objSQLCommand.AddParameter("@FKCustomer", DataAccessNet.Command.ParameterType.Int, FKCustomer); objSQLCommand.AddParameter("@PalletID", DataAccessNet.Command.ParameterType.NChar, PalletID); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet GetBoardLoopsNumber(string strSQLServer, string strDataBase, String SerialNumber, string Assembly) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_GetSerialLoopsCounterOtro @SerialNumber, @Assembly"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@SerialNumber", DataAccessNet.Command.ParameterType.VarChar, SerialNumber); objSQLCommand.AddParameter("@Assembly", DataAccessNet.Command.ParameterType.VarChar, Assembly); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet ApproveAccess(string strSQLServer, string strDataBase, int PKUser, int PKApplication, int Approved, int Updater) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_ApproveAccess @PKUser, @PKApplication, @Approved, @Updater"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@PKUser", DataAccessNet.Command.ParameterType.Int, PKUser); objSQLCommand.AddParameter("@PKApplication", DataAccessNet.Command.ParameterType.Int, PKApplication); objSQLCommand.AddParameter("@Approved", DataAccessNet.Command.ParameterType.Int, Approved); objSQLCommand.AddParameter("@Updater", DataAccessNet.Command.ParameterType.Int, Updater); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet GetAdminEmail(string strSQLServer, string strDataBase, int PKApplication, int PKCustomer) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "SELECT [PKApplication]" + ",[Application]" + ",[Admin]" + ",[FirstName] + ' ' + [LastName] as AdminUser" + ",[Email]" + ",[Description]" + ",[MainPage]" + ",[FKUserUpdater]" + " FROM [ValeoApps].[dbo].[CT_Applications] A" + " INNER JOIN SC_AdminCustomerApplication ACA ON A.PKApplication = ACA.FKApplication" + " INNER JOIN SC_Users U ON ACA.Admin = U.PKUser" + " WHERE ACA.FKCustomer = @PKCustomer AND PKApplication = @PKApplication"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@PKApplication", DataAccessNet.Command.ParameterType.Int, PKApplication); objSQLCommand.AddParameter("@PKCustomer", DataAccessNet.Command.ParameterType.Int, PKCustomer); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet UpdateProcessStatusOnMES(string strSQLServer, string strDataBase, int WipID, int RouteStepID, int EquipmentID, string User) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_UpdateProcessStatusOnMES @WipID, @RouteStepID, @EquipmentID, @User"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@WipID", DataAccessNet.Command.ParameterType.Int, WipID); objSQLCommand.AddParameter("@User", DataAccessNet.Command.ParameterType.NChar, User); objSQLCommand.AddParameter("@RouteStepID", DataAccessNet.Command.ParameterType.Int, RouteStepID); objSQLCommand.AddParameter("@EquipmentID", DataAccessNet.Command.ParameterType.Int, EquipmentID); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet DeleteAssemblyUpd(string strSQLServer, string strDataBase, int PKAssy) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_DelAssemblyUpd @PKAssembly"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@PKAssembly", DataAccessNet.Command.ParameterType.Int, PKAssy); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet InsertPalletLink(string strSQLServer, string strDataBase, String SerialNumber, string PalletId, String Operation, string User, int Available) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_InsertPalletLink @SerialNumber, @PalletId, @Operation, @User, @Available"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@SerialNumber", DataAccessNet.Command.ParameterType.NChar, SerialNumber); objSQLCommand.AddParameter("@PalletId", DataAccessNet.Command.ParameterType.NChar, PalletId); objSQLCommand.AddParameter("@Operation", DataAccessNet.Command.ParameterType.NChar, Operation); objSQLCommand.AddParameter("@User", DataAccessNet.Command.ParameterType.NChar, User); objSQLCommand.AddParameter("@Available", DataAccessNet.Command.ParameterType.Int, Available); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet GetCheckUser(string strSQLServer, string strDataBase, string User, int PKCustomer) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "up_GetCheckUser @WindowsID, @PKCustomer"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@WindowsID", DataAccessNet.Command.ParameterType.VarChar, User); objSQLCommand.AddParameter("@PKCustomer", DataAccessNet.Command.ParameterType.Int, PKCustomer); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet UpdateUser(string strSQLServer, string strDataBase, int EmployeeNumber, string User, string Name, string LastName, string email) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "UPDATE [dbo].[SC_Users]" + "SET [EmployeeNumber] = @EmployeeNumber" + ",[WindowsUser] = @User" + ",[FirstName] = @Name" + ",[LastName] = @LastName" + ",[Email] = @email" + ",[LastUpdated] = GETDATE()" + "WHERE WindowsUser = @User"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@EmployeeNumber", DataAccessNet.Command.ParameterType.Int, EmployeeNumber); objSQLCommand.AddParameter("@User", DataAccessNet.Command.ParameterType.VarChar, User); objSQLCommand.AddParameter("@Name", DataAccessNet.Command.ParameterType.VarChar, Name); objSQLCommand.AddParameter("@LastName", DataAccessNet.Command.ParameterType.VarChar, LastName); objSQLCommand.AddParameter("@email", DataAccessNet.Command.ParameterType.VarChar, email); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet CheckIfHaveAccess(string strSQLServer, string strDataBase, int PKUser) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "SELECT [PKUserApplication]" + ",[FKUser]" + ",[FKApplication]" + ",[HasAccess]" + ",[FKUserUpdater]" + ",[LastUpdated]" + ",[Available]" + " FROM [ValeoApps].[dbo].[SC_UserApplication]" + " WHERE FKUser = @PKUser AND FKApplication = 5"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@PKUser", DataAccessNet.Command.ParameterType.Int, PKUser); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet UserHasAccess(string strSQLServer, string strDataBase, string pageName, int fkUser) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "up_GetUserAccessTo @FKUser,@URL"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@FKUser", DataAccessNet.Command.ParameterType.VarChar, fkUser); objSQLCommand.AddParameter("@URL", DataAccessNet.Command.ParameterType.VarChar, pageName); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet GetUserCustomer(string strSQLServer, string strDataBase, string User, int PKCustomer) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "SELECT [PKUserCustomer]" + ",[FKUser]" + ",[FKCustomer]" + " FROM [ValeoApps].[dbo].[SC_UserCustomer] UC (NOLOCK)" + " INNER JOIN SC_Users U ON U.PKUser = UC.FKUser " + " WHERE U.[WindowsUser] = @User AND FKCustomer = @PKCUstomer"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@User", DataAccessNet.Command.ParameterType.NChar, User); objSQLCommand.AddParameter("@PKCustomer", DataAccessNet.Command.ParameterType.Int, PKCustomer); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet chgUserPermissionDetail(string strSQLServer, string strDataBase, int FKCustomerID, int FKUserID, int FKroleID, bool Available, int FKLastUpdatedUserID) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "up_chgUserPermissionDetail @FKCustomerID, @FKUserID,@FKroleID,@Available,@FKLastUpdatedUserID,@UserReadOnly"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@FKCustomerID", DataAccessNet.Command.ParameterType.Int, FKCustomerID); objSQLCommand.AddParameter("@FKUserID", DataAccessNet.Command.ParameterType.Int, FKUserID); objSQLCommand.AddParameter("@FKroleID", DataAccessNet.Command.ParameterType.Int, FKroleID); objSQLCommand.AddParameter("@Available", DataAccessNet.Command.ParameterType.Bit, Available); objSQLCommand.AddParameter("@FKLastUpdatedUserID", DataAccessNet.Command.ParameterType.Int, @FKLastUpdatedUserID); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet RegisterUserCustomer(string strSQLServer, string strDataBase, int PKUser, int PKCustomer) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "INSERT INTO [dbo].[SC_UserCustomer]" + "([FKUser]" + ",[FKCustomer])" + " VALUES" + "(@PKUser" + ",@PKCustomer)"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@PKUser", DataAccessNet.Command.ParameterType.Int, PKUser); objSQLCommand.AddParameter("@PKCustomer", DataAccessNet.Command.ParameterType.Int, PKCustomer); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet GetUserPermissionDetail(string strSQLServer, string strDataBase, int FKCustomerID, int userID) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "up_GetUserPermissionDetail @FKCustomerID, @userID"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@FKCustomerID", DataAccessNet.Command.ParameterType.Int, FKCustomerID); objSQLCommand.AddParameter("@userID", DataAccessNet.Command.ParameterType.Int, userID); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet GetRoles(string strSQLServer, string strDataBase) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "up_GetRoles"; objSQLCommand = new DataAccessNet.Command(strSQL); //objSQLCommand.AddParameter("@userID", DataAccessNet.Command.ParameterType.Int, User); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet UpdateAssemblyUpd(string strSQLServer, string strDataBase, int PKAssembly, int Updater, string Assy, int Rows, int Columns, int FKCustomer, string PalletID, Boolean Panel, Boolean LoopValidation, int LoopsAllowed, Boolean CheckPointValidation) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_ChgAssemblyUpd @PKAssembly, @Updater, @Assy, @Rows, @Columns, @FKCustomer, @PalletID, @Panel,@LoopValidation,@LoopsAllowed,@CheckPointValidation"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@PKAssembly", DataAccessNet.Command.ParameterType.Int, PKAssembly); objSQLCommand.AddParameter("@Updater", DataAccessNet.Command.ParameterType.Int, Updater); objSQLCommand.AddParameter("@Assy", DataAccessNet.Command.ParameterType.NChar, Assy); objSQLCommand.AddParameter("@Rows", DataAccessNet.Command.ParameterType.Int, Rows); objSQLCommand.AddParameter("@Columns", DataAccessNet.Command.ParameterType.Int, Columns); objSQLCommand.AddParameter("@FKCustomer", DataAccessNet.Command.ParameterType.Int, FKCustomer); objSQLCommand.AddParameter("@PalletID", DataAccessNet.Command.ParameterType.NChar, PalletID); objSQLCommand.AddParameter("@Panel", DataAccessNet.Command.ParameterType.Bit, Panel); objSQLCommand.AddParameter("@LoopValidation", DataAccessNet.Command.ParameterType.Bit, LoopValidation); objSQLCommand.AddParameter("@LoopsAllowed", DataAccessNet.Command.ParameterType.Int, LoopsAllowed); objSQLCommand.AddParameter("@CheckPointValidation", DataAccessNet.Command.ParameterType.Bit, CheckPointValidation); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet checkIfAssyExists(string strSQLServer, string strDataBase, string Assy, string Customer) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "SELECT [Assembly_ID]" + ",[Assembly]" + ",[Number]" + ",[Revision]" + ",[Version]" + ",[Descr]" + ",[Phantom]" + ",[BOM_ID]" + ",[EffectiveFrom]" + ",[EffectiveTo]" + ",[Active]" + ",[Customer]" + ",[Panel_ID]" + ",[Family_ID]" + ",[BarcodeMask_ID]" + ",[UseMultiPartBarcode]" + ",[UserID_ID]" + ",[LastUpdated]" + ",[BuildStatus_ID]" + ",[CustomerNumber]" + ",[CustomerRevision]" + ",[AssemblyFilter1]" + ",[AssemblyFilter2]" + " FROM CHISQLV10A.[JEMS].[dbo].[CR_Assemblies]" + " INNER JOIN CHISQLV10A.[JEMS].[dbo].CR_Customer_V ON CR_Customer_V.Customer_ID = CR_Assemblies.Customer_ID" + " WHERE Number = @Assy AND Customer = @Customer AND Active = 1 AND Number NOT LIKE '% %'"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@Assy", DataAccessNet.Command.ParameterType.NChar, Assy); objSQLCommand.AddParameter("@Customer", DataAccessNet.Command.ParameterType.NChar, Customer); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet GetLinkPath(string strSQLServer, string strDataBase, string FKCustomer, int Available) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "SELECT L.[PKLinkPath] " + ",L.[FKCustomer] " + ",L.[FKLevel] " + ",S.[Shift] " + ",L.[Name] " + ",L.[Phone] " + ",[User] = U.[FirstName] + ' ' + U.[LastName] " + ",L.[LastUpdated] " + ",L.[Available] " + "FROM [ValeoApps].[dbo].CT_LinkPath L (NOLOCK) " + "INNER JOIN [ValeoApps].[dbo].CT_Shifts S (NOLOCK) ON L.FKShift = S.PKShift " + "INNER JOIN [ValeoApps].[dbo].SC_Users U (NOLOCK) ON L.FKUserUpdater = U.PKUser " + "INNER JOIN [ValeoApps].[dbo].CT_Customers C (NOLOCK) ON L.FKCustomer = c.PKCustomer " + "INNER JOIN [ValeoApps].[dbo].CT_Level N (NOLOCK) ON L.FKLevel = N.PKLevel " + "WHERE L.FKCustomer = @FKCustomer "; if (Available == 1) { strSQL += "AND L.[Available] = @Available "; } strSQL += "ORDER BY FKLevel ASC"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@FKCustomer", DataAccessNet.Command.ParameterType.Int, FKCustomer); if (Available == 1) { objSQLCommand.AddParameter("@Available", DataAccessNet.Command.ParameterType.Bit, true); } try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet sendLog(string strSQLServer, string strDataBase, string Customer_Id, string Customer, string SerialNumber, string PalletId, string Assembly_Id, string Assembly, string Wip_Id, string PanelNumberPL, string PanelSizePL, string PanelSizeMES, string LinkObject, string LinkMaterialID, string EquipmentValue, string EquipmentName, string RouteStepID, string SerialLoops, string LoopsAllowed, string Message) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC up_AddLinkingLog @Customer_Id, @Customer, @SerialNumber, @PalletId, @Assembly_Id," + "@Assembly, @Wip_Id,@PanelNumberPL,@PanelSizePL,@PanelSizeMES,@LinkObject," + "@LinkMaterialID,@EquipmentValue,@EquipmentName,@RouteStepID," + "@SerialLoops,@LoopsAllowed,@Message"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@Customer_Id", DataAccessNet.Command.ParameterType.VarChar, Customer_Id); objSQLCommand.AddParameter("@Customer", DataAccessNet.Command.ParameterType.VarChar, Customer); objSQLCommand.AddParameter("@SerialNumber", DataAccessNet.Command.ParameterType.VarChar, SerialNumber); objSQLCommand.AddParameter("@PalletId", DataAccessNet.Command.ParameterType.VarChar, PalletId); objSQLCommand.AddParameter("@Assembly_Id", DataAccessNet.Command.ParameterType.VarChar, Assembly_Id); objSQLCommand.AddParameter("@Assembly", DataAccessNet.Command.ParameterType.VarChar, Assembly); objSQLCommand.AddParameter("@Wip_Id", DataAccessNet.Command.ParameterType.VarChar, Wip_Id); objSQLCommand.AddParameter("@PanelNumberPL", DataAccessNet.Command.ParameterType.VarChar, PanelNumberPL); objSQLCommand.AddParameter("@PanelSizePL", DataAccessNet.Command.ParameterType.VarChar, PanelSizePL); objSQLCommand.AddParameter("@PanelSizeMES", DataAccessNet.Command.ParameterType.VarChar, PanelSizeMES); objSQLCommand.AddParameter("@LinkObject", DataAccessNet.Command.ParameterType.VarChar, LinkObject); objSQLCommand.AddParameter("@LinkMaterialID", DataAccessNet.Command.ParameterType.VarChar, LinkMaterialID); objSQLCommand.AddParameter("@EquipmentValue", DataAccessNet.Command.ParameterType.VarChar, EquipmentValue); objSQLCommand.AddParameter("@EquipmentName", DataAccessNet.Command.ParameterType.VarChar, EquipmentName); objSQLCommand.AddParameter("@RouteStepID", DataAccessNet.Command.ParameterType.VarChar, RouteStepID); objSQLCommand.AddParameter("@SerialLoops", DataAccessNet.Command.ParameterType.VarChar, SerialLoops); objSQLCommand.AddParameter("@LoopsAllowed", DataAccessNet.Command.ParameterType.VarChar, LoopsAllowed); objSQLCommand.AddParameter("@Message", DataAccessNet.Command.ParameterType.VarChar, Message); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet GetEquipmentID(string strSQLServer, string strDataBase, string Equipment) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "SELECT TOP 1000 [Equipment_ID]" + ",[EquipmentMaster_ID]" + ",[CommonName]" + ",[SeqNumber]" + ",[AssetTag]" + ",[ManSerialNumber]" + ",[Available]" + ",[EquipmentSetup_ID]" + ",[TableA]" + ",[TableB]" + ",[PPM]" + ",[DateOfManufacture]" + ",[RunTimeHours]" + ",[SoftwareVersion]" + ",[Condition_ID]" + ",[Status_ID]" + ",[FeederTracking]" + ",[FeederTypeValidation]" + ",[UserID_ID]" + ",[LastUpdated]" + ",[Build_ID]" + ",[IsQtyRequiredOnAllocation]" + " FROM CHISQLV10A.[JEMS].[dbo].[CR_Equipment]" + " WHERE CommonName = @Equipment"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@Equipment", DataAccessNet.Command.ParameterType.NChar, Equipment); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public void InsertLinkPath(string strSQLServer, string strSQLDataBase, int FKCustomer, int FKLevel, int FKShift, string Name, string Phone, int FKUserUpdater, bool Available) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "INSERT INTO [dbo].CT_LinkPath " + "( " + "FKCustomer " + ",FKLevel " + ",FKShift " + ",Name " + ",Phone " + ",FKUserUpdater ) " + "VALUES " + "( " + "@FKCustomer " + ",@FKLevel " + ",@FKShift " + ",@Name " + ",@Phone " + ",@FKUserUpdater )"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@FKCustomer", DataAccessNet.Command.ParameterType.Int, FKCustomer); objSQLCommand.AddParameter("@FKLevel", DataAccessNet.Command.ParameterType.Int, FKLevel); objSQLCommand.AddParameter("@FKShift", DataAccessNet.Command.ParameterType.Int, FKShift); objSQLCommand.AddParameter("@Name", DataAccessNet.Command.ParameterType.NChar, Name); objSQLCommand.AddParameter("@Phone", DataAccessNet.Command.ParameterType.NChar, Phone); objSQLCommand.AddParameter("@FKUserUpdater", DataAccessNet.Command.ParameterType.Int, FKUserUpdater); try { objCom.SelectResults(strSQLServer, strSQLDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); } }
public DataSet GetFAQ(string strSQLServer, string strDataBase, int Available) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "SELECT F.[FAQ] " + ",[User] = U.[FirstName] + ' ' + U.[LastName] " + ",F.[LastUpdated] " + ",F.[Available] " + "FROM [dbo].SY_PalletLinkFAQ F (NOLOCK) " + "INNER JOIN [ValeoApps].[dbo].SC_Users U (NOLOCK) ON F.FKUserUpdater = U.PKUser "; if (Available == 1) { strSQL += "WHERE F.[Available] = @Available "; } strSQL += "ORDER BY F.[LastUpdated] DESC "; objSQLCommand = new DataAccessNet.Command(strSQL); if (Available == 1) { objSQLCommand.AddParameter("@Available", DataAccessNet.Command.ParameterType.Bit, true); } try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }
public DataSet StatusPallet(string strSQLServer, string strDataBase, string FKFixture) { DataSet ds = new DataSet(); DataAccessNet.SQLDataSet objCom = new DataAccessNet.SQLDataSet(); DataAccessNet.Command objSQLCommand = default(DataAccessNet.Command); string strSQL = null; strSQL = "EXEC [dbo].[up_GetPalletStatusGral] @Fixture"; objSQLCommand = new DataAccessNet.Command(strSQL); objSQLCommand.AddParameter("@Fixture", DataAccessNet.Command.ParameterType.VarChar, FKFixture); try { ds = objCom.SelectResults(strSQLServer, strDataBase, objSQLCommand); } catch (Exception e) { Console.WriteLine(e.Message); ds = null; } return(ds); }