示例#1
0
 private void UIGRIDVIEW_DETA_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
 {
     if (e.Column.Name.Equals(colID_ARTICULO.Name))
     {
         FAC_DETA_LISTA_PRECIO precio = (from u in _datasistema.ContextoVentas.FAC_DETA_LISTA_PRECIO where u.ID_ARTICULO == int.Parse(e.Value.ToString()) select u).First();
         UIGRIDVIEW_DETA.SetRowCellValue(e.RowHandle, colNM_PRECIO, precio.NM_PRECIO);
     }
 }
示例#2
0
        private void UIGRIDVIEW_ARTICULOS_DoubleClick(object sender, EventArgs e)
        {
            V_INV_ARTICULO        arti     = (V_INV_ARTICULO )UIGRIDVIEW_ARTICULOS.GetFocusedRow();
            FAC_DETA_LISTA_PRECIO artilist = new FAC_DETA_LISTA_PRECIO
            {
                ID_ARTICULO = arti.ID,
                NM_PRECIO   = 0,
                ID_LISTA    = int.Parse(UIID.Text)
            };

            insertarDetalle(artilist);
        }
示例#3
0
        private void UIGRIDVIEW_DETALIST_RowUpdated(object sender, DevExpress.XtraGrid.Views.Base.RowObjectEventArgs e)
        {
            V_FAC_DETA_LISTA_PRECIO arti     = (V_FAC_DETA_LISTA_PRECIO)e.Row;
            FAC_DETA_LISTA_PRECIO   artilist = new FAC_DETA_LISTA_PRECIO
            {
                ID_ARTICULO = arti.ID,
                NM_PRECIO   = arti.NM_PRECIO,
                ID_LISTA    = int.Parse(UIID.Text),
                ID          = arti.ID
            };

            modificarDetalle(artilist);
        }
示例#4
0
        private void UIGRIDVIEW_DETALIST_DoubleClick(object sender, EventArgs e)
        {
            V_FAC_DETA_LISTA_PRECIO arti     = (V_FAC_DETA_LISTA_PRECIO)UIGRIDVIEW_DETALIST.GetFocusedRow();
            FAC_DETA_LISTA_PRECIO   artilist = new FAC_DETA_LISTA_PRECIO
            {
                ID_ARTICULO = arti.ID,
                NM_PRECIO   = arti.NM_PRECIO,
                ID_LISTA    = int.Parse(UIID.Text),
                ID          = arti.ID
            };

            eliminarDetalle(artilist);
        }
示例#5
0
 public void insertarDetalle(FAC_DETA_LISTA_PRECIO d)
 {
     try
     {
         _datasistema.conectarVentas();
         _datasistema.ContextoVentas.FAC_DETA_LISTA_PRECIO.InsertOnSubmit(d);
         _datasistema.ContextoVentas.SubmitChanges();
         consultarDetalle();
     }
     catch (Exception ex)
     {
         consultarDetalle();
         MetodosForm.mensajeErrorDefault(ex.Message, _datasistema);
     }
 }
示例#6
0
 public void eliminarDetalle(FAC_DETA_LISTA_PRECIO d)
 {
     try
     {
         _datasistema.conectarVentas();
         FAC_DETA_LISTA_PRECIO tupla = (from u in _datasistema.ContextoVentas.FAC_DETA_LISTA_PRECIO where u.ID == d.ID select u).First();
         _datasistema.ContextoVentas.FAC_DETA_LISTA_PRECIO.DeleteOnSubmit(tupla);
         _datasistema.ContextoVentas.SubmitChanges();
         consultarDetalle();
     }
     catch (Exception ex)
     {
         consultarDetalle();
         MetodosForm.mensajeErrorDefault(ex.Message, _datasistema);
     }
 }