private void LoadMaterial(String Key) { txtmat.Text = Key; Material_DL objMatDL = new Material_DL(ConnectionStringClass.GetConnection()); if (Type == ControllerType.All) { bindMaterials.DataSource = objMatDL.Search(Key, 1); } else if (Type == ControllerType.Category) { bindMaterials.DataSource = objMatDL.Search(Key, Category, 1); } else if (Type == ControllerType.MainType) { bindMaterials.DataSource = objMatDL.Search_MainType(Key, MainType, 1); } else if (Type == ControllerType.MainType_Category) { bindMaterials.DataSource = objMatDL.Search_MainType_Category(Key, MainType, Category, 1); } }