Beispiel #1
0
        /// <summary>
        /// Checks mandatory fields
        /// </summary>
        /// <returns></returns>
        private bool CheckMandatory()
        {
            if (CavityCode_txt.Text == string.Empty)
            {
                messageData = new MessageData("mmce00002", Properties.Resources.mmce00002, CavityCode_lbl.Text);
                popUpMessage.Warning(messageData, Text);

                CavityCode_txt.Focus();

                return(false);
            }

            if (CavityName_txt.Text == string.Empty)
            {
                messageData = new MessageData("mmce00002", Properties.Resources.mmce00002, CavityName_lbl.Text);
                popUpMessage.Warning(messageData, Text);

                CavityName_txt.Focus();

                return(false);
            }
            if (Mold_cmb.Text == string.Empty || Mold_cmb.SelectedIndex < 0)
            {
                messageData = new MessageData("mmce00002", Properties.Resources.mmce00002, Mold_lbl.Text);
                popUpMessage.Warning(messageData, Text);

                Mold_cmb.Focus();

                return(false);
            }

            return(true);
        }
Beispiel #2
0
        /// <summary>
        /// form loading
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MoldItemMasterForm_Load(object sender, EventArgs e)
        {
            LoadMold();
            LoadSapItem();

            Mold_cmb.Select();
            Update_btn.Enabled = false;
        }
Beispiel #3
0
        /// <summary>
        /// event to clear the controls of search criteria
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void Clear_btn_Click(object sender, EventArgs e)
        {
            CavityCode_txt.Text = string.Empty;

            CavityName_txt.Text = string.Empty;

            Mold_cmb.Text = string.Empty;

            Mold_cmb.SelectedIndex = -1;

            Cavity_dgv.DataSource = null;

            Mold_cmb.Select();
            Update_btn.Enabled = Delete_btn.Enabled = false;
        }