Exemplo n.º 1
0
        public void Update(string CountryRegionCode, string CurrencyCode, DateTime ModifiedDate)
        {
            CountryRegionCurrency item = new CountryRegionCurrency();

            item.CountryRegionCode = CountryRegionCode;

            item.CurrencyCode = CurrencyCode;

            item.ModifiedDate = ModifiedDate;

            item.MarkOld();
            item.Save(UserName);
        }
Exemplo n.º 2
0
        public static void SaveCountryRegionMap(string varCurrencyCode, string[] itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM CountryRegionCurrency WHERE CurrencyCode=@CurrencyCode", Currency.Schema.Provider.Name);

            cmdDel.AddParameter("@CurrencyCode", varCurrencyCode);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (string item in itemList)
            {
                CountryRegionCurrency varCountryRegionCurrency = new CountryRegionCurrency();
                varCountryRegionCurrency.SetColumnValue("CurrencyCode", varCurrencyCode);
                varCountryRegionCurrency.SetColumnValue("CountryRegionCode", item);
                varCountryRegionCurrency.Save();
            }
        }
Exemplo n.º 3
0
        public static void SaveCurrencyMap(string varCountryRegionCode, System.Web.UI.WebControls.ListItemCollection itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM CountryRegionCurrency WHERE CountryRegionCode=@CountryRegionCode", CountryRegion.Schema.Provider.Name);

            cmdDel.AddParameter("@CountryRegionCode", varCountryRegionCode);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (System.Web.UI.WebControls.ListItem l in itemList)
            {
                if (l.Selected)
                {
                    CountryRegionCurrency varCountryRegionCurrency = new CountryRegionCurrency();
                    varCountryRegionCurrency.SetColumnValue("CountryRegionCode", varCountryRegionCode);
                    varCountryRegionCurrency.SetColumnValue("CurrencyCode", l.Value);
                    varCountryRegionCurrency.Save();
                }
            }
        }
Exemplo n.º 4
0
 public bool Destroy(object CountryRegionCode)
 {
     return(CountryRegionCurrency.Destroy(CountryRegionCode) == 1);
 }
Exemplo n.º 5
0
 public bool Delete(object CountryRegionCode)
 {
     return(CountryRegionCurrency.Delete(CountryRegionCode) == 1);
 }