Esempio n. 1
0
        public static List <CherwellBusinessObject> GetListCherwellBusinessObjects(string busObj, string field,
                                                                                   string fieldValue, string xmlElement)
        {
            var recordId = RecordId.GetRecordId(Global.CherwellConnection.QueryByFieldValue(busObj, field, fieldValue),
                                                xmlElement);
            var list = new List <CherwellBusinessObject>();

            foreach (var current in recordId)
            {
                list.Add(GetDetails(busObj, current));
            }
            return(list);
        }
Esempio n. 2
0
        public static CherwellBusinessObject GetEmptyCherwellBusinessObject(string busObj, string field,
                                                                            string fieldValue, string xmlElement)
        {
            var recordId = RecordId.GetRecordId(Global.CherwellConnection.QueryByFieldValue(busObj, field, fieldValue),
                                                xmlElement);
            var cherwellBusinessObject = new CherwellBusinessObject();

            foreach (var current in recordId)
            {
                cherwellBusinessObject = GetDetails(busObj, current);
                var fields = cherwellBusinessObject.FieldList.Fields;
                for (var i = 0; i < fields.Length; i++)
                {
                    var cherwellField = fields[i];
                    cherwellField.Value = "";
                }
            }
            return(cherwellBusinessObject);
        }
Esempio n. 3
0
        public static string GetBusObjType(string busObj, string field, string fieldValue, string xmlElement,
                                           string fieldName)
        {
            var recordId = RecordId.GetRecordId(Global.CherwellConnection.QueryByFieldValue(busObj, field, fieldValue),
                                                xmlElement);
            var result = string.Empty;

            foreach (var current in recordId)
            {
                var details = GetDetails(busObj, current);
                var fields  = details.FieldList.Fields;
                for (var i = 0; i < fields.Length; i++)
                {
                    var cherwellField = fields[i];
                    if (cherwellField.Name == fieldName)
                    {
                        result = cherwellField.Value;
                    }
                }
            }
            return(result);
        }