Esempio n. 1
0
 public void Fill()
 {
     Miami.Substitute.Dal.Template template = new Miami.Substitute.Dal.Template();
     template.LoadByPrimaryKey(TemplateId);
     TemplateNameLabel.Text = template.Header;
     TemplateText.Text = template.Text;
     DeleteButton.Enabled = TemplateText.Text.Length > 0;
 }
Esempio n. 2
0
 public void Fill()
 {
     Miami.Substitute.Dal.Template template = new Miami.Substitute.Dal.Template();
     template.LoadByPrimaryKey(TemplateId);
     TemplateNameLabel.Text = template.Header;
     TemplateText.Text      = template.Text;
     DeleteButton.Enabled   = TemplateText.Text.Length > 0;
 }
Esempio n. 3
0
 protected void SaveButton_Click(object sender, EventArgs e)
 {
     if (TemplateId == 0) return;
     Miami.Substitute.Dal.Template template = new Miami.Substitute.Dal.Template();
     template.LoadByPrimaryKey(TemplateId);
     template.Text = TemplateText.Text;
     template.Save();
     if (Action != null) Action(sender, e);
 }
Esempio n. 4
0
 protected void DeleteButton_Click(object sender, EventArgs e)
 {
     if (TemplateId == 0)
     {
         return;
     }
     Miami.Substitute.Dal.Template template = new Miami.Substitute.Dal.Template();
     template.LoadByPrimaryKey(TemplateId);
     template.Text = String.Empty;
     template.Save();
     if (Action != null)
     {
         Action(sender, e);
     }
 }