/// <summary> /// Loads building form /// Fill item combobox /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void LocationForm_Load(object sender, EventArgs e) { FormDatatableFromVo(); ComboBind(Building_cmb, buildingDatatable, "name", "id"); LocationCode_txt.Select(); Update_btn.Enabled = Delete_btn.Enabled = false; }
/// <summary> /// event to clear the controls of search criteria /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Clear_btn_Click(object sender, EventArgs e) { LocationCode_txt.Text = string.Empty; LocationName_txt.Text = string.Empty; Building_cmb.SelectedIndex = -1; Location_dgv.DataSource = null; LocationCode_txt.Select(); Update_btn.Enabled = Delete_btn.Enabled = false; }
/// <summary> /// Handles Load event for mold data Insert/Update operations /// Loading mold data for update mold data and binding controls with selected mold record /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddLocationForm_Load(object sender, EventArgs e) { FormDatatableFromVo(); ComboBind(Building_cmb, buildingDatatable, "name", "id"); LocationCode_txt.Select(); if (string.Equals(mode, CommonConstants.MODE_UPDATE)) { LoadUserData(updateData); LocationCode_txt.Enabled = false; LocationName_txt.Select(); } }