} // Refresh /// <summary> /// save document header date in database /// </summary> /// <returns></returns> public bool Save() { CheckSelect(); if (!Modified) { return(true); //документ не был изменен } string TextQuery = "update DH$" + TypeDoc + " set "; foreach (KeyValuePair <string, object> pair in HeaderAttributes) { TextQuery += "$" + pair.Key + " = :param, "; SQL1S.QuerySetParam(ref TextQuery, "param", pair.Value); } //режим последнюю запятую (с пробелом) TextQuery = TextQuery.Substring(0, TextQuery.Length - 2); TextQuery += " where iddoc = :iddoc"; SQL1S.QuerySetParam(ref TextQuery, "iddoc", ID); return(SS.ExecuteWithoutRead(TextQuery)); } // Save