void BindGrid() { lst = currentobj.GetAll(); if (lst.Count != 0) { dataGridView1.DataSource = null; dataGridView1.DataSource = lst; } }
void BindControl() { // CMBUnitType UniteTypelst = UniteTypeobj.GetAll(); CMBUnitType.DataSource = UniteTypelst; CMBUnitType.DisplayMember = "UniteName"; CMBUnitType.ValueMember = "ID"; CMBUnitType.SelectedIndex = 0; // CMBUnitNumber //UniteTypelst = UniteTypeobj.GetAll(); //CMBUnitNumber.DataSource = UniteTypelst; //CMBUnitNumber.DisplayMember = "UniteName"; //CMBUnitNumber.ValueMember = "ID"; //CMBUnitNumber.SelectedIndex = 0; // CMBPrice PriceTypelst = PriceTypeobj.GetAll(); CMBPrice.DataSource = PriceTypelst; CMBPrice.DisplayMember = "Name"; CMBPrice.ValueMember = "ID"; CMBPrice.SelectedIndex = 0; // CMBCompany Companyst = Companyobj.GetAll(); CMBCompany.DataSource = Companyst; CMBCompany.DisplayMember = "Name"; CMBCompany.ValueMember = "ID"; CMBCompany.SelectedIndex = 0; // CMBGroups Groupslst = Groupsobj.GetAll(); CMBGroups.DataSource = Groupslst; CMBGroups.DisplayMember = "Name"; CMBGroups.ValueMember = "ID"; CMBGroups.SelectedIndex = 0; // CMBMealSystem MealSystemlst = MealSystemobj.GetAll(); CMBMealSystem.DataSource = MealSystemlst; CMBMealSystem.DisplayMember = "Name"; CMBMealSystem.ValueMember = "ID"; CMBMealSystem.SelectedIndex = 0; // CMBSpecialReqeyests SpecialRequestslst = SpecialRequestsobj.GetAll(); CMBSpecialReqeyests.DataSource = SpecialRequestslst; CMBSpecialReqeyests.DisplayMember = "Name"; CMBSpecialReqeyests.ValueMember = "ID"; CMBSpecialReqeyests.SelectedIndex = 0; }