Ejemplo n.º 1
0
        public bool Search(string type, string value)
        {
            Person_Data   myPerson = new Person_Data();
            Building_Data myBuild  = new Building_Data();

            try
            {
                if (type == "")
                {
                    throw new HardWareExeption("نوع سرچ را انتخاب کنید");
                }
                else if (value == "")
                {
                    throw new HardWareExeption("مقدار را وارد کنید");
                }
                else
                {
                    PersonSearch  = myPerson.Search(type, value);
                    this._message = "";
                    return(true);
                }
            }
            catch (HardWareExeption ex)
            {
                this._message = ex.Message;
                return(false);
            }
            catch (Exception ex)
            {
                this._message = ex.Message;
                return(false);
            }
        }