Example #1
0
        private ServiceOffLink[] mapServiceOffLinks(DataSet ds)
        {
            if (ds == null || ds.Tables[0] == null)
            {
                return(null);
            }

            //create an array of same size
            ServiceOffLink[] links = new ServiceOffLink[ds.Tables[0].Rows.Count];
            int index = 0;

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                ServiceOffLink s = new ServiceOffLink();
                s.CompanyId       = (dr["CompanyId"] != DBNull.Value ? Convert.ToInt16(dr["CompanyId"]) : 0);
                s.ServiceOffImage = returnRealOrBlank(dr["ServiceOffImage"] as string);
                s.ServiceOffId    = (dr["ServiceOffId"] != DBNull.Value ? Convert.ToInt16(dr["ServiceOffId"]) : 0);
                s.ServiceOffName  = returnRealOrBlank(dr["ServiceOffName"] as string);
                s.SearchKeywords  = returnRealOrBlank(dr["SearchKeywords"] as string);

                links[index] = s;
                index++;
            }
            return(links);
        }
Example #2
0
 /// <summary>
 /// create a ticket for a service offering
 /// </summary>
 /// <param name="userinput"></param>
 /// <returns></returns>
 public string createServiceOfferingCase(string userinput, ServiceOffLink servoffer)
 {
     return(createCase(userinput + servoffer.ToString(), "VCSM: User request information on a service offering."));
 }