protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { try { // Fill and assign currency id for payment. FillLists.FillCurrenciesList(ddlCurrencyUsed); ddlCurrencyUsed.SelectedValue = Page.RouteData.Values["Name"].ToString(); ddlCurrencyUsed.Enabled = false; // Determin the companies type for payment based on currency id. if (ddlCurrencyUsed.SelectedValue == "2") // Dirham { FillDirhamCompType(); } rblCompanyType_SelectedIndexChanged(sender, e); // Fill expense type based on currency id. FillLists.FillExpensTypes(ddlExpenseType, ddlCurrencyUsed.SelectedValue); hfID.Value = Page.RouteData.Values["expenseId"].ToString(); ShowExpenseDatails(Convert.ToInt64(hfID.Value)); } catch { lblCarCode.Text = (Page.RouteData.Values["carId"] != null ? Page.RouteData.Values["carId"].ToString() : ""); linkCancel.NavigateUrl = "car/" + lblCarCode.Text + "/expenses.aspx"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { try { //FillLists.FillCurrenciesList(ddlCurrencyUsed); FillLists.FillExpensTypes(ddlExpenseType, ddlCurrencyUsed.SelectedValue, true); // get general expenses only. hfID.Value = Page.RouteData.Values["Id"].ToString(); // payment Id. ShowPaymentDatails(Convert.ToInt64(hfID.Value)); } catch { } } }