コード例 #1
0
 /// <summary>
 /// Function to fill Route combobox
 /// </summary>
 /// <param name="decAreaId"></param>
 public void RouteComboFill(decimal decAreaId)
 {
     try
     {
         AccountLedgerBll bllAccountLedger = new AccountLedgerBll();
         List<DataTable> listObj = new List<DataTable>();
         listObj = bllAccountLedger.cmbRoutInCustomer(decAreaId);
         DataRow dr = listObj[0].NewRow();
         dr["routeId"] = 0;
         dr["routeName"] = "";
         listObj[0].Rows.InsertAt(dr, 0);
         cmbRoute.ValueMember = "routeId";
         cmbRoute.DisplayMember = "routeName";
         cmbRoute.DataSource = listObj[0];
     }
     catch (Exception ex)
     {
         MessageBox.Show("Cus4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }