Пример #1
0
            /// <summary>
            /// Get a binding from the Webshop
            /// </summary>
            /// <param name="bindingId">Id of the binding to be retrieved</param>
            /// <param name="errorMsg" type="output">Error message returned by the web method</param>
            /// <returns>Returns a Binding object populated with data</returns>
            internal static Binding GetBindingById(int bindingId, out string errorMsg)
            {
                string xmlData = GetDataFromWebMethod("binding",
                                                      "getById",
                                                      "id=" + bindingId);

                if (WebMethodReturnedError(xmlData, out errorMsg))
                {
                    return(null);
                }
                else
                {
                    errorMsg = null;
                    Binding binding = BindingRepository.LoadBindingFromXml(xmlData);
                    return(binding);
                }
            }
Пример #2
0
 public bool SetSyncStatus(bool status)
 {
     return(BindingRepository.SetBindingSyncStatus(this.Id, status));
 }