예제 #1
0
            public int fncAlta()
            {
                string vValores    = cUtil.fncCargaValoresSQLDefault(vTabla, "", "Id", "Empresa,NumPrep,LinPrep", cParamXml.Emp + "," + _NumPrep + ",");
                string vCampos     = cUtil.Piece(vValores, "#", 2);
                string vValoresDef = cUtil.Piece(vValores, "#", 5);

                string vSql      = "INSERT INTO " + vTabla + vCampos + " " + vValoresDef;
                int    vIdentity = 0;

                try
                {
                    vIdentity        = SQLDataAccess.GEN_ExecuteScalarIdentity(vSql, cParamXml.strConecProduc_Prueb);
                    _Id              = vIdentity;
                    _NumPrep         = 0;
                    _LinPrep         = 0;
                    _Producto        = "";
                    _Descripción     = "";
                    _Cantidad        = 0;
                    _Lote            = "";
                    _CantidadServida = 0;
                    _CanPen          = 0;
                    _FechaEntrega    = DateTime.Now;
                    _PedLocal        = "";
                    _LinPedLocal     = 0;
                    _PedCliente      = "";
                }
                catch { }

                return(vIdentity);
            }
예제 #2
0
            public int fncAlta()
            {
                int vNumSer = fncTraeIdDir(cParamXml.Emp, _CodCli);

                string vValores    = cUtil.fncCargaValoresSQLDefault(vTabla, cParamXml.strConec, "Id", "Empresa,CodCli,IdEntrega,", cParamXml.Emp + "," + _CodCli + "," + vNumSer.ToString());
                string vCampos     = cUtil.Piece(vValores, "#", 2);
                string vValoresDef = cUtil.Piece(vValores, "#", 5);

                string vSql      = "INSERT INTO " + vTabla + vCampos + " " + vValoresDef;
                int    vIdentity = 0;

                try
                {
                    vIdentity = SQLDataAccess.GEN_ExecuteScalarIdentity(vSql, cParamXml.strConec);
                    _Id       = vIdentity;
                    //_NumPed = 0;
                    //_CodCli = "";
                    _Dirección = "";
                    _Población = "";
                    _Provincia = "";
                    _CP        = "";
                }
                catch { }

                return(vIdentity);
            }
예제 #3
0
            public int fncAlta()
            {
                string vValores    = cUtil.fncCargaValoresSQLDefault(vTabla, "", "Id", "Empresa,NumPed,LinPed", cParamXml.Emp + "," + _NumPed + ",");
                string vCampos     = cUtil.Piece(vValores, "#", 2);
                string vValoresDef = cUtil.Piece(vValores, "#", 5);

                string vSql      = "INSERT INTO " + vTabla + vCampos + " " + vValoresDef;
                int    vIdentity = 0;

                try
                {
                    vIdentity          = SQLDataAccess.GEN_ExecuteScalarIdentity(vSql, cParamXml.strConecProduc_Prueb);
                    _Id                = vIdentity;
                    _NumPed            = "0";
                    _LinPed            = 0;
                    _Producto          = "";
                    _Descripción       = "";
                    _Cantidad          = 0;
                    _CantidadEntregada = 0;
                    _IVA               = 0;
                    _Precio            = 0;
                    _DTO               = 0;
                }
                catch { }

                return(vIdentity);
            }
예제 #4
0
            public int fncAlta()
            {
                string vNumSer = SQLDataAccess.GenTraeNumSerie(cParamXml.NSerPedProv, true, cParamXml.strConec);

                string vValores    = cUtil.fncCargaValoresSQLDefault(vTabla, cParamXml.strConec, "Id", "NumPed,Empresa,Estado,FechaPedido", vNumSer.ToString() + "," + cParamXml.Emp + ",P," + DateTime.Now.ToShortDateString());
                string vCampos     = cUtil.Piece(vValores, "#", 2);
                string vValoresDef = cUtil.Piece(vValores, "#", 5);

                string vSql      = "INSERT INTO " + vTabla + vCampos + " " + vValoresDef;
                int    vIdentity = 0;

                try
                {
                    vIdentity = SQLDataAccess.GEN_ExecuteScalarIdentity(vSql, cParamXml.strConec);
                    _Id       = vIdentity;
                    //_NumPed = 0;
                    _FechaPedido  = DateTime.Now;
                    _FechaEntrega = DateTime.Now;
                    _CodProv      = "";
                    _NomProv      = "";
                    _Dirección    = "";
                    _Población    = "";
                    _Provincia    = "";
                    _CP           = "";
                    _FPago        = "";
                    _Divisa       = "";
                    _SuPedido     = "";
                }
                catch { }

                return(vIdentity);
            }
예제 #5
0
            public int fncAlta()
            {
                string vValores    = cUtil.fncCargaValoresSQLDefault(vTabla, "", "Id", "Empresa,NumAlb,Linea", cParamXml.Emp + "," + _NumAlb + ",");
                string vCampos     = cUtil.Piece(vValores, "#", 2);
                string vValoresDef = cUtil.Piece(vValores, "#", 5);

                string vSql      = "INSERT INTO " + vTabla + vCampos + " " + vValoresDef;
                int    vIdentity = 0;

                try
                {
                    vIdentity        = SQLDataAccess.GEN_ExecuteScalarIdentity(vSql, cParamXml.strConecProduc_Prueb);
                    _Id              = vIdentity;
                    _NumAlb          = "0";
                    _Linea           = 0;
                    _Producto        = "";
                    _Descripción     = "";
                    _Cantidad        = 0;
                    _CodProv         = "";
                    _NombreProv      = "";
                    _Lote            = "";
                    _RecepcionadoPor = "";
                    _Grabado         = 0;
                    _NumPed          = "";
                    _Obs             = "";
                    _Cert            = "";
                    _Ubi             = "";
                    _NumSerie        = "";
                }
                catch { }

                return(vIdentity);
            }
예제 #6
0
            public int fncAlta()
            {
                string vNumSer = SQLDataAccess.GenTraeNumSerie(cParamXml.NSerAlbProv, true, cParamXml.strConec);

                string vValores    = cUtil.fncCargaValoresSQLDefault(vTabla, cParamXml.strConec, "Id", "NumAlb,Empresa,Estado,FechaAlbaran", vNumSer.ToString() + "," + cParamXml.Emp + ",P," + DateTime.Now.ToShortDateString());
                string vCampos     = cUtil.Piece(vValores, "#", 2);
                string vValoresDef = cUtil.Piece(vValores, "#", 5);

                string vSql      = "INSERT INTO " + vTabla + vCampos + " " + vValoresDef;
                int    vIdentity = 0;

                try
                {
                    vIdentity        = SQLDataAccess.GEN_ExecuteScalarIdentity(vSql, cParamXml.strConec);
                    _Id              = vIdentity;
                    _FechaAlbaran    = DateTime.Now;
                    _CodProv         = "";
                    _NombreProv      = "";
                    _RecepcionadoPor = "";
                    _NumPed          = "";
                    _SuAlbaran       = "";
                }
                catch { }

                return(vIdentity);
            }
예제 #7
0
            public int fncAlta()
            {
                string vValores    = cUtil.fncCargaValoresSQLDefault(vTabla, cParamXml.strConec, "Id", "Empresa", cParamXml.Emp.ToString());
                string vCampos     = cUtil.Piece(vValores, "#", 2);
                string vValoresDef = cUtil.Piece(vValores, "#", 5);

                string vSql      = "INSERT INTO " + vTabla + vCampos + " " + vValoresDef;
                int    vIdentity = 0;

                try
                {
                    vIdentity = SQLDataAccess.GEN_ExecuteScalarIdentity(vSql, cParamXml.strConec);
                    _Id       = vIdentity;
                }
                catch { }

                return(vIdentity);
            }
예제 #8
0
            public int fncAlta(string vNumSerie)
            {
                string vValores = cUtil.fncCargaValoresSQLDefault(vTabla, cParamXml.strConec, "Id,CantidadFab", "IdOF,Empresa,Estado,Fecha,FechaEntrega",
                                                                  vNumSerie + "," + cParamXml.Emp + ",Planificada," + DateTime.Now.ToShortDateString() + "," + DateTime.Now.ToShortDateString());
                string vCampos     = cUtil.Piece(vValores, "#", 2);
                string vValoresDef = cUtil.Piece(vValores, "#", 5);

                string vSql      = "INSERT INTO " + vTabla + vCampos + " " + vValoresDef;
                int    vIdentity = 0;

                try
                {
                    vIdentity = SQLDataAccess.GEN_ExecuteScalarIdentity(vSql, cParamXml.strConec);
                    _Id       = vIdentity;
                }
                catch { }

                return(vIdentity);
            }
예제 #9
0
            public int fncAlta()
            {
                string vValores    = cUtil.fncCargaValoresSQLDefault(vTabla, "", "Id", "Empresa,Producto,Lote", cParamXml.Emp + "," + _Producto + "," + _Lote);
                string vCampos     = cUtil.Piece(vValores, "#", 2);
                string vValoresDef = cUtil.Piece(vValores, "#", 5);

                string vSql      = "INSERT INTO " + vTabla + vCampos + " " + vValoresDef;
                int    vIdentity = 0;

                try
                {
                    vIdentity = SQLDataAccess.GEN_ExecuteScalarIdentity(vSql, cParamXml.strConecProduc_Prueb);
                    _Id       = vIdentity;
                    _Producto = "";
                    _Lote     = "";
                    _Cert     = "";
                }
                catch { }

                return(vIdentity);
            }
예제 #10
0
            public int fncAlta()
            {
                //int vNumSer = cUtil.fncTraeNumSerIntDbf("claves", "NPEDCLI", true, cParamXml.strOleDBConecDbf);
                string vNumSerie = SQLDataAccess.GenTraeNumSerie(cParamXml.NSerPrep, true, cParamXml.strConec);
                int    vNumSer   = Convert.ToInt32(vNumSerie);


                string vValores    = cUtil.fncCargaValoresSQLDefault(vTabla, cParamXml.strConec, "Id,Estado", "NumPrep,Empresa,FechaPrep", vNumSer.ToString() + "," + cParamXml.Emp + "," + DateTime.Now.ToShortDateString());
                string vCampos     = cUtil.Piece(vValores, "#", 2);
                string vValoresDef = cUtil.Piece(vValores, "#", 5);

                string vSql      = "INSERT INTO " + vTabla + vCampos + " " + vValoresDef;
                int    vIdentity = 0;

                try
                {
                    vIdentity = SQLDataAccess.GEN_ExecuteScalarIdentity(vSql, cParamXml.strConec);
                    _Id       = vIdentity;
                    _Estado   = "P";
                    //_NumPed = 0;
                    _FechaPrep    = DateTime.Now;
                    _FechaEntrega = DateTime.Now;
                    _CodCli       = "";
                    _NomCli       = "";
                    _Dirección    = "";
                    _Población    = "";
                    _Provincia    = "";
                    _CP           = "";
                    _FPago        = "";
                    _Divisa       = "";
                    _SuPedido     = "";
                    _DtoPP        = 0;
                    _DtoESP       = 0;
                }
                catch { }

                return(vIdentity);
            }