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

                UserCode_txt.Focus();

                return(false);
            }
            if (UserName_txt.Text == string.Empty)
            {
                messageData = new MessageData("mmce00002", Properties.Resources.mmce00002, UserName_lbl.Text);
                popUpMessage.Warning(messageData, Text);

                UserName_txt.Focus();

                return(false);
            }

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

                Password_txt.Focus();

                return(false);
            }

            if (Country_cmb.Text == string.Empty || Country_cmb.SelectedIndex < 0)
            {
                messageData = new MessageData("mmce00002", Properties.Resources.mmce00002, Country_lbl.Text);
                popUpMessage.Warning(messageData, Text);

                Country_cmb.Focus();

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

            //    Language_cmb.Focus();

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

                FactoryCode_cmb.Focus();

                return(false);
            }
            return(true);
        }
Example #2
0
        /// <summary>
        /// form loads
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CountryLanguageForm_Load(object sender, EventArgs e)
        {
            FormDatatableFromVo();

            iscmbCountryLoading = true;

            ComboBind(Country_cmb, cntryLangDatatable, "countrycode", "countrycode");

            iscmbCountryLoading = false;

            Language_cmb.Enabled = false;

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