Exemplo n.º 1
0
        public List <string> getTechnicalPropertyCodeAndName(string prefix)
        {
            Bis.TechnicalPropertyMethod bisTechnicalProperty    = new Bis.TechnicalPropertyMethod();
            ViewModel.Search            searchTechnicalProperty = new ViewModel.Search();
            searchTechnicalProperty.Filter = " and (tblTechnicalProperty.Code like N'%" + prefix.FixFarsi() + "%' or tblTechnicalProperty.Name_Fa like N'%" + prefix.FixFarsi() + "%' or tblTechnicalProperty.Name_En like N'%" + prefix + "%') ";

            DataSet dsTechnicalProperty = bisTechnicalProperty.GetTechnicalPropertyData(searchTechnicalProperty);

            List <string> TechnicalPropertyNames = new List <string>();

            if (!dsTechnicalProperty.Null_Ds())
            {
                for (int i = 0; i < dsTechnicalProperty.Tables[0].Rows.Count; i++)
                {
                    TechnicalPropertyNames.Add(string.Format("{0}~{1}", dsTechnicalProperty.Tables[0].Rows[i]["TechnicalPropertyCodeName_En"].ToString(), dsTechnicalProperty.Tables[0].Rows[i]["IDTechnicalProperty"].ToString()));
                }
                return(TechnicalPropertyNames);
            }
            else
            {
                TechnicalPropertyNames.Add(string.Format("{0}~{1}", "اطلاعاتی یافت نشد", Guid.Empty));
                return(TechnicalPropertyNames);
            }
        }