private void UpdateAll() { LI = NI; NI = GetNI(); tbPCMenu.Text = PC.DEC16.ToString("X4"); tbLIMenu.Text = LI; tbNIMenu.Text = NI; tbLI.Text = LI; tbNI.Text = NI; tbPC.Text = PC.DEC16.ToString("X4"); tbSP.Text = SP.DEC16.ToString("X4"); tbCCC.Text = CCC.ToString(); tbIC.Text = IC.ToString(); tbA.Text = PSW.HB.DEC8.ToString("X2"); tbF.Text = PSW.LB.DEC8.ToString("X2"); tbB.Text = BC.HB.DEC8.ToString("X2"); tbC.Text = BC.LB.DEC8.ToString("X2"); tbD.Text = DE.HB.DEC8.ToString("X2"); tbE.Text = DE.LB.DEC8.ToString("X2"); tbH.Text = HL.HB.DEC8.ToString("X2"); tbL.Text = HL.LB.DEC8.ToString("X2"); tbM.Text = M.DEC8.ToString("X2"); string s; for (int i = 0; i <= 7; i++) { if (PSW.LB[i] == true) { s = "1"; } else { s = "0"; } FArray[i].Text = s; } }
public void cargar_cobranzas(string ncontrato) { dtgCCanceladas.DataSource = null; dtgCPendientes.DataSource = null; txtTotCanCobranzas.Text = ""; txtGLCobranzas.Text = ""; txtICCobranzas.Text = ""; txtGICobranzas.Text = ""; txtFECobranzas.Text = ""; txtTGCobranzas.Text = ""; txtObsCobranzas.Text = ""; double TC, GL, IC, GI, FE, TG; TC = GL = IC = GI = FE = TG = 0; lblNContratoCobranzas.Text = "Contrato N° " + ncontrato; string txtSQL = "Select TipoCuota,NroCuota,TotalCuotas,MontoCuota,FechaCuota from Giros where NroContrato='" + ncontrato + "' and Estatus='PENDIENTE' Order by FechaCuota,TotalCuotas"; if (Globales.BD.nregistros(txtSQL) > 0) { Globales.BD.dtt = Globales.BD.generar_datatable(txtSQL, CommandType.Text, new List <Clases.Parameters>()); dtgCPendientes.DataSource = Globales.BD.dtt; //dtgCPendientes.Columns[4].Visible = false; foreach (DataRow row in Globales.BD.dtt.Rows) { if (row["TipoCuota"] != DBNull.Value) { if (Convert.ToString(row["TipoCuota"]) == "GIRO") { GI += Convert.ToDouble(row["MontoCuota"]); } else if (Convert.ToString(row["TipoCuota"]) == "COMPLEMENTARIA") { IC += Convert.ToDouble(row["MontoCuota"]); } else if (Convert.ToString(row["TipoCuota"]) == "GASTOSLEGALES") { GL += Convert.ToDouble(row["MontoCuota"]); } else if (Convert.ToString(row["TipoCuota"]).Length > 21) { if (Convert.ToString(row["TipoCuota"]).Substring(0, 21) == "FINANCIAMIENTOESPECIAL") { FE += Convert.ToDouble(row["MontoCuota"]); } } } TG += Convert.ToDouble(row["MontoCuota"]); } txtGLCobranzas.Text = GL.ToString("N2") + " Bs."; txtICCobranzas.Text = IC.ToString("N2") + " Bs."; txtGICobranzas.Text = GI.ToString("N2") + " Bs."; txtFECobranzas.Text = FE.ToString("N2") + " Bs."; txtTGCobranzas.Text = TG.ToString("N2") + " Bs."; } txtSQL = "Select TipoCuota,NroCuota,TotalCuotas,MontoCuota,FechaCancelado from Giros where NroContrato='" + ncontrato + "' and Estatus='CANCELADO' Order by FechaCuota,TotalCuotas"; if (Globales.BD.nregistros(txtSQL) > 0) { Globales.BD.dtt = Globales.BD.generar_datatable(txtSQL, CommandType.Text, new List <Clases.Parameters>()); dtgCCanceladas.DataSource = Globales.BD.dtt; //dtgCCanceladas.Columns[4].Visible = false; foreach (DataRow row in Globales.BD.dtt.Rows) { TC += Convert.ToDouble(row["MontoCuota"]); } txtTotCanCobranzas.Text = TC.ToString("N2") + " Bs."; } }