/// <summary>
 /// There are no comments for UPDATE_ENTITY_DATA in the schema.
 /// </summary>
 public global::System.Nullable<decimal> UPDATE_ENTITY_DATA (string P_IN_XML_DATA, global::System.Nullable<double> P_ELSYS_TYPE_ID, ref string P_ERROR_MSG)
 {
     if (this.Connection.State != System.Data.ConnectionState.Open)
       this.Connection.Open();
     System.Data.EntityClient.EntityCommand command = new System.Data.EntityClient.EntityCommand();
     if(this.CommandTimeout.HasValue)
       command.CommandTimeout = this.CommandTimeout.Value;
     command.CommandType = System.Data.CommandType.StoredProcedure;
     command.CommandText = @"SyncServicesEntities.UPDATE_ENTITY_DATA";
     command.Connection = (System.Data.EntityClient.EntityConnection)this.Connection;
     EntityParameter P_IN_XML_DATAParameter = new EntityParameter("P_IN_XML_DATA", System.Data.DbType.String);
     if (P_IN_XML_DATA != null)
         P_IN_XML_DATAParameter.Value = P_IN_XML_DATA;
     command.Parameters.Add(P_IN_XML_DATAParameter);
     EntityParameter P_ELSYS_TYPE_IDParameter = new EntityParameter("P_ELSYS_TYPE_ID", System.Data.DbType.Double);
     if (P_ELSYS_TYPE_ID.HasValue)
         P_ELSYS_TYPE_IDParameter.Value = P_ELSYS_TYPE_ID;
     command.Parameters.Add(P_ELSYS_TYPE_IDParameter);
     EntityParameter P_ERROR_MSGParameter = new EntityParameter("P_ERROR_MSG", System.Data.DbType.String);
     if (P_ERROR_MSG != null)
         P_ERROR_MSGParameter.Value = P_ERROR_MSG;
     command.Parameters.Add(P_ERROR_MSGParameter);
     global::System.Nullable<decimal> result = (global::System.Nullable<decimal>)command.ExecuteScalar();
     if (P_ERROR_MSGParameter.Value != null && !(P_ERROR_MSGParameter.Value is System.DBNull))
       P_ERROR_MSG = (string)P_ERROR_MSGParameter.Value;
     else
       P_ERROR_MSG = default(string);
     return result;
 }
 /// <summary>
 /// Получение данных для синхронизации по сущности
 /// </summary>
 public global::System.Nullable<decimal> GetLinkSyncServEntData(global::System.Nullable<double> P_LINK_SYNC_SERV_ENT_ID, global::System.Nullable<decimal> P_ITERATOR_NUMBER, ref string P_XML_DATA, ref string P_ERROR_MSG)
 {
     if (this.Connection.State != System.Data.ConnectionState.Open)
         this.Connection.Open();
     System.Data.EntityClient.EntityCommand command = new System.Data.EntityClient.EntityCommand();
     if (this.CommandTimeout.HasValue)
         command.CommandTimeout = this.CommandTimeout.Value;
     command.CommandType = System.Data.CommandType.StoredProcedure;
     command.CommandText = @"SyncServicesEntities.GET_ENTITY_DATA";
     command.Connection = (System.Data.EntityClient.EntityConnection)this.Connection;
     EntityParameter P_LINK_SYNC_SERV_ENT_IDParameter = new EntityParameter("P_LINK_SYNC_SERV_ENT_ID", System.Data.DbType.Double);
     if (P_LINK_SYNC_SERV_ENT_ID.HasValue)
         P_LINK_SYNC_SERV_ENT_IDParameter.Value = P_LINK_SYNC_SERV_ENT_ID;
     command.Parameters.Add(P_LINK_SYNC_SERV_ENT_IDParameter);
     EntityParameter P_ITERATOR_NUMBERParameter = new EntityParameter("P_ITERATOR_NUMBER", System.Data.DbType.Decimal);
     if (P_ITERATOR_NUMBER.HasValue)
         P_ITERATOR_NUMBERParameter.Value = P_ITERATOR_NUMBER;
     command.Parameters.Add(P_ITERATOR_NUMBERParameter);
     EntityParameter P_XML_DATAParameter = new EntityParameter("P_XML_DATA", System.Data.DbType.String);
     if (P_XML_DATA != null)
         P_XML_DATAParameter.Value = P_XML_DATA;
     command.Parameters.Add(P_XML_DATAParameter);
     EntityParameter P_ERROR_MSGParameter = new EntityParameter("P_ERROR_MSG", System.Data.DbType.String);
     if (P_ERROR_MSG != null)
         P_ERROR_MSGParameter.Value = P_ERROR_MSG;
     command.Parameters.Add(P_ERROR_MSGParameter);
     global::System.Nullable<decimal> result = (global::System.Nullable<decimal>)command.ExecuteScalar();
     if (P_XML_DATAParameter.Value != null && !(P_XML_DATAParameter.Value is System.DBNull))
         P_XML_DATA = (string)P_XML_DATAParameter.Value;
     else
         P_XML_DATA = string.Empty;
     if (P_ERROR_MSGParameter.Value != null && !(P_ERROR_MSGParameter.Value is System.DBNull))
         P_ERROR_MSG = (string)P_ERROR_MSGParameter.Value;
     else
         P_ERROR_MSG = string.Empty;
     return result;
 }
 /// <summary>
 /// There are no comments for GET_SYSDATE in the schema.
 /// </summary>
 public global::System.Nullable<System.DateTime> GET_SYSDATE ()
 {
     if (this.Connection.State != System.Data.ConnectionState.Open)
       this.Connection.Open();
     System.Data.EntityClient.EntityCommand command = new System.Data.EntityClient.EntityCommand();
     if(this.CommandTimeout.HasValue)
       command.CommandTimeout = this.CommandTimeout.Value;
     command.CommandType = System.Data.CommandType.StoredProcedure;
     command.CommandText = @"SyncServicesEntities.GET_SYSDATE";
     command.Connection = (System.Data.EntityClient.EntityConnection)this.Connection;
     global::System.Nullable<System.DateTime> result = (global::System.Nullable<System.DateTime>)command.ExecuteScalar();
     return result;
 }