protected void Page_Load(object sender, EventArgs e)
        {
            Uri u = HttpContext.Current.Request.Url;

            ModelId = HttpUtility.ParseQueryString(u.Query).Get("id");

            var providermodel = controller.GetData(ModelId);

            var layoutmodel = controller.GetCoreLayoutData(providermodel);

            LayoutProvider.DataSource = layoutmodel;
            LayoutProvider.DataBind();

            var modelbookingprocess = controller.GetDataByProviderId(providermodel.ProviderId);

            GridBookingProcessView.DataSource = modelbookingprocess;
            GridBookingProcessView.DataBind();

            var model = controller.GetData(ModelId);

            GridNoteView.DataSource = model.Notes;
            GridNoteView.DataBind();

            GridProviderContactView.DataSource = model.Contacts;
            GridProviderContactView.DataBind();

            GridCancellationView.DataSource = model.Cancellations;
            GridCancellationView.DataBind();
        }
Exemplo n.º 2
0
        protected void GridBookingProcessView_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
        {
            BookingProcessViewModel model = new BookingProcessViewModel();

            model.Status            = (DocumentProcessStatus)e.NewValues["Status"];
            model.Country           = e.NewValues["Country"].ToString();
            model.PlaceName         = e.NewValues["PlaceName"].ToString();
            model.SiteName          = e.NewValues["SiteName"].ToString();
            model.TourOperatorCode  = e.NewValues["TourOperator"].ToString();
            model.CheckIn           = (DateTime)e.NewValues["CheckIn"];
            model.CheckOut          = (DateTime)e.NewValues["CheckOut"];
            model.FirstName         = e.NewValues["FirstName"].ToString();
            model.LastName          = e.NewValues["LastName"].ToString();
            model.TravelerCountry   = e.NewValues["TravelerCountry"].ToString();
            model.Address           = e.NewValues["Address"].ToString();
            model.TravelApplicantId = (int)e.NewValues["TravelApplicantId"];
            model.PartnerId         = (int)e.NewValues["PartnerId"];
            model.Season            = e.NewValues["Season"].ToString();
            controller.AddBookingProcess(model);

            e.Cancel = true;
            GridBookingProcessView.CancelEdit();

            Bind();
        }
Exemplo n.º 3
0
        protected void GridBookingProcessView_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            string id = e.Keys[0].ToString();


            controller.DeleteBookingProcess(id);

            e.Cancel = true;
            GridBookingProcessView.CancelEdit();

            Bind();
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Uri u = HttpContext.Current.Request.Url;

            modelid = HttpUtility.ParseQueryString(u.Query).Get("id");
            var layoutmodel = controller.GetCustomerLayout(modelid);

            FormLayoutCustomer.DataSource = layoutmodel;
            FormLayoutCustomer.DataBind();

            var modelbookingprocess = controller.GetBookingProcessesByCustomerId(layoutmodel.CustomerNr);

            GridBookingProcessView.DataSource = modelbookingprocess;
            GridBookingProcessView.DataBind();

            var model = controller.GetCustomer(modelid);

            GridNoteView.DataSource = model.Notes;
            GridNoteView.DataBind();

            GridCustomerEmailView.DataSource = model.Contacts;
            GridCustomerEmailView.DataBind();
        }
Exemplo n.º 5
0
 protected void GridBookingProcessView_DataBinding(object sender, EventArgs e)
 {
     GridBookingProcessView.ForceDataRowType(typeof(BookingProcessViewModel));
 }
Exemplo n.º 6
0
 public void Bind()
 {
     GridBookingProcessView.DataSource = controller.Init();
     GridBookingProcessView.DataBind();
 }