MyAppointmentForm_asp.GetChild ... [英] MyAppointmentForm_asp.GetChild...
问题描述
public partial class MyAppointmentForm_aspx:System.Web.UI.Page
{
public void Page_Load(object sender,EventArgs e)
{
PrepareChildControls();
tbFullName.Focus();
}
public override void DataBind()
{
base.DataBind();
MyAppointmentFormTemplateContainer container = (MyAppointmentFormTemplateContainer)父级;
AppointmentRecurrenceForm1.Visible = container.ShouldShowRecurrence;
btnOk.ClientSideEvents.Click = container.SaveHandler;
btnCancel.ClientSideEvents.Click = container.CancelHandler;
btnDelete.ClientSideEvents.Click = container.DeleteHandler;
}
protected void PrepareChildControls()
{
AppointmentFormTemplateContainer container =(AppointmentFormTemplateContainer)Parent;
ASPxScheduler control = container.Control;
AppointmentRecurrenceForm1.EditorsInfo = new EditorsInfo(control,control.Styles.FormEditors,control.Images.FormEditors,control.Styles.Buttons);
base.PrepareChildControls();
}
受保护ASPxEditBase [] GetChildEditors()
{
ASPxEditBase [] edits = new ASPxEditBase [] {
lblShortDescription,lblLongDescription,lblFullName,tbFullName,
lblPhone,tbPhone,lblDoctor,cbDoctor,lblStartTime,edtStartTime,
lblEndTime,edtEndDate,lblDescription,memDescription,
};
返回编辑;
}
protected override ASPxButton [] GetChildButtons()
{
ASPxButton [] buttons = new ASPxButton [] {
btnOk,btnCancel,btnDelete
};
返回按钮;
}
}
public partial class MyAppointmentForm_aspx : System.Web.UI.Page
{
public void Page_Load(object sender, EventArgs e)
{
PrepareChildControls();
tbFullName.Focus();
}
public override void DataBind()
{
base.DataBind();
MyAppointmentFormTemplateContainer container = (MyAppointmentFormTemplateContainer)Parent;
AppointmentRecurrenceForm1.Visible = container.ShouldShowRecurrence;
btnOk.ClientSideEvents.Click = container.SaveHandler;
btnCancel.ClientSideEvents.Click = container.CancelHandler;
btnDelete.ClientSideEvents.Click = container.DeleteHandler;
}
protected void PrepareChildControls()
{
AppointmentFormTemplateContainer container = (AppointmentFormTemplateContainer)Parent;
ASPxScheduler control = container.Control;
AppointmentRecurrenceForm1.EditorsInfo = new EditorsInfo(control, control.Styles.FormEditors, control.Images.FormEditors, control.Styles.Buttons);
base.PrepareChildControls();
}
protected ASPxEditBase[] GetChildEditors()
{
ASPxEditBase[] edits = new ASPxEditBase[] {
lblShortDescription, lblLongDescription, lblFullName, tbFullName,
lblPhone, tbPhone, lblDoctor, cbDoctor, lblStartTime, edtStartTime,
lblEndTime, edtEndDate, lblDescription, memDescription,
};
return edits;
}
protected override ASPxButton[] GetChildButtons()
{
ASPxButton[] buttons = new ASPxButton[] {
btnOk, btnCancel, btnDelete
};
return buttons;
}
}
推荐答案
namespace DXWebClinicScheduling {
public partial class MyAppointmentForm_aspx : SchedulerFormControl
{
protected void Page_Load(object sender, EventArgs e)
{
PrepareChildControls();
tbFullName.Focus();
}
public override void DataBind()
{
base.DataBind();
MyAppointmentFormTemplateContainer container = (MyAppointmentFormTemplateContainer)Parent;
AppointmentRecurrenceForm1.Visible = container.ShouldShowRecurrence;
btnOk.ClientSideEvents.Click = container.SaveHandler;
btnCancel.ClientSideEvents.Click = container.CancelHandler;
btnDelete.ClientSideEvents.Click = container.DeleteHandler;
}
protected override void PrepareChildControls()
{
AppointmentFormTemplateContainer container = (AppointmentFormTemplateContainer)Parent;
ASPxScheduler control = container.Control;
AppointmentRecurrenceForm1.EditorsInfo = new EditorsInfo(control, control.Styles.FormEditors, control.Images.FormEditors, control.Styles.Buttons);
base.PrepareChildControls();
}
protected override ASPxEditBase[] GetChildEditors()
{
ASPxEditBase[] edits = new ASPxEditBase[] {
lblShortDescription, lblLongDescription, lblFullName, tbFullName,
lblPhone, tbPhone, lblDoctor, cbDoctor, lblStartTime, edtStartTime,
lblEndTime, edtEndDate, lblDescription, memDescription,
};
return edits;
}
protected override ASPxButton[] GetChildButtons()
{
ASPxButton[] buttons = new ASPxButton[] {
btnOk, btnCancel, btnDelete
};
return buttons;
}
}
}
这篇关于MyAppointmentForm_asp.GetChild ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!