public SubControlMobileStoreFrontStoreInfo(DataRow paSubscriberInfo) { if (paSubscriberInfo != null) { clSubscriberRow = new SubscriberRow(paSubscriberInfo); } }
protected override ExecuteState Execute(ITodoHost host, DateTime utcBatchNow) { try { SubscriberVolumeRow minCntVol; var existing = FindSubscriber(out minCntVol); if (existing != null) { return(ExecuteState.Complete); } if (minCntVol == null) { minCntVol = createVolume(); } var row = new SubscriberRow() { G_SubscriberVolume = minCntVol.G_SubscriberVolume, G_Subscriber = G_Subscriber, Subs_Type = Subs_Type, Create_Date = App.TimeSource.UTCNow, Parameters = Parameters }; try { ForNode(row.G_SubscriberVolume).Insert(row); } catch (DataAccessException dae) { if (dae.KeyViolation.IsNotNullOrWhiteSpace()) { return(ExecuteState.Complete); } throw; } try { minCntVol.Count++; ForNode(G_Owner).Update(minCntVol, filter: "Count".OnlyTheseFields()); } catch (Exception error) { host.Log(MessageType.Error, this, "Subscribe()", error.ToMessageWithType(), error); } return(ExecuteState.Complete); } catch (Exception error) { host.Log(MessageType.Error, this, "Subscribe()", error.ToMessageWithType(), error); return(ExecuteState.ReexecuteAfterError); } }
protected virtual SubscriberRow FindSubscriber(out SubscriberVolumeRow minCntVol) { minCntVol = null; IEnumerable <SubscriberVolumeRow> volumes = GetSubscriberVolumes(); SubscriberRow result = null; var i = 0; foreach (var volume in volumes) { var qry = Queries.FindSubscriber <SubscriberRow>(volume, G_Subscriber); if (result == null) { result = ForNode(volume.G_SubscriberVolume).LoadRow(qry); } if ((volume.Count < SocialConsts.GetVolumeMaxCountForPosition(i++)) && (minCntVol == null || minCntVol.Count > volume.Count)) { minCntVol = volume; } } return(result); }
public WidControlFEBasicStoreLocation() { clSubscriberRow = RetrieveRow(); }
public WidControlPOSUpdateSubscriberInfo() { clLanguageManager = ApplicationFrame.GetInstance().ActiveSubscription.ActiveLanguage; clSettingManager = ApplicationFrame.GetInstance().ActiveSubscription.ActiveSetting; clSubscriberRow = RetrieveRow(); }
public void RemoveSubscriberRow(SubscriberRow row) { this.Rows.Remove(row); }
public void AddSubscriberRow(SubscriberRow row) { this.Rows.Add(row); }
public SubscriberRowChangeEvent(SubscriberRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public TokenRow AddTokenRow(SubscriberRow parentSubscriberRowByFK_Subscriber_Token, System.DateTime PublishedDate, string Body) { TokenRow rowTokenRow = ((TokenRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, null, PublishedDate, Body}; if ((parentSubscriberRowByFK_Subscriber_Token != null)) { columnValuesArray[1] = parentSubscriberRowByFK_Subscriber_Token[0]; } rowTokenRow.ItemArray = columnValuesArray; this.Rows.Add(rowTokenRow); return rowTokenRow; }
public APNsRow AddAPNsRow(SubscriberRow parentSubscriberRowByFK_Subscriber_APNs, string DeviceToken, bool Failed, int UnreadRelease, bool Invalid) { APNsRow rowAPNsRow = ((APNsRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, null, DeviceToken, Failed, UnreadRelease, Invalid}; if ((parentSubscriberRowByFK_Subscriber_APNs != null)) { columnValuesArray[1] = parentSubscriberRowByFK_Subscriber_APNs[0]; } rowAPNsRow.ItemArray = columnValuesArray; this.Rows.Add(rowAPNsRow); return rowAPNsRow; }