Ejemplo n.º 1
0
        private void Get_Load()
        {
            var obral = new BRWarehouse();
            var obrmo = new BRReason();
            var olsal = obral.Get_PSGN_SPLS_SVMC_ALMA(xfMain.SgIns.SESSION_COMP);
            var olsmo = obrmo.Get_PSGN_SPLS_SVMC_MOTI(xfMain.SgIns.SESSION_COMP);

            lkeCOD_ALMA.Properties.DataSource = olsal;
            lkeCOD_ALMA.Properties.Columns.Clear();
            var lkci = new LookUpColumnInfo("ALF_ALMA", "Almacén", 20);
            lkeCOD_ALMA.Properties.Columns.Add(lkci);
            lkeCOD_ALMA.Properties.DisplayMember = "ALF_ALMA";
            lkeCOD_ALMA.Properties.ValueMember = "COD_ALMA";

            lkeCOD_MOTI.Properties.DataSource = olsmo;
            lkeCOD_MOTI.Properties.Columns.Clear();
            lkci = new LookUpColumnInfo("ALF_MOTI", "Motivo", 20);
            lkeCOD_MOTI.Properties.Columns.Add(lkci);
            lkeCOD_MOTI.Properties.DisplayMember = "ALF_MOTI";
            lkeCOD_MOTI.Properties.ValueMember = "COD_MOTI";
        }
Ejemplo n.º 2
0
        /// <summary>
        /// EVENTO LOAD DEL FORMULARIO
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void xfSalesCreditNote_Load(object sender, EventArgs e)
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;
            SESSION_IMPU = ((xfMain)MdiParent).SESSION_IMPU;
            SESSION_PORC_IMPU = ((xfMain)MdiParent).SESSION_PORC_IMPU;
            lblALF_IMPU.Text = SESSION_IMPU;

            var obral = new BRWarehouse();
            var olsal = obral.Get_PSGN_SPLS_SVMC_ALMA(SESSION_COMP);

            lueCOD_ALMA.Properties.DataSource = olsal;
            lueCOD_ALMA.Properties.Columns.Clear();
            var lkci = new LookUpColumnInfo("ALF_ALMA", "Almacén", 20);
            lueCOD_ALMA.Properties.Columns.Add(lkci);
            lueCOD_ALMA.Properties.DisplayMember = "ALF_ALMA";
            lueCOD_ALMA.Properties.ValueMember = "COD_ALMA";
            //MONEDAS
            var oBeMo = new BESVMC_MONE();
            var oBrMo = new BRSVMC_MONE();

            oBeMo.NUM_ACCI = 4;
            oBeMo.COD_COMP = SESSION_COMP;
            var oListMo = oBrMo.Get_SVPR_MONE_LIST(oBeMo);

            lueCOD_MONE.Properties.DataSource = oListMo;
            lueCOD_MONE.Properties.Columns.Clear();
            lueCOD_MONE.Properties.Columns.Add(new LookUpColumnInfo("ALF_MONE", 100, "Moneda"));
            lueCOD_MONE.Properties.DisplayMember = "ALF_MONE";
            lueCOD_MONE.Properties.ValueMember = "COD_MONE";

            gdcArticles.DataSource = oListArti;
            gdcArticlesCompleted.DataSource = oListArtiCompleted;
            gdcArticlesGroup.DataSource = oListArtiGroup;
            gdcGroups.DataSource = oListGroup;

            StateControl(true);
        }
Ejemplo n.º 3
0
        private void Get_Load()
        {
            stcControl.AppearanceReadOnly.BackColor = Color.FromArgb(255, 227, 239, 255);

            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;

            InitializeCopy();

            dteFEC_REGI.EditValue = DateTime.Now;
            dteFEC_DOCU.EditValue = DateTime.Now;
            dteFEC_ENTR.EditValue = DateTime.Now;

            var obr = new BRPurchase();
            var olcp = obr.Get_PSGN_SPLS_SVMC_COND_PAGO(SESSION_COMP);
            var olmo = obr.Get_PSGN_SPLS_SVMC_MONE(SESSION_COMP);

            lkeCOD_COND_PAGO.Properties.DataSource = olcp;
            lkeCOD_COND_PAGO.Properties.Columns.Clear();
            var lkci = new LookUpColumnInfo("ALF_COND_PAGO", "Condición de Pago", 20);
            lkeCOD_COND_PAGO.Properties.Columns.Add(lkci);
            lkeCOD_COND_PAGO.Properties.DisplayMember = "ALF_COND_PAGO";
            lkeCOD_COND_PAGO.Properties.ValueMember = "COD_COND_PAGO";

            lkeCOD_MONE.Properties.DataSource = olmo;
            lkeCOD_MONE.Properties.Columns.Clear();
            lkci = new LookUpColumnInfo("ALF_MONE", "Moneda", 20);
            lkeCOD_MONE.Properties.Columns.Add(lkci);
            lkeCOD_MONE.Properties.DisplayMember = "ALF_MONE";
            lkeCOD_MONE.Properties.ValueMember = "COD_MONE";
            lkeCOD_MONE.ItemIndex = 0;

            var olstt = new List<BEStatus>();
            olstt.Add(new BEStatus() { COD_ESTA = "AB", ALF_ESTA = "Abierto" });
            olstt.Add(new BEStatus() { COD_ESTA = "CE", ALF_ESTA = "Cerrado" });
            olstt.Add(new BEStatus() { COD_ESTA = "AN", ALF_ESTA = "Anulado" });
            lkeIND_ESTA.Properties.DataSource = olstt;
            lkeIND_ESTA.Properties.Columns.Clear();
            lkci = new LookUpColumnInfo("ALF_ESTA", "Estado", 20);
            lkeIND_ESTA.Properties.Columns.Add(lkci);
            lkeIND_ESTA.Properties.DisplayMember = "ALF_ESTA";
            lkeIND_ESTA.Properties.ValueMember = "COD_ESTA";
            lkeIND_ESTA.ItemIndex = 0;

            var obral = new BRWarehouse();
            var olsal = obral.Get_PSGN_SPLS_SVMC_ALMA(SESSION_COMP);

            lkeCOD_ALMA.Properties.DataSource = olsal;
            lkeCOD_ALMA.Properties.Columns.Clear();
            lkci = new LookUpColumnInfo("ALF_ALMA", "Almacén", 20);
            lkeCOD_ALMA.Properties.Columns.Add(lkci);
            lkeCOD_ALMA.Properties.DisplayMember = "ALF_ALMA";
            lkeCOD_ALMA.Properties.ValueMember = "COD_ALMA";

            gdcLines.DataSource = new List<BEDocumentLines>();
            SetChangeMaskMoney(0);
            StateControls(true);
            if (docb != null)
                Set_DocumentBase();
        }
Ejemplo n.º 4
0
        public void Save()
        {
            try
            {
                if (string.IsNullOrEmpty(txtALF_ALMA.Text))
                    throw new ArgumentException("Ingrese el nombre para el almacén");
                if (lueCOD_SOCI_NEGO_ENCA.EditValue == null)
                    throw new ArgumentException("Seleccione el encargado");

                var oBe = new BEWarehouse();
                var oBr = new BRWarehouse();

                if (!string.IsNullOrEmpty(txtCOD_ALMA.Text))
                {
                    oBe.NUM_ACCI = 2;
                    oBe.COD_ALMA = Convert.ToInt32(txtCOD_ALMA.Text);
                }
                else
                {
                    oBe.NUM_ACCI = 1;
                }

                oBe.ALF_ALMA = txtALF_ALMA.Text;
                oBe.ALF_DESC = meALF_DESC.Text;
                oBe.COD_SOCI_NEGO_ENCA = Convert.ToInt32(lueCOD_SOCI_NEGO_ENCA.EditValue);
                oBe.COD_COMP = SESSION_COMP;
                oBe.COD_USUA_CREA = SESSION_USER;
                oBe.COD_USUA_MODI = SESSION_USER;

                oBr.Set_SVPR_ALMA(oBe);

                var oBeU = new BEWarehouse();
                var oBrU = new BRWarehouse();

                oBeU.COD_COMP = SESSION_COMP;
                oBeU.NUM_ACCI = 4;

                var oListWarehouse = oBrU.Get_SVPR_ALMA_LIST(oBeU);

                gdcWarehouse.DataSource = oListWarehouse;

                StateControl(true);

                XtraMessageBox.Show("Operacion realizada con exito!!!!", "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 5
0
        private void xfKardexInventory_Load(object sender, EventArgs e)
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;

            var obral = new BRWarehouse();
            var olsal = obral.Get_PSGN_SPLS_SVMC_ALMA(SESSION_COMP);
            ccbCOD_ALMA.Properties.DataSource = olsal;
            ccbCOD_ALMA.Properties.DisplayMember = "ALF_ALMA";
            ccbCOD_ALMA.Properties.ValueMember = "COD_ALMA";

            gdcKardex.DataSource = new List<BEKardexInventory>();
        }
Ejemplo n.º 6
0
        private void xfWarehouseMaster_Load(object sender, EventArgs e)
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;

            var oBe = new BESVMC_SOCI_NEGO();
            var oBr = new BRSVMC_SOCI_NEGO();

            oBe.NUM_ACCI = 7;
            oBe.COD_COMP = SESSION_COMP;
            var oList = oBr.Get_SVPR_SOCI_NEGO_LIST(oBe);

            lueCOD_SOCI_NEGO_ENCA.Properties.DataSource = oList;
            lueCOD_SOCI_NEGO_ENCA.Properties.Columns.Clear();
            lueCOD_SOCI_NEGO_ENCA.Properties.Columns.Add(new LookUpColumnInfo("ALF_NOMB", 100, "Empleados"));
            lueCOD_SOCI_NEGO_ENCA.Properties.DisplayMember = "ALF_NOMB";
            lueCOD_SOCI_NEGO_ENCA.Properties.ValueMember = "COD_SOCI_NEGO";

            var oBeU = new BEWarehouse();
            var oBrU = new BRWarehouse();

            oBeU.COD_COMP = SESSION_COMP;
            oBeU.NUM_ACCI = 4;

            var oListWarehouse = oBrU.Get_SVPR_ALMA_LIST(oBeU);

            gdcWarehouse.DataSource = oListWarehouse;

            StateControl(true);
        }
Ejemplo n.º 7
0
        private void Set_Save()
        {
            MessageBoxIcon msgIcon = MessageBoxIcon.Warning;
            try
            {
                gdvGeneric.CloseEditor();
                gdvGeneric.RefreshData();
                var olst = (List<BEWarehouse>)gdvGeneric.DataSource;
                var i = 1;
                olst.ForEach(item =>
                {
                    var context = new ValidationContext(item, null, null);
                    var errors = new List<ValidationResult>();
                    if (!Validator.TryValidateObject(item, context, errors, true))
                    {
                        foreach (ValidationResult result in errors)
                        {
                            msgIcon = MessageBoxIcon.Warning;
                            throw new ArgumentException(string.Format("{0}\nFila: {1}", result.ErrorMessage, i));
                        }
                    }
                    i++;
                });

                var obr = new BRWarehouse();
                var obej = new BEWarehouse();
                olst.ForEach(item => item.COD_COMP = SESSION_COMP);
                obr.Set_PSGN_SPMT_SVMC_ALMA(obej, olst);
                if (!string.IsNullOrWhiteSpace(obej.MSG_MNTN))
                {
                    msgIcon = MessageBoxIcon.Error;
                    throw new ArgumentException(obej.MSG_MNTN);
                }

                olst.RemoveAll(item => item.IND_MNTN == 3);
                olst.ForEach(item => item.IND_MNTN = 0);
                gdvGeneric.RefreshData();
                XtraMessageBox.Show(WhMessage.MsgSuccessfully, WhMessage.MsgInsCaption,
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message,
                                    WhMessage.MsgInsCaption,
                                    MessageBoxButtons.OK,
                                    msgIcon);
            }
        }
Ejemplo n.º 8
0
        private void Get_Load()
        {
            var obr = new BRWarehouse();
            var olen = obr.Get_PSGN_SPLS_SVMC_SOCI_NEGO(SESSION_COMP);
            rilCOD_SOCI_NEGO_ENCA.DataSource = olen;
            rilCOD_SOCI_NEGO_ENCA.Columns.Clear();
            var lkci = new LookUpColumnInfo("ALF_NOMB", "Encargados", 20);
            rilCOD_SOCI_NEGO_ENCA.Columns.Add(lkci);
            rilCOD_SOCI_NEGO_ENCA.DisplayMember = "ALF_NOMB";
            rilCOD_SOCI_NEGO_ENCA.ValueMember = "COD_SOCI_NEGO";

            var olst = obr.Get_PSGN_SPLS_SVMC_ALMA(SESSION_COMP);
            if (olst.Count == 0)
            {
                var obj = new BEWarehouse() { IND_MNTN = 1, COD_USUA_CREA = SESSION_USER };
                olst.Add(obj);
            }
            gdcGeneric.DataSource = olst;

            BeginInvoke(new MethodInvoker(() =>
            {
                gdvGeneric.MoveLast();
                gdvGeneric.FocusedColumn = gdvGeneric.VisibleColumns[1];
                gdvGeneric.ShowEditor();
            }));
        }
Ejemplo n.º 9
0
        private void Get_Load()
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;

            var obral = new BRWarehouse();
            var oBeM = new BEReason();
            oBeM.COD_COMP = SESSION_COMP;
            oBeM.COD_TIPO_MOTI = 2;
            oBeM.NUM_ACCI = 4;
            var obrmo = new BRSVMC_MOTI();

            var olsal = obral.Get_PSGN_SPLS_SVMC_ALMA(SESSION_COMP);
            var olsre = obral.Get_PSGN_SPLS_SVMC_SOCI_NEGO(SESSION_COMP);
            var olsmo = obrmo.Get_SVPR_MOTI_LIST(oBeM);

            lkeCOD_ALMA.Properties.DataSource = olsal;
            lkeCOD_ALMA.Properties.Columns.Clear();
            var lkci = new LookUpColumnInfo("ALF_ALMA", "Almacén", 20);
            lkeCOD_ALMA.Properties.Columns.Add(lkci);
            lkeCOD_ALMA.Properties.DisplayMember = "ALF_ALMA";
            lkeCOD_ALMA.Properties.ValueMember = "COD_ALMA";

            lkeCOD_SOCI_NEGO_RESP.Properties.DataSource = olsre;
            lkeCOD_SOCI_NEGO_RESP.Properties.Columns.Clear();
            lkci = new LookUpColumnInfo("ALF_NOMB", "Responsable", 20);
            lkeCOD_SOCI_NEGO_RESP.Properties.Columns.Add(lkci);
            lkeCOD_SOCI_NEGO_RESP.Properties.DisplayMember = "ALF_NOMB";
            lkeCOD_SOCI_NEGO_RESP.Properties.ValueMember = "COD_SOCI_NEGO";

            lkeCOD_MOTI.Properties.DataSource = olsmo;
            lkeCOD_MOTI.Properties.Columns.Clear();
            lkci = new LookUpColumnInfo("ALF_MOTI", "Motivo", 20);
            lkeCOD_MOTI.Properties.Columns.Add(lkci);
            lkeCOD_MOTI.Properties.DisplayMember = "ALF_MOTI";
            lkeCOD_MOTI.Properties.ValueMember = "COD_MOTI";

            var obj = new BEOutputGoodsDetail() { COD_USUA_CREA = SESSION_USER };
            var olst = new List<BEOutputGoodsDetail>();
            olst.Add(obj);
            gdcDetail.DataSource = olst;
        }
Ejemplo n.º 10
0
        private void Get_Load()
        {
            SESSION_USER = ((xfMain)MdiParent).SESSION_USER;
            SESSION_PERF = ((xfMain)MdiParent).SESSION_PERF;
            SESSION_COMP = ((xfMain)MdiParent).SESSION_COMP;

            var obral = new BRWarehouse();
            var obrmo = new BRReason();
            var olsal = obral.Get_PSGN_SPLS_SVMC_ALMA(SESSION_COMP);
            var olsre = obral.Get_PSGN_SPLS_SVMC_SOCI_NEGO(SESSION_COMP);
            var olsmo = obrmo.Get_PSGN_SPLS_SVMC_MOTI(SESSION_COMP);

            lkeCOD_ALMA.Properties.DataSource = olsal;
            lkeCOD_ALMA.Properties.Columns.Clear();
            var lkci = new LookUpColumnInfo("ALF_ALMA", "Almacén Origen", 20);
            lkeCOD_ALMA.Properties.Columns.Add(lkci);
            lkeCOD_ALMA.Properties.DisplayMember = "ALF_ALMA";
            lkeCOD_ALMA.Properties.ValueMember = "COD_ALMA";

            lkeCOD_SOCI_NEGO_RESP.Properties.DataSource = olsre;
            lkeCOD_SOCI_NEGO_RESP.Properties.Columns.Clear();
            lkci = new LookUpColumnInfo("ALF_NOMB", "Responsable", 20);
            lkeCOD_SOCI_NEGO_RESP.Properties.Columns.Add(lkci);
            lkeCOD_SOCI_NEGO_RESP.Properties.DisplayMember = "ALF_NOMB";
            lkeCOD_SOCI_NEGO_RESP.Properties.ValueMember = "COD_SOCI_NEGO";

            lkeCOD_ALMA_DEST.Properties.DataSource = olsal;
            lkeCOD_ALMA_DEST.Properties.Columns.Clear();
            lkci = new LookUpColumnInfo("ALF_ALMA", "Almacén Destino", 20);
            lkeCOD_ALMA_DEST.Properties.Columns.Add(lkci);
            lkeCOD_ALMA_DEST.Properties.DisplayMember = "ALF_ALMA";
            lkeCOD_ALMA_DEST.Properties.ValueMember = "COD_ALMA";

            lkeCOD_SOCI_NEGO_RESP_DEST.Properties.DataSource = olsre;
            lkeCOD_SOCI_NEGO_RESP_DEST.Properties.Columns.Clear();
            lkci = new LookUpColumnInfo("ALF_NOMB", "Responsable", 20);
            lkeCOD_SOCI_NEGO_RESP_DEST.Properties.Columns.Add(lkci);
            lkeCOD_SOCI_NEGO_RESP_DEST.Properties.DisplayMember = "ALF_NOMB";
            lkeCOD_SOCI_NEGO_RESP_DEST.Properties.ValueMember = "COD_SOCI_NEGO";

            lkeCOD_MOTI.Properties.DataSource = olsmo;
            lkeCOD_MOTI.Properties.Columns.Clear();
            lkci = new LookUpColumnInfo("ALF_MOTI", "Motivo", 20);
            lkeCOD_MOTI.Properties.Columns.Add(lkci);
            lkeCOD_MOTI.Properties.DisplayMember = "ALF_MOTI";
            lkeCOD_MOTI.Properties.ValueMember = "COD_MOTI";

            var obj = new BETransferGoodsDetail() { COD_USUA_CREA = SESSION_USER };
            var olst = new List<BETransferGoodsDetail>();
            olst.Add(obj);
            gdcDetail.DataSource = olst;
        }