protected void JqgridCurrency_RowAdding(object sender, Trirand.Web.UI.WebControls.JQGridRowAddEventArgs e)
 {
     var status = e.RowData["StatusLabel"];
     var isBase = e.RowData["IsBaseLabel"];
     var rate = e.RowData["ConversionRate"];
     if(!(string.IsNullOrEmpty(status)||string.IsNullOrEmpty(isBase)||string.IsNullOrEmpty(rate)))
     {
         var currency = new HotelDataEntryLib.Currency()
                        {
                            CurrencyName = e.RowData["CurrencyName"],
                            CurrencyCode = e.RowData["CurrencyCode"],
                            Status = Convert.ToInt32(status),
                            ConversionRate = Convert.ToDouble(rate),
                            IsBase = Convert.ToInt32(isBase)
                        };
         CurrencyHelper.AddCurrency(currency);
     }
 }
Exemple #2
0
        protected void JqgridCurrency_RowAdding(object sender, Trirand.Web.UI.WebControls.JQGridRowAddEventArgs e)
        {
            var status = e.RowData["StatusLabel"];
            var isBase = e.RowData["IsBaseLabel"];
            var rate   = e.RowData["ConversionRate"];

            if (!(string.IsNullOrEmpty(status) || string.IsNullOrEmpty(isBase) || string.IsNullOrEmpty(rate)))
            {
                var currency = new HotelDataEntryLib.Currency()
                {
                    CurrencyName   = e.RowData["CurrencyName"],
                    CurrencyCode   = e.RowData["CurrencyCode"],
                    Status         = Convert.ToInt32(status),
                    ConversionRate = Convert.ToDouble(rate),
                    IsBase         = Convert.ToInt32(isBase)
                };
                CurrencyHelper.AddCurrency(currency);
            }
        }