public static WFFormularioPedidos ObtenerPedido(int _idPh) { WFFormularioPedidos Pedidos = null; SqlDataReader dr = SqlHelper.ExecuteReader(ESSeguridad.FormarStringConexion(), Queries.WF_ObtenerPedidos, _idPh); if (dr.Read()) { Pedidos = new WFFormularioPedidos(); Pedidos._userId = dr.GetInt32(0); //Pedidos._fechaIngreso = dr.GetDateTime(2); //Pedidos._fechaModificacion = dr.GetDateTime(3); Pedidos._datoXml = dr.GetString(1); Pedidos._statusId = dr.GetInt32(2); Pedidos._documentoId = dr.GetInt32(3); Pedidos._nombreClt = dr.GetString(4); Pedidos._kilosPreQ = dr.GetString(5); Pedidos._nombreSoli = dr.GetString(6); Pedidos._kilosCojin = dr.GetString(7); Pedidos._codigo = dr.GetInt32(8); Pedidos._kilosCordon = dr.GetString(9); Pedidos._fecha = dr.GetDateTime(10); Pedidos._kilosCemento = dr.GetString(11); Pedidos._contenedor = dr.GetString(12); Pedidos._kilosAlfa = dr.GetString(13); Pedidos._pesoTotal = dr.GetString(14); Pedidos._kilosPintura = dr.GetString(15); Pedidos._pedidoId = _idPh; } return(Pedidos); }
//public static List<WFFormularioPedidos> ObtenerAccionesDescripcion() //{ // List<WFFormularioPedidos> lstPedidos = new List<WFFormularioPedidos>(); // SqlDataReader dr = SqlHelper.ExecuteReader(ConfigurationManager.AppSettings[Global.CfgKeyConnString], Queries.InsertarPedidos); // while (dr.Read()) // { // WFFormularioPedidos Pedidos = new WFFormularioPedidos(); // Pedidos._userId = dr.GetInt32(0); // Pedidos._fechaIngreso = dr.GetDateTime(1); // Pedidos._fechaModificacion = dr.GetDateTime(2); // Pedidos._datoXml = dr.GetString(3); // Pedidos._statusId = dr.GetInt32(4); // lstPedidos.Add(Pedidos); // } // return lstPedidos; //} //public static List<WFFormularioPagos> InsertarPagos(List<WFFormularioPagos> lstPagos) //{ //List<WFFormularioPagos> lstPagos = new List<WFFormularioPagos>(); // WFFormularioPedidos Pagos = new WFFormularioPedidos(); // SqlDataReader dr = SqlHelper.ExecuteReader(ConfigurationManager.AppSettings[Global.CfgKeyConnString], Queries.InsertarPagos // int resultado =( // Pagos.UserId = 1; //_usuarioLogueado // Pagos.FechaIngreso = DateTime.Now; // Pagos.FechaModificacion = DateTime.Now; // Pagos.DatoXml = strData; // Pagos.StatusId = 1; //); // return resultado ; //} public static int InsertarPedidos(WFFormularioPedidos InsertarPedidos) { int nResultado = 0; try { object obj = SqlHelper.ExecuteScalar(ESSeguridad.FormarStringConexion(), Queries.WF_InsertarPedidos, InsertarPedidos.PedidoId, InsertarPedidos.UserId, InsertarPedidos.FechaIngreso, InsertarPedidos.FechaModificacion, InsertarPedidos.DatoXml, InsertarPedidos.StatusId, InsertarPedidos.DocumentoId, InsertarPedidos.NombreClt, InsertarPedidos.KilosPreQ, InsertarPedidos.NombreSoli, InsertarPedidos.KilosCojin, InsertarPedidos.Codigo, InsertarPedidos.KilosCordon, InsertarPedidos.Fecha, InsertarPedidos.KilosCemento, InsertarPedidos.Contenedor, InsertarPedidos.KilosAlfa, InsertarPedidos.PesoTotal, InsertarPedidos.KilosPintura ); if (obj != null) { nResultado = Convert.ToInt32(obj); } } catch (Exception) //ex) { //String cm = String.Empty; //EventLog.WriteEntry("Clever", "Clase Bonos: " + ex.Message, EventLogEntryType.Error, 232); } return(nResultado); }