Exemplo n.º 1
0
        private void SetExtraDataValue(string key, string newValue)
        {
            var cosa = LinkedItems.FirstOrDefault(o => o.DBField == key);

            if (cosa != null)
            {
                cosa.Value = newValue;
            }
            //theString = string.Join("|", LinkedItems.Select(p => string.Format("{0}={1}", p.DBField, p.Value)).ToArray());
        }
Exemplo n.º 2
0
 public void AddLinkedItem(EspackControl Item)
 {
     Item.Add   = Add;
     Item.Upp   = Upp;
     Item.Del   = Del;
     Item.Order = 0;
     Item.PK    = false;
     LinkedItems.Add(Item);
     Item.ExtraDataLink = this;
 }
        public void DeleteLink(LinkedItems linked)
        {
            var client = new RestClient(conFIG.QACompleteEndPoint + "v1/projects/{projectID}/{EntityCode}/{EntityId}/linkeditems/{id}");

            var request = new RestRequest(Method.DELETE);

            request.AddUrlSegment("projectID", Project);
            request.AddUrlSegment("EntityCode", linked.entity_code);
            request.AddUrlSegment("EntityId", linked.entity_id);
            request.AddUrlSegment("id", linked.link_id);

            request.AddHeader("Authorization", Auth);
            request.AddHeader("Content-Type", "application/json");

            var response = client.Execute(request);
        }
        public LinkedItems PostNewLink(QACDataModel.LinkedItems linked)
        {
            var client = new RestClient(conFIG.QACompleteEndPoint + "v1/projects/{projectID}/Releases/{releaseID}/linkeditems");

            var request = new RestRequest(Method.POST);

            request.AddJsonBody(linked);
            request.AddUrlSegment("projectID", Project);
            request.AddUrlSegment("releaseID", linked.entity_id);
            request.AddHeader("Authorization", Auth);
            request.AddHeader("Content-Type", "application/json");

            var    response = client.Execute(request);
            string L        = response.Content;

            LinkedItems item = new LinkedItems();

            item = JsonConvert.DeserializeObject <QACDataModel.LinkedItems>(L);

            return(item);
        }
Exemplo n.º 5
0
 private string GetExtraDataValue(string key)
 {
     //var ExtraDataArray = (ExtraData.Split('|')).Select(i => i.Split('=')).ToArray();
     return(LinkedItems.First(o => o.DBField == key).Value.ToString());
 }
Exemplo n.º 6
0
 public void ClearEspackControl()
 {
     LinkedItems.ForEach(i => i.Value = "");
 }
Exemplo n.º 7
0
 public override IEnumerator <KeyValuePair <K, V> > GetEnumerator()
 {
     return(LinkedItems.GetEnumerator());
 }