예제 #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;
 }
예제 #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;
 }
예제 #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);
 }
예제 #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);
     }
 }