コード例 #1
0
 /// <summary>
 /// Function to fill GroupUnderComboBox
 /// </summary>
 public void ProductGroupUnderComboFill()
 {
     try
     {
         ProductGroupSP spProductGroup = new ProductGroupSP();
         DataTable      dtbl           = new DataTable();
         dtbl = spProductGroup.ProductGroupViewForComboFillForProductGroup();
         cmbUnder.DataSource    = dtbl;
         cmbUnder.ValueMember   = "GroupId";
         cmbUnder.DisplayMember = "GroupName";
     }
     catch (Exception ex)
     {
         MessageBox.Show("PG1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #2
0
ファイル: frmProductGroup.cs プロジェクト: nwelsheimer/NBS
 /// <summary>
 /// Function to fill GroupUnderComboBox
 /// </summary>
 public void ProductGroupUnderComboFill()
 {
     try
     {
         ProductGroupSP spProductGroup = new ProductGroupSP();
         DataTable      dtbl           = new DataTable();
         dtbl = spProductGroup.ProductGroupViewForComboFillForProductGroup();
         cmbUnder.DataSource    = dtbl;
         cmbUnder.ValueMember   = "GroupId";
         cmbUnder.DisplayMember = "GroupName";
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PG1:" + ex.Message;
     }
 }
コード例 #3
0
        /// <summary>
        /// Function to fill GroupUnderComboBox
        /// </summary>
        public void ProductGroupUnderComboFill()
        {
            try
            {

                ProductGroupSP spProductGroup = new ProductGroupSP();
                DataTable dtbl = new DataTable();
                dtbl = spProductGroup.ProductGroupViewForComboFillForProductGroup();
                cmbUnder.DataSource = dtbl;
                cmbUnder.ValueMember = "GroupId";
                cmbUnder.DisplayMember = "GroupName";

            }
            catch (Exception ex)
            {
                MessageBox.Show("PG1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
コード例 #4
0
 /// <summary>
 /// Function to fill the fields to edit or delete
 /// </summary>
 private void FillControls()
 {
     try
     {
         ProductGroupInfo infoProductGroup = new ProductGroupInfo();
         ProductGroupSP   spProductGroup   = new ProductGroupSP();
         infoProductGroup         = spProductGroup.ProductGroupView(decId);
         txtProductGroupName.Text = infoProductGroup.GroupName;
         DataTable dtbl = new DataTable();
         dtbl = spProductGroup.ProductGroupViewForComboFillForProductGroup();
         cmbUnder.DataSource = dtbl;
         foreach (DataRow dr in dtbl.Rows)
         {
             if (dr["GroupName"].ToString() == txtProductGroupName.Text)
             {
                 dr.Delete();
             }
         }
         cmbUnder.ValueMember   = "GroupId";
         cmbUnder.DisplayMember = "GroupName";
         cmbUnder.SelectedValue = infoProductGroup.GroupUnder;
         if (spProductGroup.ProductGroupCheckExistenceOfUnderGroup(decId) == false)
         {
             cmbUnder.Enabled = false;
         }
         else
         {
             cmbUnder.Enabled = true;
         }
         txtNarration.Text = infoProductGroup.Narration;
     }
     catch (Exception ex)
     {
         MessageBox.Show("PG10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
コード例 #5
0
        /// <summary>
        /// Function to fill the fields to edit or delete
        /// </summary>
        private void FillControls()
        {
            try
            {
                ProductGroupInfo infoProductGroup = new ProductGroupInfo();
                ProductGroupSP spProductGroup = new ProductGroupSP();
                infoProductGroup = spProductGroup.ProductGroupView(decId);
                txtProductGroupName.Text = infoProductGroup.GroupName;
                DataTable dtbl = new DataTable();
                dtbl = spProductGroup.ProductGroupViewForComboFillForProductGroup();
                cmbUnder.DataSource = dtbl;
                foreach (DataRow dr in dtbl.Rows)
                {
                    if (dr["GroupName"].ToString() == txtProductGroupName.Text)
                        dr.Delete();
                }
                cmbUnder.ValueMember = "GroupId";
                cmbUnder.DisplayMember = "GroupName";
                cmbUnder.SelectedValue = infoProductGroup.GroupUnder;
                if (spProductGroup.ProductGroupCheckExistenceOfUnderGroup(decId) == false)
                {
                    cmbUnder.Enabled = false;
                }
                else
                {
                    cmbUnder.Enabled = true;
                }
                txtNarration.Text = infoProductGroup.Narration;


            }
            catch (Exception ex)
            {
                MessageBox.Show("PG10:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }