Exemplo n.º 1
0
 /// <summary>
 /// Sets the criteria.
 /// </summary>
 /// <returns></returns>
 private Criteria GetCriteria()
 {
     Criteria objCriteria = new Criteria();
     objCriteria.Value = STAROPERATOR;
     objCriteria.Operator = LIKEOPERATOR;
     return objCriteria;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Sets the criteria.
 /// </summary>
 /// <returns></returns>
 private ShellEntities.Criteria SetCriteria()
 {
     ShellEntities.Criteria objCriteria = new ShellEntities.Criteria();
     objCriteria.Value = STAROPERATOR;
     objCriteria.Operator = GetOperator(objCriteria.Value);
     return objCriteria;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Sets the criteria.
 /// </summary>
 /// <returns></returns>
 private Criteria SetCriteria()
 {
     Criteria objCriteria = new Criteria();
     objCriteria.Value = STAROPERATOR;
     objCriteria.Operator = GetOperator(objCriteria.Value);
     return objCriteria;
 }
Exemplo n.º 4
0
 //commented in new paging implementation
 /// <summary>
 /// set the skip record count, request id and maxfetch record
 /// </summary>
 /// <returns></returns>
 /*  private SkipInfo SetSkipInfo(bool isFetchAll, string fetchCount, UserPreferences userPreference)
 {
     try
     {
         int intMaxRecordPage = 0;
         //Get the value from Userpreferences
         objSkipInfo = new SkipInfo();
         intMaxRecordPage = Convert.ToInt32(userPreference.RecordsPerPage);
         objSkipInfo.SkipRecord = Convert.ToString(Convert.ToInt32(pageNumber) * intMaxRecordPage);
         if(!isFetchAll)
             objSkipInfo.MaxFetch = userPreference.RecordsPerPage;
         else
             objSkipInfo.MaxFetch = fetchCount;
     }
     catch(Exception ex)
     {
         throw ex;
     }
     return objSkipInfo;
 }*/
 /// <summary>
 /// This function will set the Entity object.
 /// </summary>
 /// <returns></returns>
 private Entity SetQuickEntity()
 {
     Entity objEntity = null;
     //initializes the EntityList object.
     objEntity = new Entity();
     objEntity.ResponseType = TABULAR;
     objEntity.Property = true;
     Criteria objCriteria = new Criteria();
     if(List.Length > 0)
     {
         ArrayList arlAttribute = new ArrayList();
         arlAttribute = SetQuickAttribute();
         objEntity.Attribute = arlAttribute;
     }
     else
     {
         ArrayList arlAttribute = new ArrayList();
         arlAttribute = SetQuickAttribute();
         //the below condition check for asset value.
         //R5k changes
        /* if(!string.Equals(Asset, "Basin") && !string.Equals(Asset, "Field"))*/
         {
             if(arlAttribute.Count > 1)
             {
                 objEntity.AttributeGroups = SetQuickAttributeGroup(arlAttribute);
             }
             else
             {
                 objEntity.Attribute = arlAttribute;
             }
             objCriteria = SetQuickCriteria(Criteria);
             objEntity.Criteria = objCriteria;
         }
             //R5k changes
         /* else if(string.Equals(Asset, "Basin"))
          {
              objEntity.Attribute = arlAttribute;
              objEntity.Criteria = SetCriteria(Criteria);
          }
          else
         {
             objEntity.Attribute = arlAttribute;
             objEntity.Criteria = SetCriteria(Criteria);
         }*/
     }
     return objEntity;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Sets the criteria.
 /// </summary>
 /// <param name="criteria">The criteria.</param>
 /// <param name="column">The column.</param>
 /// <returns></returns>
 private Criteria SetCriteria(string criteria, string column)
 {
     Criteria objCriteria = new Criteria();
     if(column.Length > 0)
         objCriteria.Name = column;
     objCriteria.Value = criteria;
     objCriteria.Operator = GetOperator(objCriteria.Value);
     //returns the search criteria object.
     return objCriteria;
 }
Exemplo n.º 6
0
        /// <summary>
        /// Sets the Entity object
        /// </summary>
        /// <returns></returns>
        public Entity SetEntity()
        {
            Entity objEntity;
            try
            {
                objEntity = new Entity();
                objEntity.DataProvider = querySearchTree.SelectedNode.ParentNode.Text;
                objEntity.DataSource = querySearchTree.SelectedNode.ParentNode.ParentNode.Text;
                objEntity.Name = querySearchTree.SelectedNode.Value;

                objEntity.ResponseType = TABULAR;
                Criteria objCriteria = new Criteria();

                switch(type)
                {
                    case SQL:
                        {
                            objEntity.Type = SQL;
                            objEntity.Property = true;
                            Query objQuery = new Query();
                            objQuery.InnerText = txtSQLQuery.Text;
                            objQuery.Type = SIMPLE;
                            objEntity.Query = objQuery;
                            break;
                        }
                    case GEN:
                        {
                            objEntity = SetEntityAttributes(objEntity);
                            objEntity.Type = GEN;
                            objEntity.Property = true;
                            break;
                        }
                    default:
                        {
                            objEntity.Type = ALLCOLUMNSKEYWORD;
                            objEntity.Property = false;
                            objCriteria.Name = COLUMNNAMES;
                            objCriteria.Value = ALLCOLUMNS;
                            objEntity.Criteria = objCriteria;
                            break;
                        }
                }
            }
            catch
            {
                throw;
            }
            return objEntity;
        }
Exemplo n.º 7
0
 /// <summary>
 /// This function will set search criteria to Criteria object.
 /// </summary>
 /// <param name="criteria">The criteria.</param>
 /// <returns></returns>
 private Criteria SetCriteria(string criteria)
 {
     Criteria objCriteria = new Criteria();
     objCriteria.Value = criteria;
     objCriteria.Operator = GetOperator(objCriteria.Value);
     //returns the search criteria object.
     return objCriteria;
 }
Exemplo n.º 8
0
 /// <summary>
 /// This function will set the Entity object.
 /// </summary>
 /// <returns></returns>
 private Entity SetQuickEntity(string country, string columnName, string criteria)
 {
     Entity objEntity;
     /// initializes the EntityList object.
     try
     {
         objEntity = new Entity();
         objEntity.ResponseType = "Tabular";
         objEntity.Property = true;
         Criteria objCriteria = new Criteria();
         ArrayList arlAttribute = new ArrayList();
         arlAttribute = SetQuickAttribute(country);
         if (arlAttribute.Count > 1)
         {
             objEntity.AttributeGroups = SetQuickAttributeGroup(arlAttribute);
         }
         else
         {
             objEntity.Attribute = arlAttribute;
         }
         objCriteria = SetQuickCriteria(columnName, criteria);
         objEntity.Criteria = objCriteria;
     }
     catch
     { throw; }
     return objEntity;
 }
Exemplo n.º 9
0
 /// <summary>
 /// This function will set search criteria to Criteria object.
 /// </summary>
 /// <param name="criteria">The criteria.</param>
 /// <returns></returns>
 private Criteria SetQuickCriteria(string columnName, string criteria)
 {
     Criteria objCriteria = new Criteria();
     if (columnName.Length > 0)
         objCriteria.Name = columnName;
     objCriteria.Value = criteria;
     objCriteria.DisplayField = "true";
     objCriteria.Operator = GetOperator(objCriteria.Value);
     /// returns the search criteria object.
     return objCriteria;
 }
Exemplo n.º 10
0
 /// <summary>
 /// Sets the search request object.
 /// </summary>
 /// <param name="srchType">Type of the SRCH.</param>
 /// <returns></returns>
 private RequestInfo SetSearchRequestObject(string srchType)
 {
     objRequestInfo = new RequestInfo();
     Entity objEntity = new Entity();
     objEntity.Property = true;
     Criteria objCriteria = new Criteria();
     objCriteria.Name = srchType;
     objCriteria.Operator = LIKEOPERATOR;
     objCriteria.Value = STAROPERATOR;
     objEntity.Criteria = objCriteria;
     objRequestInfo.Entity = objEntity;
     return objRequestInfo;
 }
Exemplo n.º 11
0
 /// <summary>
 /// Gets the basins.
 /// </summary>
 /// <returns>XmlDocument</returns>
 protected XmlDocument GetBasinFromWebService()
 {
     objReportController = objFactory.GetServiceManager(REPORTSERVICE);
     RequestInfo objRequestInfo = new RequestInfo();
     Entity objEntity = new Entity();
     Criteria objCriteria = new Criteria();
     objCriteria.Value = STAROPERATOR;
     objCriteria.Operator = LIKEOPERATOR;
     objEntity.Criteria = objCriteria;
     objRequestInfo.Entity = objEntity;
     XmlDocument xmlDocResponse = objReportController.GetSearchResults(objRequestInfo, intListValMaxRecord, BASINITEMVAL, null, 0);
     return xmlDocResponse;
 }
Exemplo n.º 12
0
 /// <summary>
 /// Gets the criteria.
 /// </summary>
 /// <param name="column">The column.</param>
 /// <param name="criteria">The criteria.</param>
 /// <returns></returns>
 private Criteria GetCriteria(string column, string criteria)
 {
     string strCriteria = string.Empty;
     if(string.IsNullOrEmpty(criteria))
     {
         strCriteria = "*";
     }
     else
     {
         strCriteria = criteria;
     }
     Criteria objCriteria = new Criteria();
     objCriteria.Name = column;
     objCriteria.Value = strCriteria;
     objCriteria.Operator = GetOperator(strCriteria);
     return objCriteria;
 }