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); } }
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); }