Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            currencysOperator = new CurrencyDAL();

            if (!IsPostBack)
            {
                if (Request.QueryString[CommonStrings.ID] != null)
                {
                    Currency info
                        = currencysOperator.SelectByID(Convert.ToInt32(Request.QueryString[CommonStrings.ID]), null);

                    if (info != null)
                    {
                        txtUnitAr.Text = info.UnitAr;
                        txtUnitEn.Text = info.UnitEn;
                    }
                }
            }
        }
        catch
        {
            Response.Redirect(Utility.AppendQueryString(PagesPathes.ErrorPage, new KeyValue(CommonStrings.BackUrl, "CurrencyList")));
        }
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            currencyOperator = new CurrencyDAL();

            if (!IsPostBack)
            {
                BindGrid();
            }
        }
        catch
        {
            Response.Redirect(Utility.AppendQueryString(PagesPathes.ErrorPage, new KeyValue(CommonStrings.BackUrl, CommonStrings.AdminDefault)));
        }
    }
Example #3
0
    private void FillCurrencyDrpMenu()
    {
        CurrencyDAL currencyOperator = new CurrencyDAL();
        List<Currency> currencyList = currencyOperator.SelectAll(IsArabic);

        if (currencyList != null && currencyList.Count > 0)
        {
            drpCurrency.DataSource = currencyList;
            drpCurrency.DataValueField = Currency.CommonColumns.ID;
            if (IsArabic)
                drpCurrency.DataTextField = Currency.TableColumns.UnitAr;
            else
                drpCurrency.DataTextField = Currency.TableColumns.UnitEn;

            drpCurrency.DataBind();
        }
        drpCurrency.Items.Insert(0, Literals.ListHeader);
    }