/// <summary> /// Function to fill cmbGodown /// </summary> public void FillGodownCombo() { try { GodownSP spGodown = new GodownSP(); DataTable dtblGodown = new DataTable(); dtblGodown = spGodown.GodownViewAll(); cmbGodown.DataSource = dtblGodown; cmbGodown.ValueMember = "godownId"; cmbGodown.DisplayMember = "godownName"; } catch (Exception ex) { MessageBox.Show("R1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill cmbGodown /// </summary> public void FillGodownCombo() { try { GodownSP spGodown = new GodownSP(); DataTable dtblGodown = new DataTable(); dtblGodown = spGodown.GodownViewAll(); cmbGodown.DataSource = dtblGodown; cmbGodown.ValueMember = "godownId"; cmbGodown.DisplayMember = "godownName"; } catch (Exception ex) { formMDI.infoError.ErrorString = "R1:" + ex.Message; } }
/// <summary> /// Function to fill cmbGodownSearch /// </summary> public void FillSearchCombo() { try { GodownSP spGodown = new GodownSP(); DataTable dtblGodown = new DataTable(); dtblGodown = spGodown.GodownViewAll(); cmbGodownSearch.DataSource = dtblGodown; DataRow dr = dtblGodown.NewRow(); dr[1] = "All"; dtblGodown.Rows.InsertAt(dr, 0); cmbGodownSearch.ValueMember = "godownId"; cmbGodownSearch.DisplayMember = "godownName"; } catch (Exception ex) { MessageBox.Show("R2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill cmbGodownSearch /// </summary> public void FillSearchCombo() { try { GodownSP spGodown = new GodownSP(); DataTable dtblGodown = new DataTable(); dtblGodown = spGodown.GodownViewAll(); cmbGodownSearch.DataSource = dtblGodown; DataRow dr = dtblGodown.NewRow(); dr[1] = "All"; dtblGodown.Rows.InsertAt(dr, 0); cmbGodownSearch.ValueMember = "godownId"; cmbGodownSearch.DisplayMember = "godownName"; } catch (Exception ex) { formMDI.infoError.ErrorString = "R2:" + ex.Message; } }
/// <summary> /// Function to fill godown combobox /// </summary> public void GodownComboFill() { try { DataTable dtbl = new DataTable(); GodownSP spGodown = new GodownSP(); dtbl = spGodown.GodownViewAll(); DataRow dr = dtbl.NewRow(); dr["godownName"] = "All"; dr["godownId"] = 0; dtbl.Rows.InsertAt(dr, 0); cmbGodown.DataSource = dtbl; cmbGodown.DisplayMember = "godownName"; cmbGodown.ValueMember = "godownId"; } catch (Exception ex) { formMDI.infoError.ErrorString = "SER6:" + ex.Message; } }
/// <summary> /// Function to fill Godown combobox /// </summary> public void GodownComboFill() { try { DataTable dtbl = new DataTable(); GodownSP spGodown = new GodownSP(); dtbl = spGodown.GodownViewAll(); DataRow dr = dtbl.NewRow(); dr["godownName"] = "All"; dr["godownId"] = 0; dtbl.Rows.InsertAt(dr, 0); cmbGodown.DataSource = dtbl; cmbGodown.DisplayMember = "godownName"; cmbGodown.ValueMember = "godownId"; } catch (Exception ex) { MessageBox.Show("SE:7" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// GridGodownComboFill /// </summary> public void GridGodownComboFill(decimal decProductId, int inRow, int inCol) { try { GodownSP spGodown = new GodownSP(); DataTable dtblGodown = new DataTable(); dtblGodown = spGodown.GodownViewAll(); dgvcmbGodown.DataSource = dtblGodown; DataGridViewComboBoxCell dgvcmbGodownCell = (DataGridViewComboBoxCell)dgvProduct.Rows[inRow].Cells[inCol]; dgvcmbGodownCell.DataSource = dtblGodown; dgvcmbGodown.ValueMember = "godownId"; dgvcmbGodown.DisplayMember = "godownName"; } catch (Exception ex) { MessageBox.Show("DN31: " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill godown combobox in grid /// </summary> public void GodownComboFill() { try { DataTable dtbl = new DataTable(); GodownSP spGodown = new GodownSP(); dtbl = spGodown.GodownViewAll(); cmbDefaultGodown.DataSource = dtbl; cmbDefaultGodown.DisplayMember = "godownName"; cmbDefaultGodown.ValueMember = "godownId"; cmbDefaultGodown.SelectedValue = 1; } catch (Exception ex) { MessageBox.Show("PC:49" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
//--------------------------------------------------------------ReturnFromGodownForm---------------------------- /// <summary> /// Function to fill godown combobox while return from godown when creating new godown /// </summary> /// <param name="decId"></param> public void ReturnFromGodownForm(decimal decId) { try { if (!isCallFromGrid) { GodownComboFill(); if (decId.ToString() != "0") { cmbDefaultGodown.SelectedValue = decId; } else if (strGodownName != string.Empty) { cmbDefaultGodown.SelectedValue = strGodownName; } else { cmbDefaultGodown.SelectedIndex = -1; } this.Enabled = true; cmbDefaultGodown.Focus(); this.WindowState = FormWindowState.Normal; this.Activate(); } else { DataGridViewComboBoxCell dgvGodownCell = (DataGridViewComboBoxCell)dgvProductCreation[dgvProductCreation.Columns["dgvcmbtgodown"].Index, dgvProductCreation.CurrentRow.Index]; DataGridViewComboBoxCell dgvRackCell = (DataGridViewComboBoxCell)dgvProductCreation[dgvProductCreation.Columns["dgvcmbrack"].Index, dgvProductCreation.CurrentRow.Index]; DataTable dtbl = new DataTable(); GodownSP spGodown = new GodownSP(); dtbl = spGodown.GodownViewAll(); dgvcmbtgodown.DataSource = dtbl; if (decId.ToString() != "0") { dgvProductCreation.CurrentRow.Cells["dgvcmbtgodown"].Value = decId; dgvRackCell.DataSource = null; } } } catch (Exception ex) { MessageBox.Show("PC:39" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill godown combobox in grid /// </summary> public void GodownGrigComboFill() { try { DataTable dtbl = new DataTable(); GodownSP spGodown = new GodownSP(); dtbl = spGodown.GodownViewAll(); DataRow drow = dtbl.NewRow(); drow["godownName"] = string.Empty; drow["godownId"] = 0; dtbl.Rows.InsertAt(drow, 0); dgvcmbtgodown.DataSource = dtbl; dgvcmbtgodown.DisplayMember = "godownName"; dgvcmbtgodown.ValueMember = "godownId"; } catch (Exception ex) { MessageBox.Show("PC:34" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Godown Combobox /// </summary> public void GoDownComboFill() { try { GodownSP spGodown = new GodownSP(); DataTable dtblGodown = new DataTable(); dtblGodown = spGodown.GodownViewAll(); cmbGoDown.DataSource = dtblGodown; cmbGoDown.ValueMember = "godownId"; cmbGoDown.DisplayMember = "godownName"; if (GodownStatus()) { cmbGoDown.Enabled = true; btnGodownAdd.Enabled = true; btnRackAdd.Visible = false; if (dtblGodown.Rows.Count == 1) { cmbRack.Enabled = true; btnRackAdd.Visible = true; RackComboFillByGodown(Convert.ToDecimal(cmbGoDown.SelectedValue)); } } else { cmbGoDown.Enabled = false; btnGodownAdd.Enabled = false; } } catch (Exception ex) { MessageBox.Show("MPC11:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to use the Godown ComboFill /// </summary> public void DGVGodownComboFill() { try { GodownSP spGodown = new GodownSP(); dgvcmbGodown.DataSource = spGodown.GodownViewAll(); dgvcmbGodown.ValueMember = "godownId"; dgvcmbGodown.DisplayMember = "godownName"; } catch (Exception ex) { MessageBox.Show("RI:16" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }