MyAppointmentForm_asp.GetChild ... [英] MyAppointmentForm_asp.GetChild...

查看:56
本文介绍了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆