public void Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp(); Hashtable item = new Hashtable(); item.Add("id", this._id); item.Add("createtimestamp", this._createtimestamp); item.Add("updatetimestamp", this._updatetimestamp); item.Add("key", this._key); item.Add("value", this._value); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta(); meta.Add("key", this._key); SorentoLib.Services.Datastore.Set(DatastoreAisle, this._id.ToString(), SNDK.Convert.ToXmlDocument(item, this.GetType().FullName.ToLower()), meta); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug(string.Format(SorentoLib.Strings.LogDebug.ExceptionUnknown, "SXUL.CONFIG", exception.Message)); // EXCEPTION: Exception.ConfigSave throw new Exception(string.Format(Strings.Exception.ConfigSave, this._id.ToString())); } }
public void Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp(); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta(); meta.Add("updatetimestamp", this._updatetimestamp); meta.Add("ownerid", this._ownerid); Datastore.Set(new Datastore.Item(DatastoreAisle, _id, ToData(), meta)); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown Logging.LogDebug(string.Format(SorentoLib.Strings.LogDebug.ExceptionUnknown, typeof(Event), exception.Message)); // EXCEPTION: Exception.EventSave throw new Exception(string.Format(Strings.Exception.EventSave, this._id.ToString())); } }
public void Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); Hashtable item = new Hashtable (); item.Add ("id", this._id); item.Add ("createtimestamp", this._createtimestamp); item.Add ("updatetimestamp", this._updatetimestamp); item.Add ("collectionschemaid", this._collectionschemaid); item.Add ("title", this._title); item.Add ("sort", this._sort); item.Add ("contents", this._contents); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); meta.Add ("collectionschemaid", this._collectionschemaid); SorentoLib.Services.Datastore.Set (DatastoreAisle, this._id.ToString (), SNDK.Convert.ToXmlDocument (item, this.GetType ().FullName.ToLower ()), meta); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, "SCMS.COLLECTION", exception.Message)); // EXCEPTION: Exception.CollectionSave throw new Exception (string.Format (Strings.Exception.CollectionSave, this._id.ToString ())); } }
public void Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); Hashtable item = new Hashtable (); item.Add ("id", this._id); item.Add ("createtimestamp", this._createtimestamp); item.Add ("updatetimestamp", this._updatetimestamp); item.Add ("key", this._key); item.Add ("value", this._value); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); meta.Add ("key", this._key); SorentoLib.Services.Datastore.Set (DatastoreAisle, this._id.ToString (), SNDK.Convert.ToXmlDocument (item, this.GetType ().FullName.ToLower ()), meta); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, "SXUL.CONFIG", exception.Message)); // EXCEPTION: Exception.ConfigSave throw new Exception (string.Format (Strings.Exception.ConfigSave, this._id.ToString ())); } }
public void Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); Hashtable item = new Hashtable (); item.Add ("id", this._id); item.Add ("createtimestamp", this._createtimestamp); item.Add ("updatetimestamp", this._updatetimestamp); item.Add ("customerid", this._customerid); item.Add ("itemid", this._itemid); item.Add ("sort", this._sort); item.Add ("amount", this._amount); item.Add ("active", this._active); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); meta.Add ("customerid", this._customerid); meta.Add ("itemid", this._itemid); SorentoLib.Services.Datastore.Set (DatastoreAisle, this._id.ToString (), SNDK.Convert.ToXmlDocument (item, this.GetType ().FullName.ToLower ()), meta); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, "DIDIUS.AUTOBID", exception.Message)); // EXCEPTION: Exception.AutoBidSave throw new Exception (string.Format (Strings.Exception.AutoBidSave, this._id.ToString ())); } }
public void Save() { try { if (this._no == 0) { this._no = NewCreditnoteNo (); } this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); Hashtable item = new Hashtable (); item.Add ("id", this._id); item.Add ("createtimestamp", this._createtimestamp); item.Add ("updatetimestamp", this._updatetimestamp); item.Add ("no", this._no); item.Add ("customerid", this._customerid); item.Add ("vat", this._vat); item.Add ("total", this._total); item.Add ("lines", this._lines); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); List<Guid> itemids = new List<Guid> (); foreach (CreditnoteLine line in this._lines) { itemids.Add (line.ItemId); } meta.Add ("itemids", SNDK.Convert.ListToString<List<Guid>> (itemids)); meta.Add ("customerid", this._customerid); SorentoLib.Services.Datastore.Set (DatastoreAisle, this._id.ToString (), SNDK.Convert.ToXmlDocument (item, this.GetType ().FullName.ToLower ()), meta); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, "DIDIUS.CREDITNOTE", exception.Message)); Console.WriteLine (exception); // EXCEPTION: Exception.CreditnoteSave throw new Exception (string.Format (Strings.Exception.CreditnoteSave, this._id.ToString ())); } }
public Item Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); Hashtable item = new Hashtable (); item.Add ("id", this._id); item.Add ("createtimestamp", this._createtimestamp); item.Add ("updatetimestamp", this._updatetimestamp); item.Add ("no", this._no); item.Add ("catalogno", this._catalogno); item.Add ("caseid", this._caseid); item.Add ("auctionid", this._auctionid); // item.Add ("title", this._title); item.Add ("description", this._description); item.Add ("fields", this._fields); item.Add ("vat", this._vat); item.Add ("minimumbid", this._minimumbid); item.Add ("appraisal1", this._appraisal1); item.Add ("appraisal2", this._appraisal2); item.Add ("appraisal3", this._appraisal3); item.Add ("invoiced", this._invoiced); item.Add ("approvedforinvoice", this._approvedforinvoice); item.Add ("settled", this._settled); item.Add ("pictureid", this._pictureid); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); meta.Add ("caseid", this._caseid); meta.Add ("auctionid", this._auctionid); SorentoLib.Services.Datastore.Set (DatastoreAisle, this._id.ToString (), SNDK.Convert.ToXmlDocument (item, this.GetType ().FullName.ToLower ()), meta); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, "DIDIUS.ITEM", exception.Message)); // EXCEPTION: Exception.ItemSave throw new Exception (string.Format (Strings.Exception.ItemSave, this._id.ToString (), exception.Message)); } return this; }
public void Save() { try { if (this._no == 0) { this._no = NewSettlementNo (); } this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); Hashtable item = new Hashtable (); item.Add ("id", this._id); item.Add ("createtimestamp", this._createtimestamp); item.Add ("updatetimestamp", this._updatetimestamp); item.Add ("no", this._no); item.Add ("auctionid", this._auctionid); item.Add ("caseid", this._caseid); item.Add ("customerid", this._customerid); item.Add ("lines", this._lines); item.Add ("caseno", this._caseno); item.Add ("reference", this._reference); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); meta.Add ("auctionid", this._auctionid); meta.Add ("caseid", this._caseid); List<Guid> itemids = new List<Guid> (); foreach (SettlementLine line in this._lines) { itemids.Add (line.ItemId); } meta.Add ("itemids", SNDK.Convert.ListToString<List<Guid>> (itemids)); meta.Add ("customerid", this._customerid); SorentoLib.Services.Datastore.Set (DatastoreAisle, this._id.ToString (), SNDK.Convert.ToXmlDocument (item, this.GetType ().FullName.ToLower ()), meta); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, "DIDIUS.SETTLEMENT", exception.Message)); // EXCEPTION: Exception.SettlementSave throw new Exception (string.Format (Strings.Exception.SettlementSave, this._id.ToString ())); } }
public void Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); meta.Add ("updatetimestamp", this._updatetimestamp); meta.Add ("ownerid", this._ownerid); Datastore.Set (new Datastore.Item (DatastoreAisle, _id, ToData (), meta)); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, typeof (Event), exception.Message)); // EXCEPTION: Exception.EventSave throw new Exception (string.Format (Strings.Exception.EventSave, this._id.ToString ())); } }
public void Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); Hashtable item = new Hashtable (); item.Add ("id", this._id); item.Add ("createtimestamp", this._createtimestamp); item.Add ("updatetimestamp", this._updatetimestamp); item.Add ("no", this._no); item.Add ("customerid", this._customerid); item.Add ("auctionid", this._auctionid); item.Add ("title", this._title); item.Add ("customerreference", this._customerreference); item.Add ("preparationfee", this._preparationfee); item.Add ("commisionfeepercentage", this._commisionfeepercentage); item.Add ("commisionfeeminimum", this._commisionfeeminimum); item.Add ("settled", this._settled); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); meta.Add ("customerid", this._customerid); meta.Add ("auctionid", this._auctionid); SorentoLib.Services.Datastore.Set (DatastoreAisle, this._id.ToString (), SNDK.Convert.ToXmlDocument (item, this.GetType ().FullName.ToLower ()), meta); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, "DIDIUS.CASE", exception.Message)); // EXCEPTION: Exception.PageSave throw new Exception (string.Format (Strings.Exception.CaseSave, this._id.ToString ())); } }
public void Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); Hashtable item = new Hashtable (); item.Add ("id", this._id); item.Add ("createtimestamp", this._createtimestamp); item.Add ("updatetimestamp", this._updatetimestamp); item.Add ("templateid", this._templateid); item.Add ("rootid", this._rootid); item.Add ("parentid", this._parentid); item.Add ("title", this._title); item.Add ("aliases", this._aliases); item.Add ("contents", this._contents); item.Add ("sort", this._sort); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); if (this._parentid == Guid.Empty) { meta.Add ("parentid", this._rootid); } else { meta.Add ("parentid", this._parentid); } meta.Add ("path", this.Path); foreach (string alias in this._aliases) { string path = string.Empty; if (alias.Substring (0, 1) == "/") { path = alias; } else { path = System.IO.Path.GetDirectoryName (this.Path) +"/"+ alias; } path = path.Replace ("//", "/"); meta.Add ("path", path); } SorentoLib.Services.Datastore.Set (DatastoreAisle, this._id.ToString (), SNDK.Convert.ToXmlDocument (item, this.GetType ().FullName.ToLower ()), meta); foreach (Page page in this.ChildPages) { page.Save (); } } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, "SCMS.TEMPLATE", exception.Message)); // EXCEPTION: Exception.PageSave throw new Exception (string.Format (Strings.Exception.PageSave, this._id.ToString ())); } }
public void Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); if (this._userid == Guid.Empty) { if (this._email != string.Empty) { SorentoLib.User user = new SorentoLib.User (this._email); user.Email = this._email; user.Realname = this._name; if (this.Status == Didius.Enums.CustomerStatus.Enabled) { user.Status = SorentoLib.Enums.UserStatus.Enabled; } else { user.Status = SorentoLib.Enums.UserStatus.Disabled; } user.Save (); this._userid = user.Id; } } else { if (this._email != string.Empty) { SorentoLib.User user = SorentoLib.User.Load (this._userid); user.Username = this._email; user.Email = this._email; user.Realname = this._name; user.Save (); } else { try { this._newsemail = false; SorentoLib.User.Delete (this._userid); this._userid = Guid.Empty; } catch {} } } Hashtable item = new Hashtable (); item.Add ("id", this._id); item.Add ("createtimestamp", this._createtimestamp); item.Add ("updatetimestamp", this._updatetimestamp); item.Add ("no", this._no); item.Add ("groupids", this._groupsasstring); item.Add ("name", this._name); item.Add ("address1", this._address1); item.Add ("address2", this._address2); item.Add ("postcode", this._postcode); item.Add ("city", this._city); item.Add ("country", this._country); item.Add ("att", this._att); item.Add ("phone", this._phone); item.Add ("mobile", this._mobile); item.Add ("email", this._email); // item.Add ("newsemail", this._newsemail); item.Add ("newssms", this._newssms); item.Add ("vat", this._vat); item.Add ("vatno", this._vatno); item.Add ("bankname", this._bankname); item.Add ("bankregistrationno", this._bankregistrationno); item.Add ("bankaccountno", this._bankaccountno); item.Add ("notes", this._notes); item.Add ("status", this._status); item.Add ("userid", this._userid); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); meta.Add ("customergroupids", this._groupsasstring); meta.Add ("userid", this._userid); SorentoLib.Services.Datastore.Set (DatastoreAisle, this._id.ToString (), SNDK.Convert.ToXmlDocument (item, this.GetType ().FullName.ToLower ()), meta); } catch (Exception exception) { Console.WriteLine (exception); // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, "DIDIUS.CUSTOMER", exception.Message)); // EXCEPTION: Exception.PageSave throw new Exception (string.Format (Strings.Exception.CustomerSave, this._id.ToString ())); } }
public void Save() { try { this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp (); Hashtable item = new Hashtable (); item.Add ("id", this._id); item.Add ("createtimestamp", this._createtimestamp); item.Add ("updatetimestamp", this._updatetimestamp); item.Add ("name", this._name); item.Add ("ownerid", this._ownerid); item.Add ("data", this._data); SorentoLib.Services.Datastore.Meta meta = new SorentoLib.Services.Datastore.Meta (); meta.Add ("updatetimestamp", this._updatetimestamp); meta.Add ("ownerid", this._ownerid); SorentoLib.Services.Datastore.Set (DatastoreAisle, this._id.ToString (), SNDK.Convert.ToXmlDocument (item, this.GetType ().FullName.ToLower ()), meta); } catch (Exception exception) { // LOG: LogDebug.ExceptionUnknown SorentoLib.Services.Logging.LogDebug (string.Format (SorentoLib.Strings.LogDebug.ExceptionUnknown, "DIDIUS.EVENTLISTENER", exception.Message)); // EXCEPTION: Exception.EventListenerSave throw new Exception (string.Format (Strings.Exception.EventListenerSave, this._id.ToString ())); } }