Пример #1
0
        public employedCompositeType getEmployedById(int iIdEmployed)
        {
            employedCompositeType act = new employedCompositeType();
            Employed et = new Employed();

            act = et.GetEmployedById(iIdEmployed);
            return(act);
        }
Пример #2
0
        public bool ExistEmployedFormat(String sTextEmployed)
        {
            var et          = new employedCompositeType();
            var em          = new EmployedManager();
            int iIdEmployed = Util.SeparaID_AutoComplete(sTextEmployed);

            et = iIdEmployed > 0 ? em.getEmployedById(iIdEmployed) : null;
            bool exist = et != null;

            return(exist);
        }
Пример #3
0
    private employedCompositeType Empleado()
    {
        var ect = new employedCompositeType();

        try
        {
            Util.isRequired(ect.sName.Trim(), "Nombre");
            Util.isRequired(ect.sFLastName.Trim(), "Apellido Paterno");
            Util.isRequired(ect.sMLastName.Trim(), "Apellido Materno");
            Util.isRequired(ect.sEMail.Trim(), "E-mail");
            Util.validateEmail(ect.sEMail);

            Util.isRequired(txtNumberEmployed.Text.Trim(), "Número");
            Util.isNumeric(txtNumberEmployed.Text.Trim(), "Número");

            Util.isRequired(ddlArea.SelectedValue.ToString(), "Area");
            Util.isRequired(ddlPlant.SelectedValue.ToString(), "Planta");

            ect.iIdEmployed = int.Parse(lblIdEntity.Text.ToString());
            ect.sName       = txtNameEmployed.Text.Trim();
            ect.sFLastName  = txtFatherLastName.Text.Trim();
            ect.sMLastName  = txtMotherLastName.Text.Trim();
            ect.sEMail      = txtEmail.Text.Trim();
            ect.iIdArea     = int.Parse(ddlArea.SelectedValue.ToString());
            ect.iIdPlant    = int.Parse(ddlPlant.SelectedValue.ToString());
            ect.iNumber     = int.Parse(txtNumberEmployed.Text.Trim());
            return(ect);
        }
        catch (ArgumentException ae)
        {
            util.ErroDisplay(3, ae.Message, ref lblMessage);
            return(null);
        }
        catch (Exception ex)
        {
            util.ErroDisplay(1, string.Empty, ref lblMessage);
            return(null);
        }
    }