Exemplo n.º 1
0
        protected void ASPxUploadControl1_FileUploadComplete(object sender, DevExpress.Web.FileUploadCompleteEventArgs e)
        {
            ASPxUploadControl control = sender as ASPxUploadControl;
            CustomAppointmentFormTemplateContainer container = (CustomAppointmentFormTemplateContainer)Parent;
            string callback = SavePostedFiles(e.UploadedFile);

            container.Appointment.CustomFields["AppointmentAttachment"]         = e.UploadedFile.FileBytes;
            container.Appointment.CustomFields["AppointmentAttachmentFileName"] = callback;
            e.CallbackData = callback;
        }
Exemplo n.º 2
0
        public override void DataBind()
        {
            base.DataBind();
            CustomAppointmentFormTemplateContainer container = (CustomAppointmentFormTemplateContainer)Parent;

            ASPxTextBoxSubject.Text    = container.Subject;
            ASPxDateEditStart.Value    = container.Start;
            ASPxDateEditEnd.Value      = container.End;
            ASPxMemoDescription.Text   = container.Description;
            ASPxTextBoxCustomInfo.Text = container.CustomInfoField;

            ASPxLabelFileName.Text = container.CustomAttachmentFileName;

            ASPxButtonOk.ClientSideEvents.Click     = container.SaveHandler;
            ASPxButtonCancel.ClientSideEvents.Click = container.CancelHandler;
            ASPxButtonDelete.ClientSideEvents.Click = container.DeleteHandler;
        }