protected void Page_Load(object sender, EventArgs e) { Uri u = HttpContext.Current.Request.Url; var id = HttpUtility.ParseQueryString(u.Query).Get("id"); model = controller.GetModel(id); GridBookingProcessItemView.DataSource = model.BookingProcessItemList; GridBookingProcessItemView.DataBind(); ASPxComboBoxStatus.DataSource = model.ActionList; ASPxComboBoxStatus.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Uri u = HttpContext.Current.Request.Url; id = HttpUtility.ParseQueryString(u.Query).Get("id"); DocumentProcessStatus status = CheckProviderStatus(id); bool isconfirmed = false; bool newstatus = false; if (status == DocumentProcessStatus.New) { newstatus = true; } else if (status == DocumentProcessStatus.ProviderConfirmed) { isconfirmed = true; } else { } ViewState["newstatus"] = newstatus; CheckApplicantPaymentStatus(id); model = controller.GetModel(id); GridBookingProcessItemView.DataSource = model.BookingProcessItemList; GridBookingProcessItemView.DataBind(); if (isconfirmed) { var list = controller.GetStatusesProviderConfirmedBefore(); ASPxComboBoxStatus.DataSource = list; ASPxComboBoxStatus.DataBind(); //ViewState["list"] = list; } else { ASPxComboBoxStatus.DataSource = controller.GetStatuses(id); ASPxComboBoxStatus.DataBind(); } lblStatus.Text = model.Status.ToString(); ViewState["id"] = id; ViewState["isconfirmed"] = isconfirmed; } else { if (ViewState["number"] == null) { number++; ViewState["number"] = number; } else { number = (int)ViewState["number"]; number++; ViewState["number"] = number; } id = (string)ViewState["id"]; bool isconfirmed = (bool)ViewState["isconfirmed"]; if (isconfirmed) { if (ASPxComboBoxStatus.SelectedItem != null && number == 2) { ViewState["valueid"] = ASPxComboBoxStatus.SelectedItem.Value.ToString(); } } else { ViewState["valueid"] = ASPxComboBoxStatus.SelectedItem.Value.ToString(); } CheckApplicantPaymentStatus(id); model = controller.GetModel(id); GridBookingProcessItemView.DataSource = model.BookingProcessItemList; GridBookingProcessItemView.DataBind(); if (isconfirmed) { ASPxComboBoxStatus.DataSource = controller.GetStatusesProviderConfirmedAfter(); ASPxComboBoxStatus.DataBind(); } else { ASPxComboBoxStatus.DataSource = controller.GetStatuses(id); ASPxComboBoxStatus.DataBind(); } lblStatus.Text = model.Status.ToString(); } }