Exemplo 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);
        }
Exemplo 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);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Loads UserMasterMaintenanceForm
        /// Fill Country combobox
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SapUserMasterForm_Load(object sender, EventArgs e)
        {
            LoadMesUser();

            UserName_cmb.Select();

            Update_btn.Enabled = Delete_btn.Enabled = false;
        }
Exemplo n.º 4
0
        /// <summary>
        /// event to clear the controls of search criteria
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Clear_btn_Click(object sender, EventArgs e)
        {
            SapUserName_txt.Text = string.Empty;

            UserName_cmb.SelectedIndex = -1;

            SapUserdetails_dgv.DataSource = null;

            UserName_cmb.Select();
            Update_btn.Enabled = Delete_btn.Enabled = false;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Handles Load event for user data Insert/Update operations
        /// Loading user data for update user data and binding controls with selected user record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddSapUserMasterForm_Load(object sender, EventArgs e)
        {
            LoadMesUser();

            UserName_cmb.Select();

            if (string.Equals(mode, CommonConstants.MODE_UPDATE))
            {
                LoadUserData(updateData);

                UserName_cmb.Enabled = false;
                SapUserName_txt.Select();
            }
        }