/// <summary> /// To fill rack combobox /// </summary> public void RackComboFill() { try { RackBll BllRack = new RackBll(); List<DataTable> listObj = new List<DataTable>(); if (cmbGodown.SelectedValue.ToString() != "System.Data.DataRowView") { listObj = BllRack.RackViewAllByGodown(Convert.ToDecimal(cmbGodown.SelectedValue.ToString())); DataRow drowSelect = listObj[0].NewRow(); drowSelect[0] = 0; drowSelect["rackName"] = "All"; cmbRack.DataSource = listObj; cmbRack.DisplayMember = "rackName"; cmbRack.ValueMember = "rackId"; } } catch (Exception ex) { MessageBox.Show("STKR:6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Rack Combobox corresponding to godown /// </summary> /// <param name="decGodownId"></param> public void RackComboFillByGodown(decimal decGodownId) { try { RackBll BllRack = new RackBll(); List<DataTable> listObjRack = new List<DataTable>(); listObjRack = BllRack.RackViewAllByGodown(decGodownId); cmbRack.DataSource = listObjRack[0]; cmbRack.ValueMember = "rackId"; cmbRack.DisplayMember = "rackName"; } catch (Exception ex) { MessageBox.Show("MPC10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }