Ejemplo n.º 1
0
        public List <string> getProductName_En(string prefix)
        {
            Bis.ProductMethod bisProduct    = new Bis.ProductMethod();
            ViewModel.Search  searchProduct = new ViewModel.Search();
            searchProduct.Filter = "and tblProduct.Accessory='false' and tblProduct.Name_En like N'%" + prefix.FixFarsi() + "%'  ";

            DataSet dsProduct = bisProduct.GetProductData(searchProduct);

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

            if (!dsProduct.Null_Ds())
            {
                for (int i = 0; i < dsProduct.Tables[0].Rows.Count; i++)
                {
                    ProductNames.Add(string.Format("{0}~{1}", dsProduct.Tables[0].Rows[i]["Name_En"].ToString(), dsProduct.Tables[0].Rows[i]["IDProduct"].ToString()));
                    //string item = AutoCompleteExtender.CreateAutoCompleteItem(dsProduct.Tables[0].Rows[i]["ProductCodeName"].ToString(), dsProduct.Tables[0].Rows[i]["IDProduct"].ToString());
                    //ProductNames.Add(item);
                }
                return(ProductNames);
            }
            else
            {
                ProductNames.Add(string.Format("{0},{1}", "اطلاعاتی یافت نشد", "اطلاعاتی یافت نشد"));
                return(ProductNames);
            }
        }
Ejemplo n.º 2
0
 protected void FillRptMasterProduct(Repeater rptMasterProduct, string hfIDProductCategory)
 {
     try
     {
         ViewModel.Search searchProduct = new ViewModel.Search();
         searchProduct.Filter = " And tblProduct.IDProductCategory = '" + hfIDProductCategory + "'";
         searchProduct.Order  = " Order By tblProductCategory.[Order]";
         DataSet dsProduct = BisProduct.GetProductData(searchProduct);
         rptMasterProduct.DataSource = dsProduct;
         rptMasterProduct.DataBind();
     }
     catch
     {
     }
 }
Ejemplo n.º 3
0
        public List <string> getAccessoryCodeAndName(string prefix)
        {
            Bis.ProductMethod bisAccessory    = new Bis.ProductMethod();
            ViewModel.Search  searchAccessory = new ViewModel.Search();
            searchAccessory.Filter = " and tblProduct.Accessory='true' and  (tblProduct.ProductCode like N'%" + prefix.FixFarsi() + "%' or tblProduct.Name_Fa like N'%" + prefix.FixFarsi() + "%' )";
            //searchCompany.Order = "order by tblLegalUser.Name_Fa desc";
            DataSet dsAccessory = bisAccessory.GetProductData(searchAccessory);

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

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