Esempio n. 1
0
        private void FillForm()
        {
            lblId.Text             = Rec.Id.ToString();
            txtName.Text           = Rec.Name;
            txtURL.Text            = Rec.UrlParameters;
            cbWebSite.SelectedItem = WebSiteContext.GetModel(Rec.WebSite);
            lblCheckDate.Text      = String.Format("{0:dd/MM/yyyy hh:mm:ss tt}", Rec.CheckDate);
            txtPrice.Text          = String.Format("{0:00}", Rec.Price);
            lblCurrency.Text       = WebSiteContext.GetCurrencyCode(Rec.WebSite);

            cbWebSite.Enabled = false;
        }
Esempio n. 2
0
        private void dgSearch_BindingContextChanged(object sender, EventArgs e)
        {
            if (dgSearch.Rows != null && dgSearch.Rows.Count > 0)
            {
                foreach (DataGridViewRow row in dgSearch.Rows)
                {
                    //Website
                    int websiteNum = (int)row.Cells["WebSite"].Value;
                    row.Cells["WebSiteStr"].Value = WebSiteContext.GetName(websiteNum);

                    //Price
                    double price = (double)row.Cells["Price"].Value;
                    row.Cells["PriceStr"].Value = String.Format("{0:00}", price) + " " + WebSiteContext.GetCurrencyCode(websiteNum);
                }
            }
        }