Ejemplo n.º 1
0
    //-----------------------------------------------
    //LoadObject
    //-----------------------------------------------
    protected override object LoadObject()
    {
        MailListGroupsEntity mailListGroups = new MailListGroupsEntity();

        mailListGroups.GroupID = Convert.ToInt32(Request.QueryString["id"]);
        mailListGroups.Name    = txtName.Text;
        return(mailListGroups);
    }
Ejemplo n.º 2
0
    //-----------------------------------------------
    //LoadControls
    //-----------------------------------------------
    protected override bool LoadControls()
    {
        int groupID = Convert.ToInt32(Request.QueryString["id"]);
        MailListGroupsEntity mailListGroups = MailListGroupsFactory.GetObject(groupID);

        if (mailListGroups != null)
        {
            txtName.Text = mailListGroups.Name;
            return(true);
        }

        else
        {
            return(false);
        }
    }
Ejemplo n.º 3
0
    //-----------------------------------------------
    //SaveData
    //-----------------------------------------------
    protected override object SaveData()
    {
        MailListGroupsEntity mailListGroups = (MailListGroupsEntity)LoadObject();

        if (mailListGroups != null)
        {
            SPOperation operation;
            if (pageType == PagesTypes.AdminAdd)
            {
                operation = SPOperation.Insert;
            }
            else
            {
                operation = SPOperation.Update;
            }

            status = MailListGroupsFactory.Save(mailListGroups, operation);
        }
        return(mailListGroups);
    }