コード例 #1
0
ファイル: FacturasVenta.cs プロジェクト: pjvasquezp/Inter-ICG
 public FacturasVenta(ListaDocVentas ObjListaDoc, DAConnectionSQL ObjDAConnecion, UserSistemas oUserSistemas)
 {
     oUserSistemasLog  = oUserSistemas;
     ObjListaDocVentas = ObjListaDoc;
     ObjDaConnexion    = ObjDAConnecion;
     InitializeComponent();
     this.Text = this.Text + " USER .: " + oUserSistemasLog.NOMVENDEDOR + " :.";
 }
コード例 #2
0
ファイル: ProcesosDB.cs プロジェクト: pjvasquezp/Inter-ICG
        public ListaDocVentas GetDocVentas(DAConnectionSQL ObjDaConnexion, ProductoXCB ObjProducto, Int32 Cod_Cli, int TipoFecha)
        {
            ListaDocVentas ObjListaDocVentas = new ListaDocVentas();

            string StrinSQL = "";
            //var ConClass = new DAConnectionSQL();

            SqlCommand cmd = new SqlCommand();

            cmd.CommandType = CommandType.Text;
            cmd.Connection  = ObjDaConnexion.Con;

            StrinSQL = "exec[SP_GET_DocumentoData]";
            StrinSQL = StrinSQL + " '" + ObjProducto.Referencia + "', '" + ObjProducto.Color + "',";
            StrinSQL = StrinSQL + " '" + ObjProducto.Talla + "', '" + Cod_Cli + "', " + TipoFecha + "";


            cmd.CommandText = StrinSQL;

            if (ObjDaConnexion.Con.State == ConnectionState.Closed)
            {
                ObjDaConnexion.Open();
            }


            SqlDataReader dr = cmd.ExecuteReader();

            try
            {
                while (dr.Read())
                {
                    DocVentas ObjDocVentas = new DocVentas();

                    var withBlock = ObjDocVentas;
                    withBlock.FechaDoc       = dr.GetDateTime(0).ToString();
                    withBlock.Serie          = dr.GetString(1);
                    withBlock.Numero         = dr.GetInt32(2);
                    withBlock.TotalDocumento = dr.GetDouble(3);
                    withBlock.DiasFac        = dr.GetInt32(4);



                    ObjListaDocVentas.Add(ObjDocVentas);
                }
                dr.Close();
            }
            catch (Exception)
            {
                dr.Close();
            }


            return(ObjListaDocVentas);
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: pjvasquezp/Inter-ICG
        private void Btn_aceptar_Click(object sender, EventArgs e)
        {
            ListaDocVentas ObjListaDocVentas = ObjProcDB.GetDocVentas(ObjDaConnexion, ObjProductoxCB, CodCLiente, TipoFecha);

            if (cmb_fechainicio.Text == "Seleccione ---")
            {
                TipoFecha = 30;
            }

            FacturasVenta v1 = new FacturasVenta(ObjListaDocVentas, ObjDaConnexion, oUserSistemasLog);

            this.Hide();
            v1.ShowDialog();
            this.Show();
        }