Beispiel #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        var fileReceivedBody             = (txtFileReceived.Text);
        var fileAcceptedBody             = (txtFileAccepted.Text);
        var fileRejectedBody             = (txtFileRejected.Text);
        var fileAcceptedWithWarningsBody = (txtFileAcceptedWithWarnings.Text);

        var saved = DBWriteManager.SaveMasterLocalFileNotificationSmsBodyTemplates(new MasterLocalFileNotificationSmsBodyTemplate
        {
            Id                       = 0,
            AcceptedBody             = fileAcceptedBody,
            AcceptedWithWarningsBody = fileAcceptedWithWarningsBody,
            RejectedBody             = fileRejectedBody,
            ReceivedBody             = fileReceivedBody,
            CreatedBy                = Sars.Systems.Security.ADUser.CurrentSID,
            DateLastModified         = DateTime.Now,
            LastModifiedBy           = Sars.Systems.Security.ADUser.CurrentSID
        });

        MessageBox.Show(saved > 0
            ? "Master/Local File Notification SMS Templates saved successfully"
            : "Issues reported during saving");

        btnSave.Enabled = false;
    }