/// <summary> /// OBTENER EL RESULTADO DE CUALQUIER CONSULTA /// </summary> /// <param name="oBe"></param> /// <returns></returns> public List<BESVTD_COTI_GROU> Get_SVPR_COTI_GROU_LIST(BESVTD_COTI_GROU oBe) { try { using (IDataReader oDr = oDa.Get_SVPR_COTI_GROU_LIST(oBe)) { List<BESVTD_COTI_GROU> oList = new List<BESVTD_COTI_GROU>(); IList iList = oList; ((IList)iList).LoadFromReader<BESVTD_COTI_GROU>(oDr); Dispose(false); return (oList); } } catch (Exception ex) { throw new ArgumentException(ex.Message); } }
/// <summary> /// INVOCAR EL CUADRO DE BUSQUEDA PARA LA NOTA DE CREDITO /// </summary> public void SearchSalesCreditNote() { ClearControl(); using (var oForm = new xfSearchQuote(5, SESSION_COMP)) { if (oForm.ShowDialog() == DialogResult.OK) { LoadBranch(oForm.oBe.COD_SOCI_NEGO); txtCOD_SOCI_NEGO.Text = oForm.oBe.COD_SOCI_NEGO.ToString(); beALF_NOMB.Text = oForm.oBe.ALF_NOMB; txtALF_DIRE_FISC.Text = oForm.oBe.ALF_DIRE; txtALF_TELE.Text = ""; txtALF_FAXX.Text = ""; txtALF_CONT.Text = oForm.oBe.ALF_CONT; lueCOD_SUCU.EditValue = oForm.oBe.COD_SUCU; txtNUM_DESC.Text = oForm.oBe.NUM_DESC.ToString("#,##0.00"); txtALF_NUME_FACT.Text = oForm.oBe.ALF_NUME_DOCU; beALF_GUIA_REMI_STOR.Text = oForm.oBe.ALF_NUME_DOCU; COD_DVEN = oForm.oBe.COD_DVEN; txtNUM_NCRE.Text = oForm.oBe.COD_NCRE.ToString(); deFEC_REGI.EditValue = oForm.oBe.FEC_REGI; deFEC_DOCU.EditValue = oForm.oBe.FEC_DOCU; deFEC_VENC.EditValue = oForm.oBe.FEC_PAGO; txtALF_ESTA.Text = oForm.oBe.ALF_ESTA; lueCOD_MONE.EditValue = oForm.oBe.COD_MONE; lueALF_SERI.EditValue = oForm.oBe.ALF_SERI; txtNUM_CORR.Text = oForm.oBe.NUM_CORR.ToString("0000000"); lueCOD_ALMA.EditValue = oForm.oBe.COD_ALMA; txtALF_NUME_IDEN.Text = oForm.oBe.ALF_NUME_IDEN; chkIGV.Checked = oForm.oBe.IND_IMPU; chkIND_LIQU.Checked = oForm.oBe.IND_LIQU; meALF_OBSE.Text = oForm.oBe.ALF_OBSE; lblALF_SONN.Text = oForm.oBe.ALF_TOTA; txtNUM_SUBT.Text = oForm.oBe.NUM_SUBT.ToString("#,##0.00"); txtNUM_IGVV.Text = oForm.oBe.NUM_IGVV.ToString("#,##0.00"); txtNUM_TOTA.Text = oForm.oBe.NUM_TOTA.ToString("#,##0.00"); var oBeSu = new BESVMD_SOCI_NEGO_SUCU(); var oBrSu = new BRSVMD_SOCI_NEGO_SUCU(); oBeSu.NUM_ACCI = 5; oBeSu.COD_SOCI_NEGO = oForm.oBe.COD_SOCI_NEGO; var oListTC = oBrSu.Get_SVPR_SOCI_NEGO_SUCU_LIST(oBeSu); lueCOD_SUCU.Properties.DataSource = oListTC; lueCOD_SUCU.Properties.Columns.Clear(); lueCOD_SUCU.Properties.Columns.Add(new LookUpColumnInfo("ALF_SUCU", 100, "Sucursal")); lueCOD_SUCU.Properties.DisplayMember = "ALF_SUCU"; lueCOD_SUCU.Properties.ValueMember = "COD_SOCI_NEGO_SUCU"; lueCOD_SUCU.EditValue = oForm.oBe.COD_SUCU; var oBe = new BESVTD_COTI(); var oBr = new BRSVTD_COTI(); oBe.COD_COTI = oForm.oBe.COD_DVEN; oBe.NUM_ACCI = 5; oBe.COD_TIPO_DOCU = 4; var oList = oBr.Get_SVPR_COTI_DETA_LIST(oBe); oList.ForEach(obj => { oListArti.Add(obj); }); gdvArticles.RefreshData(); var oBeG = new BESVTD_COTI_GROU(); var oBrG = new BRSVTD_COTI_GROU(); oBeG.COD_COTI = oForm.oBe.COD_DVEN; oBeG.NUM_ACCI = 5; oBeG.COD_TIPO_DOCU = 4; var oListG = oBrG.Get_SVPR_COTI_GROU_LIST(oBeG); oListG.ForEach(obj => { oListGroup.Add(obj); }); gdvGroups.RefreshData(); var oBeDG = new BESVTD_COTI(); var oBrDG = new BRSVTD_COTI_GROU_DETA(); oBeDG.COD_COTI = oForm.oBe.COD_DVEN; oBeDG.NUM_ACCI = 5; oBeDG.COD_TIPO_DOCU = 4; var oListDG = oBrDG.Get_SVPR_COTI_GROU_DETA_LIST(oBeDG); oListDG.ForEach(obj => { oListArtiGroup.Add(obj); }); ListArticleCompletedUpdate(); gdvArticlesCompleted.RefreshData(); gdvArticlesGroup.RefreshData(); } } }
/// <summary> /// PRESENTAR LA ORDEN DE VENTA CON LA INFORMACION PROVENIENTE DE LA COTIZACION /// </summary> /// <param name="COD_COTI"></param> public void SearchInvoice(int COD_DVENp) { ClearControl(); StateControl(false); beALF_NOMB.Enabled = false; lueCOD_SUCU.Properties.ReadOnly = true; lueCOD_MONE.Properties.ReadOnly = true; lueCOD_ALMA.Properties.ReadOnly = true; txtNUM_DESC.Properties.ReadOnly = true; gcaNUM_CANT.OptionsColumn.AllowEdit = false; gcaNUM_CANT.OptionsColumn.AllowFocus = false; gcaNUM_CANT.OptionsColumn.ReadOnly = true; var oBe = new BESVTC_COTI(); var oBr = new BRSVTC_COTI(); oBe.ALF_NUME_IDEN = COD_DVENp.ToString(); oBe.COD_TIPO_DOCU = 4; oBe.COD_COMP = SESSION_COMP; oBe.NUM_ACCI = 9; var oListDV = oBr.Get_SVPR_COTI_BUSC(oBe); LoadBranch(oListDV[0].COD_SOCI_NEGO); txtCOD_SOCI_NEGO.Text = oListDV[0].COD_SOCI_NEGO.ToString(); beALF_NOMB.Text = oListDV[0].ALF_NOMB; txtALF_DIRE_FISC.Text = oListDV[0].ALF_DIRE; txtALF_TELE.Text = ""; txtALF_FAXX.Text = ""; txtALF_CONT.Text = oListDV[0].ALF_CONT; lueCOD_SUCU.EditValue = oListDV[0].COD_SUCU; txtNUM_DESC.Text = oListDV[0].NUM_DESC.ToString("#,##0.00"); txtALF_NUME_FACT.Text = oListDV[0].ALF_NUME_SUNA; beALF_GUIA_REMI_STOR.Text = oListDV[0].ALF_NUME_DOCU; COD_DVEN = oListDV[0].COD_DVEN; txtNUM_NCRE.Text = string.Empty; deFEC_REGI.EditValue = DateTime.Today; deFEC_DOCU.EditValue = DateTime.Today; deFEC_VENC.EditValue = DateTime.Today; txtALF_ESTA.Text = oListDV[0].ALF_ESTA; lueCOD_MONE.EditValue = oListDV[0].COD_MONE; lueCOD_ALMA.EditValue = oListDV[0].COD_ALMA; txtALF_NUME_IDEN.Text = oListDV[0].ALF_NUME_IDEN; chkIGV.Checked = oListDV[0].IND_IMPU; chkIND_LIQU.Checked = oListDV[0].IND_LIQU; meALF_OBSE.Text = oListDV[0].ALF_OBSE; lblALF_SONN.Text = oListDV[0].ALF_TOTA; txtNUM_SUBT.Text = oListDV[0].NUM_SUBT.ToString("#,##0.00"); txtNUM_IGVV.Text = oListDV[0].NUM_IGVV.ToString("#,##0.00"); txtNUM_TOTA.Text = oListDV[0].NUM_TOTA.ToString("#,##0.00"); var oBeSu = new BESVMD_SOCI_NEGO_SUCU(); var oBrSu = new BRSVMD_SOCI_NEGO_SUCU(); oBeSu.NUM_ACCI = 5; oBeSu.COD_SOCI_NEGO = oListDV[0].COD_SOCI_NEGO; var oListTC = oBrSu.Get_SVPR_SOCI_NEGO_SUCU_LIST(oBeSu); lueCOD_SUCU.Properties.DataSource = oListTC; lueCOD_SUCU.Properties.Columns.Clear(); lueCOD_SUCU.Properties.Columns.Add(new LookUpColumnInfo("ALF_SUCU", 100, "Sucursal")); lueCOD_SUCU.Properties.DisplayMember = "ALF_SUCU"; lueCOD_SUCU.Properties.ValueMember = "COD_SOCI_NEGO_SUCU"; lueCOD_SUCU.EditValue = oListDV[0].COD_SUCU; var oBeD = new BESVTD_COTI(); var oBrD = new BRSVTD_COTI(); oBeD.COD_COTI = oListDV[0].COD_DVEN; oBeD.NUM_ACCI = 5; oBeD.COD_TIPO_DOCU = 4; var oList = oBrD.Get_SVPR_COTI_DETA_LIST(oBeD); oList.ForEach(obj => { oListArti.Add(obj); }); gdvArticles.RefreshData(); var oBeG = new BESVTD_COTI_GROU(); var oBrG = new BRSVTD_COTI_GROU(); oBeG.COD_COTI = oListDV[0].COD_DVEN; oBeG.NUM_ACCI = 5; oBeG.COD_TIPO_DOCU = 4; var oListG = oBrG.Get_SVPR_COTI_GROU_LIST(oBeG); oListG.ForEach(obj => { oListGroup.Add(obj); }); gdvGroups.RefreshData(); var oBeDG = new BESVTD_COTI(); var oBrDG = new BRSVTD_COTI_GROU_DETA(); oBeDG.COD_COTI = oListDV[0].COD_DVEN; oBeDG.NUM_ACCI = 5; oBeDG.COD_TIPO_DOCU = 4; var oListDG = oBrDG.Get_SVPR_COTI_GROU_DETA_LIST(oBeDG); oListDG.ForEach(obj => { oListArtiGroup.Add(obj); }); ListArticleCompletedUpdate(); gdvArticlesCompleted.RefreshData(); gdvArticlesGroup.RefreshData(); }
public IDataReader Get_SVPR_COTI_GROU_LIST(BESVTD_COTI_GROU oBe) { var ALF_NOMB_PROC = ""; if (oBe.COD_TIPO_DOCU == 1) ALF_NOMB_PROC = "SVPR_COTI_GROU_LIST"; else if (oBe.COD_TIPO_DOCU == 2) ALF_NOMB_PROC = "SVPR_OVEN_GROU_LIST"; else if (oBe.COD_TIPO_DOCU == 3) ALF_NOMB_PROC = "SVPR_GREM_GROU_LIST"; else if (oBe.COD_TIPO_DOCU == 4) ALF_NOMB_PROC = "SVPR_DVEN_GROU_LIST"; try { if (ocn.State == ConnectionState.Closed) ocn.Open(); var ocmd = odb.GetStoredProcCommand(ALF_NOMB_PROC, oBe.COD_COTI_GROU, oBe.COD_COTI, oBe.ALF_NOMB, oBe.NUM_CANT, oBe.COD_USUA_CREA, oBe.COD_USUA_MODI, oBe.NUM_ACCI); ocmd.CommandTimeout = 2000; var odr = odb.ExecuteReader(ocmd); Dispose(false); return (odr); } finally { ocn.Close(); } }
public void SearchQuote() { ClearControl(); using (var oForm = new xfSearchQuote(1,SESSION_COMP)) { if (oForm.ShowDialog() == DialogResult.OK) { LoadBranch(oForm.oBe.COD_SOCI_NEGO); txtCOD_SOCI_NEGO.Text = oForm.oBe.COD_SOCI_NEGO.ToString(); beALF_NOMB.Text = oForm.oBe.ALF_NOMB; txtALF_DIRE_FISC.Text = oForm.oBe.ALF_DIRE; txtALF_TELE.Text = ""; txtALF_FAXX.Text = ""; txtALF_CONT.Text = oForm.oBe.ALF_CONT; lueCOD_SUCU.EditValue = oForm.oBe.COD_SUCU; txtNUM_DESC.Text = oForm.oBe.NUM_DESC.ToString("#,##0.00"); txtNUM_COTI.Text = oForm.oBe.COD_COTI.ToString(); deFEC_REGI.EditValue = oForm.oBe.FEC_REGI; deFEC_DOCU.EditValue = oForm.oBe.FEC_DOCU; deFEC_VENC.EditValue = oForm.oBe.FEC_VENC; txtALF_ESTA.Text = oForm.oBe.ALF_ESTA; lueCOD_MONE.EditValue = oForm.oBe.COD_MONE; lueCOD_PROY.EditValue = oForm.oBe.COD_PROY; ALF_EJEC_COME = oForm.oBe.ALF_EJEC_COME; txtALF_ATEN.Text = oForm.oBe.ALF_ATEN; lkeCOD_MOTI.EditValue = oForm.oBe.COD_MOTI; mmoALF_COND_COME.Text = oForm.oBe.ALF_COND_COME; lueCOD_EJEC_COME.EditValue = oForm.oBe.COD_EJEC_COME; chkIGV.Checked = oForm.oBe.IND_IMPU; meALF_OBSE.Text = oForm.oBe.ALF_OBSE; lblALF_SONN.Text = oForm.oBe.ALF_TOTA; txtNUM_SUBT.Text = oForm.oBe.NUM_SUBT.ToString("#,##0.00"); txtNUM_IGVV.Text = oForm.oBe.NUM_IGVV.ToString("#,##0.00"); txtNUM_TOTA.Text = oForm.oBe.NUM_TOTA.ToString("#,##0.00"); var oBe = new BESVTD_COTI(); var oBr = new BRSVTD_COTI(); oBe.COD_COTI = oForm.oBe.COD_COTI; oBe.NUM_ACCI = 5; oBe.COD_TIPO_DOCU = 1; var oList = oBr.Get_SVPR_COTI_DETA_LIST(oBe); oList.ForEach(obj => { oListArti.Add(obj); }); gdvArticles.RefreshData(); var oBeG = new BESVTD_COTI_GROU(); var oBrG = new BRSVTD_COTI_GROU(); oBeG.COD_COTI = oForm.oBe.COD_COTI; oBeG.NUM_ACCI = 5; oBeG.COD_TIPO_DOCU = 1; var oListG = oBrG.Get_SVPR_COTI_GROU_LIST(oBeG); oListG.ForEach(obj => { oListGroup.Add(obj); }); gdvGroups.RefreshData(); var oBeDG = new BESVTD_COTI(); var oBrDG = new BRSVTD_COTI_GROU_DETA(); oBeDG.COD_COTI = oForm.oBe.COD_COTI; oBeDG.NUM_ACCI = 5; oBeDG.COD_TIPO_DOCU = 1; var oListDG = oBrDG.Get_SVPR_COTI_GROU_DETA_LIST(oBeDG); oListDG.ForEach(obj => { oListArtiGroup.Add(obj); }); gdvArticlesGroup.RefreshData(); var oBeTC = new BESVMD_SOCI_NEGO_SUCU(); var oBrTC = new BRSVMD_SOCI_NEGO_SUCU(); oBeTC.NUM_ACCI = 5; oBeTC.COD_SOCI_NEGO = oForm.oBe.COD_SOCI_NEGO; var oListTC = oBrTC.Get_SVPR_SOCI_NEGO_SUCU_LIST(oBeTC); lueCOD_SUCU.Properties.DataSource = oListTC; lueCOD_SUCU.Properties.Columns.Clear(); lueCOD_SUCU.Properties.Columns.Add(new LookUpColumnInfo("ALF_SUCU", 100, "Sucursal")); lueCOD_SUCU.Properties.DisplayMember = "ALF_SUCU"; lueCOD_SUCU.Properties.ValueMember = "COD_SOCI_NEGO_SUCU"; lueCOD_SUCU.EditValue = oForm.oBe.COD_SUCU; } } }
/// <summary> /// PRESENTAR LA ORDEN DE VENTA CON LA INFORMACION PROVENIENTE DE LA COTIZACION /// </summary> /// <param name="COD_COTI"></param> public void SearchSalesOrder(int COD_COTI) { ClearControl(); StateControl(false); var oBe = new BESVTC_COTI(); var oBr = new BRSVTC_COTI(); oBe.ALF_NUME_IDEN = COD_COTI.ToString(); oBe.COD_COMP = SESSION_COMP; oBe.COD_TIPO_DOCU = 1; oBe.NUM_ACCI = 6; var oList = oBr.Get_SVPR_COTI_BUSC(oBe); LoadBranch(oList[0].COD_SOCI_NEGO); txtCOD_SOCI_NEGO.Text = oList[0].COD_SOCI_NEGO.ToString(); beALF_NOMB.Text = oList[0].ALF_NOMB; txtALF_DIRE_FISC.Text = oList[0].ALF_DIRE; txtALF_TELE.Text = ""; txtALF_FAXX.Text = ""; txtALF_CONT.Text = oList[0].ALF_CONT; lueCOD_SUCU.EditValue = oList[0].COD_SUCU; txtNUM_DESC.Text = oList[0].NUM_DESC.ToString("#,##0.00"); txtCOD_COTI.Text = oList[0].COD_COTI.ToString(); deFEC_REGI.EditValue = DateTime.Today; deFEC_DOCU.EditValue = DateTime.Today; deFEC_VENC.EditValue = DateTime.Today.AddDays(oList[0].NUM_DIAS); lueCOD_MONE.EditValue = oList[0].COD_MONE; lkeCOD_MOTI.EditValue = oList[0].COD_MOTI; chkIGV.Checked = oList[0].IND_IMPU; meALF_OBSE.Text = oList[0].ALF_OBSE; lblALF_SONN.Text = oList[0].ALF_TOTA; txtNUM_SUBT.Text = oList[0].NUM_SUBT.ToString("#,##0.00"); txtNUM_IGVV.Text = oList[0].NUM_IGVV.ToString("#,##0.00"); txtNUM_TOTA.Text = oList[0].NUM_TOTA.ToString("#,##0.00"); var oBeSu = new BESVMD_SOCI_NEGO_SUCU(); var oBrSu = new BRSVMD_SOCI_NEGO_SUCU(); oBeSu.NUM_ACCI = 5; oBeSu.COD_SOCI_NEGO = oList[0].COD_SOCI_NEGO; var oListSu = oBrSu.Get_SVPR_SOCI_NEGO_SUCU_LIST(oBeSu); lueCOD_SUCU.Properties.DataSource = oListSu; lueCOD_SUCU.Properties.Columns.Clear(); lueCOD_SUCU.Properties.Columns.Add(new LookUpColumnInfo("ALF_SUCU", 100, "Sucursal")); lueCOD_SUCU.Properties.DisplayMember = "ALF_SUCU"; lueCOD_SUCU.Properties.ValueMember = "COD_SOCI_NEGO_SUCU"; lueCOD_SUCU.EditValue = oList[0].COD_SUCU; var oBeC = new BESVTD_COTI(); var oBrC = new BRSVTD_COTI(); oBeC.COD_COTI = oList[0].COD_COTI; oBeC.NUM_ACCI = 5; oBeC.COD_TIPO_DOCU = 1; var oListC = oBrC.Get_SVPR_COTI_DETA_LIST(oBeC); oListC.ForEach(obj => { oListArti.Add(obj); }); gdvArticles.RefreshData(); var oBeG = new BESVTD_COTI_GROU(); var oBrG = new BRSVTD_COTI_GROU(); oBeG.COD_COTI = oList[0].COD_COTI; oBeG.NUM_ACCI = 5; oBeG.COD_TIPO_DOCU = 1; var oListG = oBrG.Get_SVPR_COTI_GROU_LIST(oBeG); oListG.ForEach(obj => { oListGroup.Add(obj); }); gdvGroups.RefreshData(); var oBeDG = new BESVTD_COTI(); var oBrDG = new BRSVTD_COTI_GROU_DETA(); oBeDG.COD_COTI = oList[0].COD_COTI; oBeDG.NUM_ACCI = 5; oBeDG.COD_TIPO_DOCU = 1; var oListDG = oBrDG.Get_SVPR_COTI_GROU_DETA_LIST(oBeDG); oListDG.ForEach(obj => { oListArtiGroup.Add(obj); }); ListArticleCompletedUpdate(); gdvArticlesCompleted.RefreshData(); gdvArticlesGroup.RefreshData(); }
public xfAddGroup() { InitializeComponent(); oBe = new BESVTD_COTI_GROU(); }