Exemple #1
0
 public void Insert_SalesAutorization_Type(String sDescription)
 {
     param    = new SqlParameter[2];
     param[0] = new SqlParameter("@iSales", SqlDbType.Int)
     {
         Value = 0
     };
     param[1] = new SqlParameter("@vSalesDesc", SqlDbType.VarChar)
     {
         Value = sDescription
     };
     objDB.ExecStoredIUD("sp_insertSalesAutorization_Type", param);
 }
Exemple #2
0
        public errorCompositeType InsertTaskExchange(ExchangeFileCompositeType etct)
        {
            var lstError = new errorCompositeType();

            try
            {
                var param = new SqlParameter[4];
                param[0] = new SqlParameter("@fvlabel_file", SqlDbType.VarChar)
                {
                    Value = etct.sLabel
                };
                param[1] = new SqlParameter("@fvaddress_file", SqlDbType.VarChar)
                {
                    Value = etct.sURL
                };
                param[2] = new SqlParameter("@fiid_file_type", SqlDbType.Int)
                {
                    Value = etct.iTiype
                };
                param[3] = new SqlParameter("@fiid_Exchange", SqlDbType.Int)
                {
                    Value = etct.iExchange
                };
                objDB.ExecStoredIUD("sp_insertFileExchange", param);
                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
Exemple #3
0
        public errorCompositeType InsertEmployed(int iNumber, String sName, String sMotherLastName, String sFatherLasteName, String sEMail, int iIdArea, int iIdPlant, int iBoss, int iSubstitute)
        {
            errorCompositeType lstError = new errorCompositeType();

            try
            {
                param = new SqlParameter[11];

                param[0]        = new SqlParameter("@finumber_employed", SqlDbType.Int);
                param[0].Value  = iNumber;
                param[1]        = new SqlParameter("@fvname_employed", SqlDbType.VarChar);
                param[1].Value  = sName;
                param[2]        = new SqlParameter("@fvmother_last_name", SqlDbType.VarChar);
                param[2].Value  = sMotherLastName;
                param[3]        = new SqlParameter("@fvfather_last_name", SqlDbType.VarChar);
                param[3].Value  = sFatherLasteName;
                param[4]        = new SqlParameter("@fvemail_employed", SqlDbType.VarChar);
                param[4].Value  = sEMail;
                param[5]        = new SqlParameter("@fistatus_employed", SqlDbType.Int);
                param[5].Value  = 1;
                param[6]        = new SqlParameter("@fiid_area", SqlDbType.Int);
                param[6].Value  = iIdArea;
                param[7]        = new SqlParameter("@fiid_plant", SqlDbType.Int);
                param[7].Value  = iIdPlant;
                param[8]        = new SqlParameter("@fdregistry_date", SqlDbType.DateTime);
                param[8].Value  = DateTime.Now;
                param[9]        = new SqlParameter("@fiid_boss", SqlDbType.Int);
                param[9].Value  = iBoss;
                param[10]       = new SqlParameter("@fiid_substitute", SqlDbType.Int);
                param[10].Value = iSubstitute;


                objDB.ExecStoredIUD("sp_insertEmployed", param);

                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
Exemple #4
0
        public errorCompositeType DeleteTaskExchange(int iIdTaskExchange)
        {
            var lstError = new errorCompositeType();

            try
            {
                param    = new SqlParameter[1];
                param[0] = new SqlParameter("@iTaskExchange", SqlDbType.Int)
                {
                    Value = iIdTaskExchange
                };
                objDB.ExecStoredIUD("sp_deleteTaskExchange", param);
                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
Exemple #5
0
        public errorCompositeType InsertExchangeAutorization(ExchangeAutorizationCompositeType eact)
        {
            var lstError = new errorCompositeType();

            try
            {
                param    = new SqlParameter[5];
                param[0] = new SqlParameter("@fiid_Exchange", SqlDbType.Int)
                {
                    Value = eact.iIdExchange
                };
                param[1] = new SqlParameter("@fiid_review_type_eng", SqlDbType.Int)
                {
                    Value = eact.iIdReviewTypeEng
                };
                param[2] = new SqlParameter("@fvEngObservation", SqlDbType.VarChar)
                {
                    Value = eact.sEngObsevations
                };
                param[3] = new SqlParameter("@fiid_review_type_adm", SqlDbType.Int)
                {
                    Value = eact.iIdReviewTypeAdm
                };
                param[4] = new SqlParameter("@fvobservation", SqlDbType.VarChar)
                {
                    Value = eact.sObsevations
                };
                objDB.ExecStoredIUD("sp_insertExchangeAutorization", param);
                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
Exemple #6
0
        /// <summary>
        /// Inserta un Tipo de Cambio(Client) en la base de datos
        /// </summary>
        /// <param name="sDescription">La descripción</param>
        public errorCompositeType InsertClient(String sDescription)
        {
            errorCompositeType lstError = new errorCompositeType();

            try
            {
                bool bStatus = true;
                param          = new SqlParameter[2];
                param[0]       = new SqlParameter("@fvdescription_client", SqlDbType.VarChar);
                param[0].Value = sDescription;
                param[1]       = new SqlParameter("@fbstatus_client", SqlDbType.Bit);
                param[1].Value = bStatus;
                objDB.ExecStoredIUD("sp_insertClient", param);
                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
Exemple #7
0
        //#region Insert

        public errorCompositeType InsertExchangeFlA(ExchangeFlACompositeType ect)
        {
            errorCompositeType lstError = new errorCompositeType();

            try
            {
                bool bStatus = true;
                param = new SqlParameter[12];


                param[0]        = new SqlParameter("@fdDateIn", SqlDbType.DateTime);
                param[0].Value  = ect.dDateIn;
                param[1]        = new SqlParameter("@fdDatePromese", SqlDbType.DateTime);
                param[1].Value  = ect.dDatePromise;
                param[2]        = new SqlParameter("@fdDateOut", SqlDbType.DateTime);
                param[2].Value  = ect.dDateOut;
                param[3]        = new SqlParameter("@fvSOP", SqlDbType.VarChar);
                param[3].Value  = ect.SOECliente;
                param[4]        = new SqlParameter("@fiMold", SqlDbType.Int);
                param[4].Value  = ect.iMold;
                param[5]        = new SqlParameter("@fiMoldProt", SqlDbType.Int);
                param[5].Value  = ect.iMoldProt;
                param[6]        = new SqlParameter("@fiCostMa", SqlDbType.Int);
                param[6].Value  = ect.iCost;
                param[7]        = new SqlParameter("@fiDateStart", SqlDbType.Int);
                param[7].Value  = ect.iDateStart;
                param[8]        = new SqlParameter("@fiTotal", SqlDbType.Int);
                param[8].Value  = ect.iTotalInv;
                param[9]        = new SqlParameter("@fiTotalP", SqlDbType.Int);
                param[9].Value  = ect.iTotalP;
                param[10]       = new SqlParameter("@fbStatus", SqlDbType.Bit);
                param[10].Value = ect.bStatus;
                param[11]       = new SqlParameter("@fiidEPL", SqlDbType.Int);
                param[11].Value = ect.iIdPlEA;


                objDB.ExecStoredIUD("sp_insertTAAfectationExchangePartList", param);

                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
Exemple #8
0
 public void Del_RegFile(int iFile)
 {
     try
     {
         param    = new SqlParameter[1];
         param[0] = new SqlParameter("@idFile", SqlDbType.Int)
         {
             Value = iFile
         };
         objDB.ExecStoredIUD("sp_deleteFileRelease", param);
     }
     catch
     {
         throw new Exception();
     }
 }
Exemple #9
0
 public void DeleteDescription(string stp, string sParametro, int iId)
 {
     try
     {
         param    = new SqlParameter[1];
         param[0] = new SqlParameter(sParametro, SqlDbType.Int)
         {
             Value = iId
         };
         objDB.ExecStoredIUD(stp, param);
     }
     catch
     {
         throw new Exception();
     }
 }
Exemple #10
0
 public void ReviewMessages(int iUsuario, int iMessage)
 {
     try
     {
         param    = new SqlParameter[2];
         param[0] = new SqlParameter("@iMensaje", SqlDbType.Int)
         {
             Value = iMessage
         };
         param[1] = new SqlParameter("@iUsuario", SqlDbType.Int)
         {
             Value = iUsuario
         };
         objDB.ExecStoredIUD("sp_deleteMessage", param);
     }
     catch
     {
         throw new Exception();
     }
 }
Exemple #11
0
		public errorCompositeType InsertActionRol(int iIdAction, int iIdRol, Boolean bStatus)
		{
			var lstError = new errorCompositeType();
			try
			{
				param = new SqlParameter[3];
				param[0] = new SqlParameter("@fiIdAction", SqlDbType.TinyInt) { Value = iIdAction };
				param[1] = new SqlParameter("@fiRol", SqlDbType.SmallInt) { Value = iIdRol };
				param[2] = new SqlParameter("@fiStatus", SqlDbType.Bit) { Value = bStatus };
				objDB.ExecStoredIUD("sp_insertActionsxRol", param);
				lstError.bError = true;
				return lstError;
			}
			catch (Exception ex)
			{
				lstError.bError = false;
				lstError.sError = ex.Message;
				return lstError;
			}

		}
Exemple #12
0
        public errorCompositeType InsertExchange(ExchangeCompositeType ect, bool bInicial)
        {
            var lstError = new errorCompositeType();

            try
            {
                bool bStatus = true;
                param    = new SqlParameter[18];
                param[0] = new SqlParameter("@fvdescription_Exchange", SqlDbType.VarChar)
                {
                    Value = ect.sDescription
                };
                param[1] = new SqlParameter("@fvissue_Exchange", SqlDbType.VarChar)
                {
                    Value = ect.sIssue
                };
                param[2] = new SqlParameter("@fvmeasure_Exchange", SqlDbType.VarChar)
                {
                    Value = ect.sMeasure
                };
                param[3] = new SqlParameter("@fvcontact_Exchange", SqlDbType.VarChar)
                {
                    Value = ect.sContact
                };
                param[4] = new SqlParameter("@fvfolio_Exchange", SqlDbType.VarChar)
                {
                    Value = ect.sFolio
                };
                param[5] = new SqlParameter("@fvprefolio_Exchange", SqlDbType.VarChar)
                {
                    Value = ect.sFolioPre
                };
                param[6] = new SqlParameter("@fvproyect_Exchange", SqlDbType.VarChar)
                {
                    Value = ect.sProyect
                };
                param[7] = new SqlParameter("@fdlimit_date_Exchange", SqlDbType.DateTime)
                {
                    Value = ect.dLimitDate
                };
                param[8] = new SqlParameter("@fvlast_folio_Exchange", SqlDbType.VarChar)
                {
                    Value = ect.sLastFolio
                };
                param[9] = new SqlParameter("@fistatus_Exchange", SqlDbType.Int)
                {
                    Value = ect.iStatus
                };
                param[10] = new SqlParameter("@fiid_plant", SqlDbType.Int)
                {
                    Value = ect.iIdPlant
                };
                param[11] = new SqlParameter("@fiid_Exchange_type", SqlDbType.Int)
                {
                    Value = ect.iIdExchangeType
                };
                param[12] = new SqlParameter("@fiid_client", SqlDbType.Int)
                {
                    Value = ect.iIdClient
                };
                param[13] = new SqlParameter("@fvreason_Exchange", SqlDbType.VarChar)
                {
                    Value = ect.sReason
                };
                param[14] = new SqlParameter("@fiid_priority", SqlDbType.Int)
                {
                    Value = ect.iIdPriority
                };
                param[15] = new SqlParameter("@fiid_serie_proyect", SqlDbType.Int)
                {
                    Value = ect.iSerie
                };
                param[16] = new SqlParameter("@fiid_product_engeener", SqlDbType.Int)
                {
                    Value = ect.iProductEngener
                };
                param[17] = new SqlParameter("@source", SqlDbType.Bit)
                {
                    Value = bInicial
                };

                objDB.ExecStoredIUD("sp_insertExchange", param);

                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
Exemple #13
0
        public errorCompositeType AddQuote(QuoteCompositeType ect)
        {
            var lstError = new errorCompositeType();

            try
            {
                bool bStatus = true;
                param    = new SqlParameter[45];
                param[0] = new SqlParameter("@fiid_exchange", SqlDbType.Int)
                {
                    Value = ect.iExchange
                };
                param[1] = new SqlParameter("@fiid_part_list", SqlDbType.Int)
                {
                    Value = ect.iPartList
                };
                param[2] = new SqlParameter("@fvSOP", SqlDbType.VarChar)
                {
                    Value = ect.SOPCliente
                };
                param[3] = new SqlParameter("@fdIn", SqlDbType.DateTime)
                {
                    Value = ect.dIn
                };
                param[4] = new SqlParameter("@fdprom", SqlDbType.DateTime)
                {
                    Value = ect.dProm
                };
                param[5] = new SqlParameter("@fdout", SqlDbType.DateTime)
                {
                    Value = ect.dOut
                };
                param[6] = new SqlParameter("@fbmold_prot", SqlDbType.Bit)
                {
                    Value = ect.bMoldProt
                };
                param[7] = new SqlParameter("@fimold_prot", SqlDbType.Decimal)
                {
                    Value = ect.iMoldProt
                };
                param[8] = new SqlParameter("@fbmold_serie", SqlDbType.Bit)
                {
                    Value = ect.bMoldSerie
                };
                param[9] = new SqlParameter("@fimold_serie", SqlDbType.Decimal)
                {
                    Value = ect.iMoldSerie
                };
                param[10] = new SqlParameter("@fbCF", SqlDbType.Bit)
                {
                    Value = ect.bCF
                };
                param[11] = new SqlParameter("@fiCF", SqlDbType.Decimal)
                {
                    Value = ect.iCF
                };
                param[12] = new SqlParameter("@fbdevice", SqlDbType.Bit)
                {
                    Value = ect.bDevice
                };
                param[13] = new SqlParameter("@fidevice", SqlDbType.Decimal)
                {
                    Value = ect.iDevice
                };
                param[14] = new SqlParameter("@fbobsolet", SqlDbType.Bit)
                {
                    Value = ect.bObsolet
                };
                param[15] = new SqlParameter("@fiobsolet", SqlDbType.Decimal)
                {
                    Value = ect.iObsolet
                };
                param[16] = new SqlParameter("@fbeng_man", SqlDbType.Bit)
                {
                    Value = ect.bEngMan
                };
                param[17] = new SqlParameter("@fieng_man", SqlDbType.Decimal)
                {
                    Value = ect.iEngMan
                };
                param[18] = new SqlParameter("@fbdesign", SqlDbType.Bit)
                {
                    Value = ect.bDesign
                };
                param[19] = new SqlParameter("@fidesign", SqlDbType.Decimal)
                {
                    Value = ect.iDesign
                };
                param[20] = new SqlParameter("@fbcomponents", SqlDbType.Bit)
                {
                    Value = ect.bComponents
                };
                param[21] = new SqlParameter("@ficomponets", SqlDbType.Decimal)
                {
                    Value = ect.iComponents
                };
                param[22] = new SqlParameter("@fbothers", SqlDbType.Decimal)
                {
                    Value = ect.bOthers
                };
                param[23] = new SqlParameter("@fvothers", SqlDbType.VarChar)
                {
                    Value = ect.sOthers
                };
                param[24] = new SqlParameter("@fiothers", SqlDbType.Decimal)
                {
                    Value = ect.iOthers
                };
                param[25] = new SqlParameter("@fbpaint", SqlDbType.Bit)
                {
                    Value = ect.bPaint
                };
                param[26] = new SqlParameter("@fipaint", SqlDbType.Decimal)
                {
                    Value = ect.iPaint
                };
                param[27] = new SqlParameter("@fbemp", SqlDbType.Bit)
                {
                    Value = ect.bEmp
                };
                param[28] = new SqlParameter("@fiemp", SqlDbType.Decimal)
                {
                    Value = ect.iEmp
                };
                param[29] = new SqlParameter("@fbbank", SqlDbType.Bit)
                {
                    Value = ect.bBank
                };
                param[30] = new SqlParameter("@fibank", SqlDbType.Decimal)
                {
                    Value = ect.iBank
                };
                param[31] = new SqlParameter("@fbothersC", SqlDbType.Bit)
                {
                    Value = ect.bOthersC
                };
                param[32] = new SqlParameter("@fiothersC", SqlDbType.Decimal)
                {
                    Value = ect.iOthersC
                };
                param[33] = new SqlParameter("@fipound", SqlDbType.Decimal)
                {
                    Value = ect.iPound
                };
                param[34] = new SqlParameter("@fidelta1", SqlDbType.Int)
                {
                    Value = ect.iDelta1
                };
                param[35] = new SqlParameter("@fidelta2", SqlDbType.Int)
                {
                    Value = ect.iDelta2
                };
                param[36] = new SqlParameter("@ficost", SqlDbType.Decimal)
                {
                    Value = ect.iCost
                };
                param[37] = new SqlParameter("@fimold_p", SqlDbType.Int)
                {
                    Value = ect.iMoldP
                };
                param[38] = new SqlParameter("@fimold_prot_p", SqlDbType.Int)
                {
                    Value = ect.iMoldProtP
                };
                param[39] = new SqlParameter("@fvobs", SqlDbType.VarChar)
                {
                    Value = ect.sObservations
                };
                param[40] = new SqlParameter("@fistart", SqlDbType.Int)
                {
                    Value = ect.iStart
                };
                param[41] = new SqlParameter("@fir1", SqlDbType.Decimal)
                {
                    Value = ect.iFR1
                };
                param[42] = new SqlParameter("@fir2", SqlDbType.Decimal)
                {
                    Value = ect.iFR2
                };
                param[43] = new SqlParameter("@fitotal_inv", SqlDbType.Decimal)
                {
                    Value = ect.iTotalInv
                };
                param[44] = new SqlParameter("@fitotal_piece", SqlDbType.Decimal)
                {
                    Value = ect.iTotalP
                };
                objDB.ExecStoredIUD("sp_insertQuote", param);
                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }
Exemple #14
0
        public errorCompositeType InsertExchangeAffectationDocuments(affectationDocumentsCompositeType adct)
        {
            var lstError = new errorCompositeType();

            try
            {
                bool bStatus = true;
                param    = new SqlParameter[13];
                param[0] = new SqlParameter("@fiid_Exchange_affectation", SqlDbType.Int)
                {
                    Value = adct.iIdExchange
                };
                param[1] = new SqlParameter("@dibujo", SqlDbType.Bit)
                {
                    Value = adct.bDrawing
                };
                param[2] = new SqlParameter("@especificaciones", SqlDbType.Bit)
                {
                    Value = adct.bEspecifications
                };
                param[3] = new SqlParameter("@HOE", SqlDbType.Bit)
                {
                    Value = adct.bHOE
                };
                param[4] = new SqlParameter("@AMEF", SqlDbType.Bit)
                {
                    Value = adct.bAMEF
                };
                param[5] = new SqlParameter("@Costos", SqlDbType.Bit)
                {
                    Value = adct.bCost
                };
                param[6] = new SqlParameter("@SAP", SqlDbType.Bit)
                {
                    Value = adct.bSAP
                };
                param[7] = new SqlParameter("@singoff", SqlDbType.Bit)
                {
                    Value = adct.bSingOff
                };
                param[8] = new SqlParameter("@mediosproduccion", SqlDbType.Bit)
                {
                    Value = adct.bMedia
                };
                param[9] = new SqlParameter("@dispositivoverificacion", SqlDbType.Bit)
                {
                    Value = adct.bDevices
                };
                param[10] = new SqlParameter("@plancontrol", SqlDbType.Bit)
                {
                    Value = adct.bPlan
                };
                param[11] = new SqlParameter("@molde", SqlDbType.Bit)
                {
                    Value = adct.bMold
                };
                param[12] = new SqlParameter("@Otros", SqlDbType.Bit)
                {
                    Value = adct.bOthers
                };
                objDB.ExecStoredIUD("sp_insertAfectationDocuments", param);
                lstError.bError = true;
                return(lstError);
            }
            catch (Exception ex)
            {
                lstError.bError = false;
                lstError.sError = ex.Message;
                return(lstError);
            }
        }