Esempio n. 1
0
        /// <summary>
        /// Checks mandatory fields
        /// </summary>
        /// <returns></returns>
        private bool CheckMandatory()
        {
            if (UserName_cmb.Text == string.Empty || UserName_cmb.SelectedIndex < 0)
            {
                messageData = new MessageData("mmce00002", Properties.Resources.mmce00002, UserName_lbl.Text);
                popUpMessage.Warning(messageData, Text);

                UserName_cmb.Focus();

                return(false);
            }

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

                SapUserName_txt.Focus();

                return(false);
            }

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

                UserPassword_txt.Focus();

                return(false);
            }

            return(true);
        }
Esempio n. 2
0
        bool checkdata()
        {
            if (DeptCode_cmb.SelectedItem == null)
            {
                messageData = new MessageData("mmcc00005", Properties.Resources.mmcc00005, DeptCode_lbl.Text);
                popUpMessage.Warning(messageData, Text);
                DeptCode_cmb.Focus();
                return(false);
            }
            if (FunctionCode_txt.Text == "")
            {
                messageData = new MessageData("mmcc00005", Properties.Resources.mmcc00005, functioncode_lbl.Text);
                popUpMessage.Warning(messageData, Text);
                FunctionCode_txt.Focus();
                return(false);
            }
            if (FunctionName_txt.Text == "")
            {
                messageData = new MessageData("mmcc00005", Properties.Resources.mmcc00005, functionname_lbl.Text);
                popUpMessage.Warning(messageData, Text);
                FunctionName_txt.Focus();
                return(false);
            }
            if (UserName_cmb.Text == "")
            {
                messageData = new MessageData("mmcc00005", Properties.Resources.mmcc00005, user_lbl.Text);
                popUpMessage.Warning(messageData, Text);
                UserName_cmb.Focus();
                return(false);
            }

            return(true);
        }