コード例 #1
0
        private void data_Tablactactelist()
        {
            try
            {
                Tablactactelist = new DataTable();

                if (Tablactactelist.Rows.Count > 0)
                {
                    Tablactactelist.Rows.Clear();
                }
                var BL = new tb_me_ctactelistBL();
                var BE = new tb_me_ctactelist();
                Tablactactelist = BL.GetAll(EmpresaID, BE).Tables[0];
                if (Tablactactelist.Rows.Count > 0)
                {
                    btn_imprimir.Enabled = true;
                    Mdi_dgv_ctactelist.DataSource = Tablactactelist;
                }
                else
                {
                    Mdi_dgv_ctactelist.DataSource = Tablactactelist;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
 private void ValidaCtactelist(String xcod)
 {
     var BE = new tb_me_ctactelist();
     var BL = new tb_me_ctactelistBL();
     var dt = new DataTable();
     BE.ctactelistid = Convert.ToInt32(xcod.Trim());
     dt = BL.GetAll(EmpresaID, BE).Tables[0];
     if (dt.Rows.Count > 0)
     {
         ctactelist.Text = dt.Rows[0]["ctactelistid"].ToString();
         ctactelistname.Text = dt.Rows[0]["ctactelistname"].ToString();
     }
     else
     {
         ctactelist.Text = string.Empty;
         ctactelistname.Text = string.Empty;
     }
 }