3
I need to compare a value of one of the fields of a DataTable
, to fulfil a condition if
, but I don’t know how to do it. follow below:
public partial class imp_orcamento : DevExpress.XtraReports.UI.XtraReport
{
Datatable_orcamento dat_orc = new Datatable_orcamento();
DataTable ret_orc = new DataTable();
public imp_orcamento(int id_orc)
{
InitializeComponent();
met_dic_cli(id_orc);
}
private void met_dic_cli(int id_orcamento)
{
ret_orc = dat_orc.rpt_orcamento(id_orcamento);
xrLabel1.DataBindings.Add(new XRBinding("Text", ret_orc, "id_orc"));
xrLabel2.DataBindings.Add(new XRBinding("Text", ret_orc, "data"));
xrLabel3.DataBindings.Add(new XRBinding("Text", ret_orc, "nome_fantasia"));
xrLabel6.DataBindings.Add(new XRBinding("Text", ret_orc, "n_doc"));
xrLabel10.DataBindings.Add(new XRBinding("Text", ret_orc, "tipo_doc"));
xrLabel12.DataBindings.Add(new XRBinding("Text", ret_orc, "statos"));
xrLabel13.DataBindings.Add(new XRBinding("Text", ret_orc, "tipo"));
xrLabel8.DataBindings.Add(new XRBinding("Text", ret_orc, "contato"));
xrLabel9.DataBindings.Add(new XRBinding("Text", ret_orc, "departamento"));
xrLabel4.DataBindings.Add(new XRBinding("Text", ret_orc, "vendedor"));
xrLabel5.DataBindings.Add(new XRBinding("Text", ret_orc, "perfil"));
xrLabel7.DataBindings.Add(new XRBinding("Text", ret_orc, "tel"));
xrLabel14.DataBindings.Add(new XRBinding("Text", ret_orc, "val_prop"));
xrLabel15.DataBindings.Add(new XRBinding("Text", ret_orc, "tp_frete"));
xrLabel16.DataBindings.Add(new XRBinding("Text", ret_orc, "obs"));
xrLabel17.DataBindings.Add(new XRBinding("Text", ret_orc, "condicao"));
xrLabel18.DataBindings.Add(new XRBinding("Text", ret_orc, "modo"));
if (ret_orc.Columns.Equals("cli_final") != true)
{
xrCheckBox1.Checked = true;
}
}
managed to solve his problem?
– Marco Souza