Exemple #1
0
        public static clsListClients GetCLients()
        {
            clsListClients tmp = new clsListClients();

            IRemaxData rmx = new clsRemaxData();
            DataTable  tab = null;

            tab = rmx.getClients();

            foreach (DataRow rowClient in tab.Rows)
            {
                clsClient cl = new clsClient(Convert.ToInt32(rowClient["ID"].ToString()), rowClient["fullname"].ToString(),
                                             rowClient["phone"].ToString(), rowClient["email"].ToString(),
                                             (enumClientType)Enum.Parse(typeof(enumClientType), rowClient["type"].ToString()));

                tmp.Add(cl, cl.ID);
                cl = null;
            }
            tab = null;
            return(tmp);
        }