Beispiel #1
0
        protected void btnNew_Click(object sender, EventArgs e)
        {
            TemplateViewModel model = new TemplateViewModel();

            model.Name     = "New Template";
            model.Title    = "Enter the subject";
            model.Text     = String.Empty;
            model.StatusId = value;

            templatecontroller.AddTemplate(model);

            TemplateViewModel modeldata = templatecontroller.GetTemplateByStatusIdLast(value);

            txtEdit.Text    = modeldata.Name;
            txtSubject.Text = modeldata.Title;
            btnSave.Enabled = true;
            btnNew.Enabled  = false;
        }