コード例 #1
0
    protected void btnCreate_Click(object sender, System.EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }
        SMSGroupsEntity smsGroups = new SMSGroupsEntity();

        smsGroups.Name = txtName.Text;
        if (SMSGroupsFactory.Create(smsGroups))
        {
            General.MakeAlertSucess(lblResult, Resources.AdminText.SavingDataSuccessfuly);
            ClearControls();
        }
        else
        {
            General.MakeAlertError(lblResult, Resources.AdminText.SavingDataFaild);
        }
    }
コード例 #2
0
ファイル: Add.ascx.cs プロジェクト: elshiekh5/CMS.V6
    protected void btnCreate_Click(object sender, System.EventArgs e)
    {
        if (!Page.IsValid)
        {
            return;
        }
        SMSGroupsEntity smsGroups = new SMSGroupsEntity();

        smsGroups.Name = txtName.Text;
        if (SMSGroupsFactory.Create(smsGroups))
        {
            lblResult.CssClass = "operation_done";
            lblResult.Text     = Resources.AdminText.SavingDataSuccessfuly;
            ClearControls();
        }
        else
        {
            lblResult.CssClass = "operation_error";
            lblResult.Text     = Resources.AdminText.SavingDataFaild;
        }
    }