Beispiel #1
0
        public static List <clsGetWebLinkOutput> GetWebLinkList(clsGetWebLinkInput input)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[2];

                param[0] = new MySqlParameter("?strSearch", string.IsNullOrEmpty(input.SearchText) ? "" : input.SearchText.Replace(' ', '%').Trim());
                param[1] = new MySqlParameter("?strGroupID", input.GroupId);

                var Result = _DBTouchbase.ExecuteStoreQuery <clsGetWebLinkOutput>("CALL WEBGetWebLinkList(?strSearch, ?strGroupID)", param).ToList();
                return(Result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
        public static List <clsGetWebLinkOutput> GetWebLinkList(clsGetWebLinkInput input)
        {
            try
            {
                MySqlParameter[] param = new MySqlParameter[2];

                param[0] = new MySqlParameter("?strSearch", string.IsNullOrEmpty(input.SearchText) ? "" : input.SearchText.Replace(' ', '%').Trim());
                param[1] = new MySqlParameter("?strGroupID", input.GroupId);

                using (TouchBaseWebAPI.Data.row_productionEntities context = new TouchBaseWebAPI.Data.row_productionEntities())
                {
                    context.Connection.Open();
                    var Result = context.ExecuteStoreQuery <clsGetWebLinkOutput>("CALL WEBGetWebLinkList(?strSearch, ?strGroupID)", param).ToList();
                    return(Result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #3
0
        public object GetWebLinksList(clsGetWebLinkInput searchCriteria)
        {
            dynamic TBGetWebLinkListResult;

            try
            {
                List <clsGetWebLinkOutput> Result = WebLinks.GetWebLinkList(searchCriteria);

                if (Result != null)
                {
                    TBGetWebLinkListResult = new { status = "0", message = "success", WebLinkListResult = Result };
                }
                else
                {
                    TBGetWebLinkListResult = new { status = "0", message = "Record not found" };
                }
            }
            catch
            {
                TBGetWebLinkListResult = new { status = "1", message = "failed" };
            }

            return(new { TBGetWebLinkListResult });
        }